← Years 7–8 Data & Information

Calculating the size of a bitmap image

The size of an uncompressed bitmap image in bits. Multiply width by height by the bits used for each pixel, then divide by 8 to get bytes.

Understanding Calculating the size of a bitmap image in Years 7–8 Data & Information

What it does: Each pixel is either black (0) or white (1), so it needs just 1 bit. 10 x 10 pixels x 1 bit = 100 bits. 100 x 50 = 5000 pixels, and 5000 x 24 bits = 120000 bits. Dividing by 8 gives 15000 bytes. 8 x 8 x 1 = 64 bits. Adding 8 + 8 gives 16, but you need to multiply. There are 8 bits in a byte, so divide: 64 / 8 = 8 bytes. Multiplying by 8 would give 512, which is wrong. 1 MB is about 1,000,000 bytes, so 2,000,000 bytes is about 2 MB.

Common mistakes: The size in bits is width x height x bits per pixel, so width and height must be multiplied, not added. It should be bits ← width * height * 1. The height of the image has been left out. The pixel count is width x height, so it should be bits ← 20 * 10 * bitsPerPixel.

Class: _____________________  ·  Name: _____________________  ·  Date: _________

Free printable worksheet with full answer key — or add this module to a class and your students practise it interactively.

This module's key terms are also in a printable crossword (Modules 9–45) and word search (Modules 9–80).

Take this worksheet further — free with Cloodit

Each concept is reinforced from every angle — learned, then applied, then tested.

Learning
Duo
Which formula gives the size of an uncompressed bitmap image in bits?
width x height x bits per pixelwidth + height + bits per pixel
Matches
A 20 x 10 image at 24 bits: 20 + 10 + 24 = 54 bits
↓
The numbers were added instead of multiplied. The correct sum is 20 x 10 x 24 = 4800 bits.
Applying
Meanings
Term
width x height x bits per pixel
Meaning
The size of an uncompressed bitmap image in bits. Multiply width by height by the bits used for each pixel, then divide by 8 to get bytes.
Practice
width ← 100
Testing
Gaps
sizeBits = width * * bitsPerPixel
Check Answer
Spots
2height ← 50
3bits ← width + height * 1

Cloodit turns curriculum-aligned coding content into journeys students work through one biome at a time.

The 'Firefly' badge — Night Coder, one of Cloodit's 106 collectible badges
Students earn collectable badges

Over 100 of them, across seven natural biomes.

Study Buddy
Students build a real study resource

Turns their work into revision material ready for Flash Cards and Exam study.

Diamond Dash — one of Cloodit's live, competitive Sprint games
Students lock in with Sprints

Live, competitive practice for the start of the lesson or a teacher-led lesson finisher.

A Cloodit certificate of achievement, ready to personalise and print
Custom printable certificates

Honour your top performers, or encourage a student who's trying hard — ready to print in seconds.

Quick Questions

1. Which formula gives the size of an uncompressed bitmap image in bits?
A. width x height x bits per pixel ✓
B. width + height + bits per pixel
Multiply the number of pixels (width x height) by the bits stored for each pixel.
2. A black and white image is 8 pixels wide and 8 pixels tall, using 1 bit per pixel. How many bits does it need?
A. 16 bits
B. 64 bits ✓
8 x 8 x 1 = 64 bits. Adding 8 + 8 gives 16, but you need to multiply.
3. An image needs 64 bits. How many bytes is that?
A. 8 bytes ✓
B. 512 bytes
There are 8 bits in a byte, so divide: 64 / 8 = 8 bytes. Multiplying by 8 would give 512, which is wrong.
4. To change the size of an image from bits to bytes, what do you do?
A. Divide by 8 ✓
B. Multiply by 8
1 byte = 8 bits, so you need fewer bytes than bits. Divide the number of bits by 8.
5. An RGB image is 10 pixels wide and 10 pixels tall at 24 bits per pixel. How many bits is it?
A. 240 bits
B. 2400 bits ✓
10 x 10 x 24 = 2400 bits. That is 300 bytes once you divide by 8.

Match the Pairs

width x height x bits per pixel → Gives the size of an uncompressed bitmap image in bits
size in bits / 8 → Converts the image size from bits to bytes
A black and white image uses 1 bit per pixel. An image that is 10 pixels wide and 10 pixels high is this many bits. → 10 x 10 x 1 = 100 bits
An RGB image uses 24 bits per pixel. An image that is 100 pixels wide and 50 pixels high is this many bits. → 100 x 50 x 24 = 120000 bits
A 20 x 10 image at 24 bits: 20 + 10 + 24 = 54 bits → The numbers were added instead of multiplied. The correct sum is 20 x 10 x 24 = 4800 bits.
An image of 8000 bits is 8000 x 8 = 64000 bytes → Bits were multiplied by 8 instead of divided by 8. The correct answer is 8000 / 8 = 1000 bytes.

Key Term

width x height x bits per pixel
The size of an uncompressed bitmap image in bits. Multiply width by height by the bits used for each pixel, then divide by 8 to get bytes.

Fill in the Blanks

1. sizeBits = width * height * bitsPerPixel
Hint: Type the variable for the number of pixel rows down the image, which is multiplied with the width.
2. sizeBits = 16 * 16 * 1 sizeBytes = sizeBits / 8
Hint: Type the operator that turns bits into bytes, since every byte holds 8 bits.
3. width = 8 height = 8 sizeBits = width * height * 1
Hint: Type the number of bits needed per pixel for a black and white image.
4. bitsPerPixel = 24 sizeBits = 100 * 100 * bitsPerPixel
Hint: Type the total bits per pixel for an RGB image, where red, green and blue each use 8 bits.
5. sizeBytes = 4096 sizeKB = sizeBytes / 1024
Hint: Type the number of bytes in one kilobyte, using the power of 2 value.

Spot the Error

Question 1
A width ← 100
B height ← 50
C bits ← width + height * 1
D bytes ← bits / 8
Line C — The size in bits is width x height x bits per pixel, so width and height must be multiplied, not added. It should be bits ← width * height * 1.
Question 2
A bitsPerPixel ← 24
B bits ← 20 * bitsPerPixel
C bytes ← bits / 8
Line B — The height of the image has been left out. The pixel count is width x height, so it should be bits ← 20 * 10 * bitsPerPixel.
Question 3
A bwBits ← 24
B bits ← 64 * 64 * bwBits
C bytes ← bits / 8
Line A — A black and white image only needs 1 bit per pixel (0 or 1). 24 bits per pixel is for RGB colour images. It should be bwBits ← 1.
Question 4
A rgbBits ← 3
B bits ← 10 * 10 * rgbBits
C bytes ← bits / 8
Line A — An RGB pixel uses 3 bytes, which is 24 bits (8 bits each for red, green and blue). The formula needs bits per pixel, so it should be rgbBits ← 24.
Question 5
A width ← 16
B height ← 16
C bits ← width * height
D bytes ← bits / 8
Line C — The bits used for each pixel are missing. Width x height only gives the number of pixels. It should be bits ← width * height * 24.

Student with a class code? Join your class →