Year 8 · Spring 1

Representations: from clay to silicon · Lesson 2 of 5

Binary to denary and back

TheoryTopic 3 Binary, denary and hex

Year 8 · Representations: from clay to silicon · Lesson 2 of 5

You will learn to

  • Convert an 8-bit binary number to denary by adding the columns that hold a 1.
  • Convert a denary number from 0 to 255 to binary by taking away the biggest column that fits.
  • Check each answer by converting it back the other way.

Year 8 · Representations: from clay to silicon · Lesson 2 of 5

Success criteria

You have got it when you can say:

  • I can convert binary to denary, like 01101011 = 107.
  • I can convert denary to binary, like 156 = 10011100.
  • I can explain each step using the words 'fits' and 'left over'.

Year 8 · Representations: from clay to silicon · Lesson 2 of 5

Retrieval starter

Questions from before. Write your answers, then show them.

  1. Last lesson

    A 100 Mbps connection downloads at most…

    A 12.5 MB per secondB 100 MB per secondC 800 MB per second

    A. 12.5 MB per second

  2. Last unit

    The web and the internet are…

    A The same thingB The web is a service that runs on the internetC The internet runs on the web

    B. The web is a service that runs on the internet

  3. Earlier this year

    Which bus only carries information one way, from the CPU to memory?

    A Address busB Data busC Control bus

    A. Address bus

Year 8 · Representations: from clay to silicon · Lesson 2 of 5

Key words (1 of 2)

most significant bit
Most significant bit: the leftmost bit, worth the most.
least significant bit
Least significant bit: the rightmost bit, worth 1.
Denary
Base 10. Our everyday numbers.
Binary
Base 2. Digits 0 and 1. Columns 128 64 32 16 8 4 2 1.

Year 8 · Representations: from clay to silicon · Lesson 2 of 5

Key words (2 of 2)

Hexadecimal
Base 16: digits 0–9 then A–F. One digit = 4 bits.
Overflow
A result too big for the bits available.

The explanation · step 1 of 3

Binary place values

1286432168421
★Remember

Start at 1 on the right. Double each time you move left. 1, 2, 4, 8, 16, 32, 64, 128. Learn this row by heart.

The leftmost bit is the most significant bit. The rightmost is the least significant bit.

The explanation · step 2 of 3

Binary → denary

  1. Write the place values above the bits.
  2. Find every column with a 1.
  3. Add those column values together.
e.g.Example

01101011 → the 1s are under 64, 32, 8, 2, 1 → 64 + 32 + 8 + 2 + 1 = 107.

★Remember

A 1 means 'count this column'. A 0 means 'skip it'.

The explanation · step 2 of 3

The maths: Binary to denary, as a formula

The explanation · step 3 of 3 · part 1 of 3

Denary → binary

Go from the biggest column to the smallest. Ask: does this column fit into what is left?

The explanation · step 3 of 3 · part 2 of 3

Denary → binary (continued)

  1. 156: does 128 fit? Yes → 1. 156 − 128 = 28 left.
  2. 64 into 28? No → 0.
  3. 32 into 28? No → 0.
  4. 16 into 28? Yes → 1. 12 left.
  5. 8 into 12? Yes → 1. 4 left.
  6. 4 into 4? Yes → 1. 0 left.
  7. 2 into 0? No → 0.
  8. 1 into 0? No → 0.

The explanation · step 3 of 3 · part 3 of 3

Denary → binary (continued)

e.g.Example

Answer: 10011100. Check: 128 + 16 + 8 + 4 = 156.

Year 8 · Representations: from clay to silicon · Lesson 2 of 5

Quick quiz · 1 of 3

Hex F is…

  1. A 10
  2. B 16
  3. C 15

C. 15

Hex digits run 0–9 then A = 10 up to F = 15.

Year 8 · Representations: from clay to silicon · Lesson 2 of 5

Quick quiz · 2 of 3

1 + 1 in binary is…

  1. A 11
  2. B 10
  3. C 2

B. 10

Write 0, carry 1. Say 'one zero', not 'ten'.

Year 8 · Representations: from clay to silicon · Lesson 2 of 5

Quick quiz · 3 of 3

Shifting a binary number one place right…

  1. A Halves it
  2. B Doubles it
  3. C Adds 1

A. Halves it

Each column is worth half the one to its left. The bit that falls off is lost.

Year 8 · Representations: from clay to silicon · Lesson 2 of 5

Exit ticket

Answer on paper before you go. Then check.

  1. 11111111 (255) + 1 in 8 bits causes…

    A OverflowB 256C Nothing special

    A. Overflow The answer needs 9 bits. The ninth bit does not fit.

  2. One hex digit equals…

    A 1 bitB 4 bitsC 8 bits

    B. 4 bits 16 values need 4 bits. That is why a byte is two hex digits.