COMPUTER SCIENCE CAFÉ
  • FOUNDATION YEARS
  • GCSE
  • IB
  • A LEVEL
  • LEARN TO CODE
  • CHALLENGES
  • ROBOTICS ENGINEERING
  • MORE
    • CLASS PROJECTS
    • Classroom Discussions
    • Useful Links
    • SUBSCRIBE
    • ABOUT US
    • CONTACT US
  • FOUNDATION YEARS
  • GCSE
  • IB
  • A LEVEL
  • LEARN TO CODE
  • CHALLENGES
  • ROBOTICS ENGINEERING
  • MORE
    • CLASS PROJECTS
    • Classroom Discussions
    • Useful Links
    • SUBSCRIBE
    • ABOUT US
    • CONTACT US
1.3.2 | STORAGE AND COMPRESSION
Topics from the Cambridge IGCSE (9-1) Computer Science 0984 syllabus 2023 - 2025.
OBJECTIVES
​1.3.2 Calculate the file size of an image file and a sound file, using information given
ALSO IN THIS TOPIC
1.1.1 NUMBER SYSTEMS
1.1.2 NUMBER SYSTEMS
1.1.3 NUMBER SYSTEMS 
1.1.4 NUMBER SYSTEMS
 ​1.1.5 NUMBER SYSTEMS
1.1.6 NUMBER SYSTEMS
1.2.1 TEXT, SOUND AND IMAGES
​​1.2.2 TEXT, SOUND AND IMAGES
​1.2.3 TEXT, SOUND AND IMAGES
​1.3.1 STORAGE AND COMPRESSION
YOU ARE HERE | ​​1.3.2 STORAGE AND COMPRESSION
​1.3.3 STORAGE AND COMPRESSION
​1.3.4 STORAGE AND COMPRESSION
TOPIC 1 KEY TERMINOLOGY
TOPIC 1 ANSWERS
TOPIC 1 TEACHER RESOURCES (CIE)

Picture
CALCULATING IMAGE FILE SIZE
Picture
IMAGE 1 : 8 x 8 pixels
Picture
IMAGE 2 : 16 x 16 pixels
To calculate the file size of the two images above, firstly although only two colours have been used, lets presume a colour depth of 8 bit for both images.
Image 1 calculation:
Firstly; calculate the total amount of pixels used in the image
8 pixels wide by 8 pixels tall:  8 x 8 = 64 (A total of 64 pixels used to represent the entire image)
Secondly; multiply the total pixels used by the colour depth (8 bits have been used to represent the content of each pixel)
64 pixels in total multiplied by 8(colour depth): 64 x 8 = 512
Answer: 
Image 1 has a file size of 512 bits

Image 2 calculation: 
16 pixel by 16 pixels: 16 x 16 = 256
256 pixels x 8 bit colour depth: 256 x 8 = 2048
Answer: Image 2 has a file size of 2048 bits

In practise images are much larges and the pixel density is much greater than the two example above.
Picture
IMAGE 3: Dimensions 1600 pixels x 1200 pixels : Bit Depth 24
Follow the same steps to calculate the file size of image 3, this time convert the file size from bits too Megabytes.
Step 1: Multiply the number of horizontal pixels by the number of vertical pixels: 1600 x 1200 = 1920000 pixels
Step 2: 
Multiply the total pixels used by the colour/bit depth: 1920000 x 24 = 46080000 bits
Step 3: 
Divide the answer from step 2 by 8 to give the number of bytes used: 46080000 / 8 = 5760000 bytes
Step 4: 
Divide the number of bytes used by 1024 to give the value in Kilobytes: 5760000 / 1024 = 5625 Kilobytes
Step 5:  Divide the number of kilobytes used by 1024 to give the value in Megabytes: 5625 / 1024 = 5.4 Megabytes
​

The original image 3 has a file size of 5.2Mb, this value excludes any metadata storage used and was the file size before being compressed for use over the internet
Picture
IMAGE SIZE
1: An image has the following properties:
  • Dimensions 1024 pixels x 575 pixels
  • Bit Depth 24
Calculate the image size, show your workings at each stage and display the result in Mb.

2: An image has the following properties:
  • Dimensions 12 inch x 11 inch
  • Bit Depth 16
  • 72 pixels per inch
Calculate the image size, show your workings at each stage and display the result in Mb.

3: Besides the size and bit depth of an image, what else could have an impact on the total file size?

4:Give two situation where reducing the file size of an image is needed, explain the impact of doing this.
Picture
NAVIGATION
1.1.1 NUMBER SYSTEMS | Why Computers use Binary
1.1.2 NUMBER SYSTEMS | Binary, Hex and converting between number systems 
1.1.3 NUMBER SYSTEMS | Benefits of Hex
1.1.4 NUMBER SYSTEMS | Binary Addition and Overflow
1.1.5 NUMBER SYSTEMS | Binary Shifts
1.1.6 NUMBER SYSTEMS | Negative Number Representation, Two's Complement
1.2.1 TEXT, SOUND AND IMAGES | How Computers Represent Text
1.2.2 TEXT, SOUND AND IMAGES | How Computers Represent Sound
1.2.3 TEXT, SOUND AND IMAGES | How Computers Represent Images
1.3.1 STORAGE AND COMPRESSION | How Data Storage is Measured
​1.3.2 STORAGE AND COMPRESSION | Calculating Image and Sound File Size
​1.3.3 STORAGE AND COMPRESSION | Purpose of Data Compression
​1.3.4 STORAGE AND COMPRESSION | Lossy and Lossless, how files are compressed
TOPIC 1 KEY TERMINOLOGY
TOPIC 1 ANSWERS
TOPIC 1 TEACHER RESOURCES (CIE)
Picture
SUGGESTIONS
We would love to hear from you
SUBSCRIBE 
To enjoy more benefits
We hope you find this site useful. If you notice any errors or would like to contribute material then please contact us.