GCSE · Computer Science · OCR · Spec J277
Bitmap images: pixels and binary
Zoom in far enough on a bitmap and the picture falls apart into tiny blocks of colour. How does a computer remember which colour goes where? Binary.
Computer Science · Bitmap images
Paint a bulb, one pixel at a time
Every pixel in this picture uses a 2-bit binary sequence to say which colour it should display. The key says which sequence stands for which colour.
Predict, then check
One bit is just a 0 or a 1. What happens when a pixel gets a second bit?
A pixel with a colour depth of 1 bit has two possible sequences, 0 and 1, so it can show up to two colours. Its colour depth goes up to 2 bits. How many different sequences can it now have?
WHAT YOU'VE LEARNED
A quick recap of today's lesson.
How a picture becomes a grid of tiny blocks of colour, each one described by 0s and 1s.
What you need to know
- A bitmap image is a grid of pixels, laid out in rows and columns.
- A pixel is the smallest element in an image: one tiny block of the grid.
- Each pixel's colour is described by a binary sequence, a short pattern of 0s and 1s.
- Colour depth is the number of bits used to represent each pixel.
Have a goYour friend looks at a pixel's code, 101, and says: 'Two 1s, so the colour depth is 2.' Very confident. Is she right?
No. The colour depth is 3 bits.
Colour depth counts every bit used for the pixel, the 0s as well as the 1s, and 101 is three bits long.
- With n bits per pixel there are 2 to the power of n different sequences, so up to that many colours.
Have a goA pixel needs to be able to show 16 different colours. How many bits per pixel does it need?
4 bits.
Each extra bit doubles the number of sequences (2, 4, 8, 16), so 4 bits is enough. Adding one colour per bit would wrongly need 16 bits.
- Resolution is the total number of pixels, based on width and height: multiply the two.
Have a goImage X is 10 pixels wide and 10 tall. Image Y is 20 wide and 20 tall. Y is twice as wide and twice as tall. Does it have twice as many pixels?
No. It has four times as many: 400 pixels against 100.
Resolution is width × height, so doubling both doubles the rows and doubles the pixels in each row: 2 × 2 = 4 times as many.
- Quality depends on resolution, not just on size on the screen.
- A high-resolution bitmap can appear sharp and detailed.
- A low-resolution bitmap may look pixelated when it is enlarged.
The big picture
A bitmap image is a grid of pixels, and a pixel is the smallest element in an image. The colour each pixel should display is described by a binary sequence. Colour depth is the number of bits used to represent each pixel, so n bits give 2 to the power of n different sequences and up to that many colours. Resolution is the total number of pixels the image contains, based on its width and height. Quality depends on resolution, not just on size on the screen: a high-resolution bitmap can appear sharp and detailed, while a low-resolution bitmap may look pixelated when enlarged.
Key points
Worked example
Problem
Here is a tiny bitmap that uses the same key as the bulb: 00 white, 01 yellow, 10 grey, 11 black. Its pixel codes, row by row, are: Row 1: 00 01 01 00. Row 2: 01 11 11 01. Row 3: 00 10 10 00. Work out its resolution and its colour depth, then say what colour the pixel in row 2, column 2 is.
⚠ Watch out
Mixing up colour depth and resolution. Colour depth is the number of bits used for each pixel. Resolution is the total number of pixels in the whole image.
Memory hook
Depth is bits per pixel. Resolution is pixels in total. Depth digs down into one pixel; resolution counts across the whole grid.
Check yourself
Cover the page and explain to an imaginary friend how a bitmap picture is stored: what a pixel is, how its colour is described, and what colour depth and resolution each count.
Flashcards
(11)What is a pixel?
What is a bitmap image?
How is the colour of a pixel described?
What is colour depth?
How many sequences do n bits give?
What does one extra bit do to the colour count?
What is resolution?
A grid is 8 pixels wide and 6 pixels tall. What is its resolution?
Does a bigger picture on the screen mean a better-quality bitmap?
What may happen to a low-resolution bitmap when it is enlarged?
Which counts bits per pixel?
Tap any card to flip it, or use Study as deck to go through them one at a time. In the full lesson these run as a spaced-repetition deck — you rate each card Hard, Good or Easy and the tricky ones keep coming back until they stick.
Learning with Lightbulb is opening soon
You can use this lesson now. Join the waitlist and we'll let you know when the full Lightbulb experience is ready.
Keep me postedMore OCR GCSE Computer Science topics
How this lesson was checked. This OCR GCSE Computer Science (specification J277)lesson was published through Lightbulb Learning's human-designed editorial process — the educational standards, accuracy rules and publication checks it must pass were authored and approved by Philip Halpin. It passed subject-specific assessment, automated educational checks and technical publication verification before going live (publication checks completed 14 November 2026). Published pages are monitored, human spot-checking is ongoing across the lesson library, and anything found wrong is corrected or withdrawn. How our lessons are made and checked. Spotted a mistake? Email hello@lightbulblearning.co and we'll review it.