levo

Data Storage and Compression

Calculating file sizes

  • 3 things to know
  • Papers 1 and 2
Start revising · £5/month

Overview

Worked file size calculations for images and sound files in bytes, kibibytes and mebibytes.

What you need to know

Answer each one before you reveal it.

Your recallNot started
Numbers

Calculate the file size in KiB of an image of 1024 × 768 pixels with a colour depth of 8 bits

Numbers

Calculate the size in MiB of a 64-second recording with a sample rate of 16384 Hz and a sample resolution of 8 bits

Numbers

How many images of 512 × 512 pixels with a colour depth of 8 bits fit on a 1 MiB memory card?

Questions from this subtopic

Each one with the model answer underneath.

  1. 1

    How is the file size of an image calculated?

    Model answer

    The file size of an image in bits is the number of pixels multiplied by the colour depth. Dividing by 8 gives bytes, and dividing by 1024 gives kibibytes.

  2. 2

    Calculate the file size in KiB of an image of 1024 × 768 pixels with a colour depth of 8 bits.

    Model answer

    The image has 786432 pixels, each using 1 byte, so the file is 786432 bytes. Dividing by 1024 gives 768 KiB.

  3. 3

    How is the file size of a sound file calculated?

    Model answer

    The file size of a sound file in bits is the sample rate multiplied by the sample resolution and the length of the recording in seconds.

  4. 4

    Calculate the size in MiB of a 64-second recording with a sample rate of 16384 Hz and a sample resolution of 8 bits.

    Model answer

    The recording uses 16384 × 64 samples of 1 byte each, which is 1048576 bytes. The file is 1024 KiB, which is 1 MiB.

  5. 5

    Calculate the file size in KiB of an image of 800 × 600 pixels with a colour depth of 24 bits.

    Model answer

    The image has 800 × 600 = 480000 pixels of 24 bits each, which is 11520000 bits or 1440000 bytes. Dividing by 1024 gives 1406.25 KiB.

  6. 6

    Calculate the file size in KiB of an image of 640 × 480 pixels with a colour depth of 8 bits.

    Model answer

    The image has 640 × 480 = 307200 pixels of 8 bits each, which is 2457600 bits or 307200 bytes. Dividing by 1024 gives 300 KiB.

Other ways to work this

The same content, four other ways.

Everything in your subscription

Runs, plus a mode for every other kind of session.

1Flash
2Imposter
3Fade
4Brain dump

Learn every subtopic in runs of four questions

Facts flash and fade, a wrong word hides in some of them, and a brain dump decides which questions are locked in.

Algorithms
Searching and Sorting Algorithms
Decomposition and Abstraction
Developing and Testing Code

Cram the night before, weakest topic first

A quick scan finds your weakest topics. Recall each fact you missed three times in a row.

Denary is a base system.
1028

Blank Blitz consolidates the facts

Rapid timed gap-fills on the terms and numbers you need to recall without thinking.

✓What it iscovered
~Why it happenspartly there
How long it lastsnot there yet

Explain It tests your understanding

Explain a concept in your own words and see which of its points you covered.

Nibble means a group of four bits.
TrueFalse

Test It catches misconceptions

Spot the fault in a statement. The faults are the mistakes students make most often.

721941163128510

Brain Breaks between sessions

Short focus games to reset attention, so the next set lands better than the last.

Every question in Data Storage and Compression, on a schedule.

Learn it in runs of four questions, each ending on a brain dump against the clock. Every question you lock in comes back the next day, then at longer gaps, each time just before you would forget it.

Or £46 a year, about £3.83 a month. Cancel anytime.