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
128+128
64+64
32+32
16+16
8+8
4+4
2+2
1+1
Denary total00000000

0

All bits are 0 — every column is switched off.

Which way round?

Four classmates, one method

Four classmates are each explaining how they turn a denary number into binary.

Which classmate describes the method you'd use?
How sure are you?

Your turn

Convert 90 to binary

Convert the denary number 90 into 8-bit binary. Some steps are missing: choose the right one each time.

  1. Set out the place values from the left: 128, 64, 32, 16, 8, 4, 2, 1. The number to convert is 90.
  2. 128 is bigger than 90, so it doesn't fit. Write 0 under 128.
  3. missing step
Which line is step 3?

Find the mistake

One slip, one wrong answer

A student converts the denary number 100 into 8-bit binary and ends up with the wrong answer. One line of the working goes wrong. Which one?

A student's working — which line goes wrong?

How big can 8 bits get?

The biggest 8-bit number

Switch every one of the eight columns on, so the binary number is all 1s. What is the largest denary number an 8-bit binary value can represent? Commit to a guess before you add anything up.

Your estimate

300

0600

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

1Binary 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.
2To convert denary to binary, work left to right and subtract rather than add.
3Find the first place value that is less than or equal to the number, write a 1 there and subtract it.
4Repeat with what's left: a 1 where the place value fits, a 0 where it is too big, and 0s in any columns left over.
5Check by converting back to denary. The largest 8-bit value is 255 (11111111).

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?
A base-2 number system. It uses only the digits 0 and 1, and every place value is a power of 2.
What are the place values of an 8-bit table, from left to right?
128, 64, 32, 16, 8, 4, 2, 1.
How do you get from one binary place value to the next?
Multiply by 2 as you move from right to left: 1, 2, 4, 8, 16, 32, 64, 128.
Which way do you work, and what do you do with the values, when converting denary to binary?
Work from left to right and subtract values, rather than adding them.
Where does the first 1 go?
Under the first place value, scanning from the left, that is less than or equal to the denary number.
What do you do straight after writing a 1 in a column?
Subtract that place value from the number you're converting. What's left is what you carry on with.
What goes in a column whose place value is bigger than what's left?
A 0.
The subtraction result is 0 but columns remain on the right. What now?
Fill the remaining columns with 0s.
When is a conversion complete?
When the farthest-right column of the table has been filled in.
How can you double-check a denary-to-binary answer?
Convert the binary back to denary by adding the place values of the 1s, then compare the total with the number you started with.
What is the largest number an 8-bit binary value can represent?
255, which is 11111111 in binary.
Why isn't the largest 8-bit number 256?
The eight place values from 128 down to 1 add up to 255, and an 8-bit table has no 256 column.

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 posted

More OCR GCSE Computer Science topics

See the full OCR Computer Science curriculum →

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.