GCSE · Computer Science · OCR · Spec J277
Denary to binary conversion (8-bit)
Here's 60 and eight empty columns. Treat 60 like money and spend it, biggest column first. Unlike real money, each column is spent once or not at all.
Computer Science · Data representation
Binary place value
Spend the number on the columns, biggest first. Switch on the first column that fits, work out what's left, then look for the first column that fits what's left.
Challenge
Build the number 60
0
All bits are 0 — every column is switched off.
WHAT YOU'VE LEARNED
A quick recap of today's lesson.
Start at the left, spend what fits, and keep going until there's nothing left to spend.
What you need to know
- Binary is base 2: it uses only the digits 0 and 1, and every place value is a power of 2.
- Start on the right at 1 and double each time you move left: 1, 2, 4, 8, 16, 32, 64, 128.
Have a goYour mate says the place value after 16, moving left, is 20, 'because it goes up by 4 each time'. Is your mate right?
No. It's 32, because you multiply by 2 each step.
The rule is doubling, not adding a fixed amount. 8 doubles to 16, and 16 doubles to 32.
- To turn a denary number (decimal) into binary, work left to right and subtract, rather than adding.
- Scan the table from the left for the first place value that is less than or equal to your number.
Have a goYou're converting 45. Scanning the table from the left, which is the first place value less than or equal to 45?
32.
128 and 64 are both bigger than 45, so they don't fit. 32 is the first place value that does.
- Write a 1 in that column, then subtract that place value from your number.
Have a goTo convert 45, you've written a 1 under 32. How much is left to convert?
13, because 45 − 32 = 13.
You take away the place value you've just spent. Adding it on would send you further from 0, not closer.
- Repeat with what's left: a 1 in the first column that fits, and a 0 in any earlier column that is too big.
- If the result reaches 0 with columns still on the right, fill them with 0s. Filling the last column finishes the job.
- Double-check by converting back: add the place values of your 1s and compare with the number you started with.
- The largest number 8 bits can represent is 255, which is 11111111 in binary.
The big picture
Binary is base 2: only the digits 0 and 1, with place values that double from right to left (1, 2, 4, 8, 16, 32, 64, 128). To convert denary to binary, work left to right and subtract. Write a 1 under the first place value that fits, subtract it, then repeat with what's left, putting 0 under any column that is too big. Fill leftover columns with 0s. You're finished when the farthest-right column is filled. Check by converting back. The largest 8-bit value is 255 (11111111).
Key points
Worked example
Problem
Convert the denary number 201 into 8-bit binary, then check your answer.
⚠ Watch out
Starting at the 1 column on the right and guessing which columns to add up. Start at the left instead: write a 1 where the place value fits, subtract it, and carry on with what's left.
Memory hook
Biggest first: does it fit? Yes means 1 and subtract. No means 0. Then add the 1s back to check.
Check yourself
Without looking back: write the eight place values from the left, convert 70 to binary by the subtraction method, then add the place values of your 1s to check you land back on 70.
Flashcards
(12)What is binary?
What are the place values of an 8-bit table, from left to right?
How do you get from one binary place value to the next?
Which way do you work, and what do you do with the values, when converting denary to binary?
Where does the first 1 go?
What do you do straight after writing a 1 in a column?
What goes in a column whose place value is bigger than what's left?
The subtraction result is 0 but columns remain on the right. What now?
When is a conversion complete?
How can you double-check a denary-to-binary answer?
What is the largest number an 8-bit binary value can represent?
Why isn't the largest 8-bit number 256?
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.