Year 9 · Y9.2 Data Representation · Lesson 1

Stretch tasks Binary and hexadecimal

Task 1

Quiz Challenge

A quiz game against four computer players, then short and long written answers.

  1. Quiz Blitz12 questions against the clock
  2. Quick Fire4 short answers
  3. Big Think2 long answers

About 20 minutes

Task 2

This or That

Pixel the cat asks 8 questions. Each has two answers: pick the right one.

  • Two answers to every question
  • A fish treat for every right answer
  • Streaks win Pixel shades, then a party hat

About 4 minutes

Task 3

Memory Match

Flip the cards two at a time to match each binary card to its denary card.

  • 12 cards: each binary has a denary
  • One peek at every card
  • Combo points for pairs found in a row

6 pairs, about 4 minutes

The games need JavaScript. Every question is below, with the answers at the end.

Read the lesson: Binary and hexadecimal

Binary and hexadecimal: the questions

Quiz Challenge, round 1: Quiz Blitz

  1. Convert binary 10110101 to denary.

  2. Convert denary 200 to 8-bit binary.

  3. What is hex B in denary?

    • 10
    • 13
    • 11
    • 12
  4. Convert binary 11101001 to hexadecimal.

  5. Convert hex 7C to denary.

  6. What is the largest number 8 bits can hold?

    • 512
    • 255
    • 256
    • 128
  7. Computers store data in hexadecimal because it is shorter than binary.

    • True
    • False
  8. Which TWO are real reasons people use hexadecimal?

    Tick 2.

    • Hex uses less storage space
    • Hex makes negative numbers easier
    • It is shorter than binary, so easier to read
    • There are fewer mistakes when copying long values
    • Computers process hex faster than binary
  9. Order these values from smallest to largest.

    Number these 1 to 4.

    • Hex 1F
    • Denary 42
    • Hex 3C
    • Binary 00001111
  10. How many different values can 4 bits represent?

    • 4
    • 16
    • 15
    • 8
  11. Convert hex 2A to 8-bit binary.

  12. A web page colour is #FF0000. Which colour is it?

    • Green
    • Blue
    • White
    • Red

Quiz Challenge, round 2: Quick Fire

  1. Explain why hexadecimal is used, even though computers work in binary. [2 marks]

  2. Show how to convert binary 10011100 to hexadecimal. [2 marks]

  3. Why can 8 bits not store the number 300? [2 marks]

  4. Convert denary 77 to 8-bit binary. Show your working. [2 marks]

Quiz Challenge, round 3: Big Think

  1. Convert hex 4B into binary and into denary. Explain each step. [4 marks]

  2. Explain where hexadecimal is used in computing, and why, with examples. [6 marks]

This or That: tick the right answer

  1. What is binary 00001010 in denary?

    • 10
    • 12
  2. What is hex F in denary?

    • 15
    • 16
  3. How many binary digits does one hex digit stand for?

    • 4
    • 8
  4. What is hex 1F in denary?

    • 31
    • 25
  5. Which is the binary for 9?

    • 1100
    • 1001
  6. Splitting binary into nibbles to convert it to hex, where do you start?

    • From the left
    • From the right
  7. Where are you likely to see hexadecimal?

    • In colour codes such as #3A7BD5
    • On price labels in a shop
  8. Convert binary 01011010 to hex.

    • 5B
    • 5A

Memory Match: match each binary to its denary

BinaryDenary
A 000001011 129
B 000011112 255
C 001000003 100
D 100000014 32
E 111111115 15
F 011001006 5
Answers

