Calculating File Sizes (Cambridge (CIE) IGCSE Computer Science)

Revision Note

Robert Hampton

Written by: Robert Hampton

Reviewed by: James Woodhouse

Calculating File Sizes

How do you calculate the size of a bitmap image?

  • Calculating the size of a bitmap image can be carried out with either of the following formulas:

    • Resolution x colour depth

    • Image width x image height x colour depth

Example

Image Files

(Resolution) x (Colour Depth)

Size of bitmap image = 

 

 

Resolution

250,000

Resolution = width x height

Colour Depth

24 bits (3 bytes)

24 bits = 3 bytes

250,000 x 24

=

(bit to bytes) /8

(bytes to KiB) /1024

6,000,000 bits

750,000 bytes

732 KiB

250000 x 3

=

(bytes to KiB) /1024

750,000 bytes

732 KiB

OR

Image Files

(Image width) x (Image height) x (Colour Depth)

Size of bitmap image = 

 

 

Image width

500

 

Image height

500

 

Colour Depth

24 bits

24 bits = 3 bytes

(500 x 500 x 24)

=

(bit to bytes) /8

(bytes to KiB) /1024

6,000,000 bits

750,000 bytes

732 KiB

(500 x 500 x 3)

=

(bytes to KiB) /1024

750,000 bytes

732 KiB

How do you calculate the size of a sound file?

  • Calculating the size of a sound file is carried out with the following formula:

    • Sample rate x duration x sample resolution

Example

Sound Files

(Sample Rate) x (Duration in seconds) (Sample Resolution)

Size of sound file = 

 

 

Sample rate

100

Samples per second

Duration

60

Seconds

Sample resolution

24

Number of bits stored per sample

100 x 60 x 24

=

(bit to bytes) /8

(bytes to KiB) /1024

144,000 bits

18,000 bytes

18 KiB

Last updated:

You've read 0 of your 10 free revision notes

Unlock more, it's free!

Join the 100,000+ Students that ❤️ Save My Exams

the (exam) results speak for themselves:

Did this page help you?

Robert Hampton

Author: Robert Hampton

Expertise: Computer Science Content Creator

Rob has over 16 years' experience teaching Computer Science and ICT at KS3 & GCSE levels. Rob has demonstrated strong leadership as Head of Department since 2012 and previously supported teacher development as a Specialist Leader of Education, empowering departments to excel in Computer Science. Beyond his tech expertise, Robert embraces the virtual world as an avid gamer, conquering digital battlefields when he's not coding.

James Woodhouse

Author: James Woodhouse

Expertise: Computer Science

James graduated from the University of Sunderland with a degree in ICT and Computing education. He has over 14 years of experience both teaching and leading in Computer Science, specialising in teaching GCSE and A-level. James has held various leadership roles, including Head of Computer Science and coordinator positions for Key Stage 3 and Key Stage 4. James has a keen interest in networking security and technologies aimed at preventing security breaches.