Calculations

Cards (5)

  • Calculation for Text Files
    (Bytes per character) x (Number of characters)
    e.g. 'hello word' text file size using Extended ASCII
    1 byte per character (due to use of 8-bit Extended ASCII)
    10 characters (including spaces)
    1 x 10 = 10 bytes
    If greater then change Units e.g. 2000bytes into 2KB
  • Calculation for Image Files
    (Resolutionx (Colour Depth)

    e.g. Image with 500 width and 500 height and 24 bits colour depth
    Resolution = 500 x 500 = 250000
    colour depth = 24
    250000 x 24 = 6000000 bits
    bits to bytes = 6000000 divided by 8 = 750,000 bytes
    bytes to Kilobytes 750,000 bytes divided by 1000 = 750 Kilobytes
  • Resolution Calculation
    Width x height
  • Sound Files
    (Sample Rate) x (Duration in seconds) x (Bit Depth)

    e.g. Sound recording of 10 samples per second for 30 seconds was taken with 4 bits stored per sample
    Sample rate = 10
    Duration = 30
    Bit Depth = 4
    10 x 30 x 4 = 1200 bits
    1200 divided by 8 = 150 bytes
  • total number of colours
    2^n (where n is number of bits per pixel)