Round 1: Quiz Blitz

  1. 181 128 + 32 + 16 + 4 + 1 = 181.
  2. 11001000 200 = 128 + 64 + 8, so the 128, 64 and 8 columns hold a 1: 11001000.
  3. 11 A is 10, so B is 11. F, the last hex digit, is 15.
  4. E9 Split into nibbles: 1110 is 14, which is E, and 1001 is 9. So E9.
  5. 124 (7 x 16) + 12 = 112 + 12 = 124. C is 12.
  6. 255 11111111 = 255. There are 256 different values, but they start at 0.
  7. False Computers only ever store binary. Hex is purely to make binary easier for people to read.
  8. It is shorter than binary, so easier to read; There are fewer mistakes when copying long values Hex helps people, not computers: one hex digit stands for four bits.
  9. Binary 00001111 → Hex 1F → Denary 42 → Hex 3C 15, 31, 42 and 60. Converting everything to denary makes them easy to compare.
  10. 16 Each extra bit doubles the values: 2 x 2 x 2 x 2 = 16, from 0000 to 1111.
  11. 00101010 2 is 0010 and A, which is 10, is 1010. Put the nibbles together: 00101010.
  12. Red Web colours are red, green, blue in hex. FF is full red, and 00 means no green and no blue.

Round 2: Quick Fire

    • It is shorter: one hex digit stands for four bits
    • So it is easier for people to read and remember, with fewer mistakes
    Model answer

    One hex digit stands for four bits, so hex values are much shorter than binary. That makes them easier for people to read, write and remember, with fewer mistakes.

    • Split it into two nibbles: 1001 and 1100
    • The answer is 9C
    Model answer

    Split it into nibbles of four bits: 1001 and 1100. 1001 is 9 and 1100 is 12, which is C, so the answer is 9C.

    • The largest 8-bit number is 255
    • 300 would need 9 bits
    Model answer

    The largest number 8 bits can store is 255, so 300 is too big: it would need 9 bits.

    • Working: 77 = 64 + 8 + 4 + 1
    • 01001101
    Model answer

    77 = 64 + 8 + 4 + 1, so there is a 1 in the 64, 8, 4 and 1 columns: 01001101.

Round 3: Big Think

    • 4 becomes the nibble 0100
    • B is 11, which becomes the nibble 1011
    • So the binary is 01001011
    • Denary: (4 x 16) + 11 = 75
    Model answer

    To get binary, expand each hex digit into four bits. 4 becomes 0100. B is 11, which becomes 1011. Putting the nibbles together gives 01001011. To get denary, multiply the first digit by 16 and add the second: (4 x 16) + 11 = 64 + 11 = 75.

    • Colour codes in web design, such as FF0000 for red
    • MAC addresses of network devices
    • Error codes or memory addresses
    • Each hex digit stands for four bits, so values are a quarter of the length
    • It is easier to read and remember, so there are fewer mistakes
    • It converts quickly to and from binary
    • The computer still stores binary: hex is only for people
    Model answer

    Hexadecimal is used in web design for colour codes, such as FF0000 for red, in the MAC addresses that identify network devices, and in error codes and memory addresses. It is used because each hex digit stands for four bits, so values are a quarter of the length of binary. That makes them easier for people to read and remember, with fewer mistakes, and hex converts quickly to and from binary because every digit maps onto exactly four bits. The computer itself still stores everything in binary: hex is only for humans.

This or That

  1. 10 Only the 8 and the 2 columns hold a 1, and 8 + 2 = 10.
  2. 15 Hex counts 0 to 9 and then A to F, so F is 15.
  3. 4 One hex digit stands for one nibble, which is four bits.
  4. 31 (1 x 16) + 15 = 31.
  5. 1001 8 + 1 = 9. 1100 is 8 + 4, which is 12.
  6. From the right Group four bits at a time from the right, so any short group ends up on the left.
  7. In colour codes such as #3A7BD5 Hex appears in colour codes, MAC addresses and error codes.
  8. 5A 0101 is 5 and 1010 is 10, which is A in hex.

Memory Match

  • A 6 00000101: 5
  • B 5 00001111: 15
  • C 4 00100000: 32
  • D 1 10000001: 129
  • E 2 11111111: 255
  • F 3 01100100: 100