Pearson Edexcel 1CP2 GCSE Computer Science · Topic 2: Data

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 term card to its meaning card.

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

6 pairs, about 4 minutes

Task 4

Sort It

Sort each statement into the right box, like the tick-box tables in the exam.

  • 12 cards to sort into 3 boxes
  • Drag a card, tap a box or press its number
  • Combo points for cards sorted in a row

12 cards, 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. Why do computers use binary?

    • Denary would need fewer wires
    • It was the first number system
    • Their components have two stable states
    • Binary is easier for people to read
  2. Convert 11001010 to denary.

  3. Convert 47 to 8 bit binary.

  4. How many different values can 8 bits represent?

    • 256
    • 255
    • 128
    • 512
  5. What is the largest value an 8 bit unsigned integer can hold?

  6. Which hex digit represents the nibble 1010?

    • A
    • 10
    • B
    • F
  7. Convert 11001010 to hexadecimal.

  8. Convert hex 2F to denary.

  9. Hexadecimal saves memory compared with binary.

    • True
    • False
  10. Why do people use hexadecimal?

    • Computers process it faster
    • It uses less memory
    • It stores negative numbers
    • It is shorter and easier to read than binary
  11. How many bits does one hexadecimal digit represent?

    • 8
    • 2
    • 16
    • 4
  12. Where is hexadecimal used?

    Tick 2.

    • Shoe sizes
    • MAC addresses
    • Colour codes in web design
    • Counting money
    • Phone numbers

Quiz Challenge, round 2: Quick Fire

  1. Explain why computers use binary rather than a ten-state system. [2 marks]

  2. Show how to convert 181 to hexadecimal, using binary. [3 marks]

  3. Explain why an 8 bit unsigned integer can only store values up to 255. [2 marks]

  4. Explain why hexadecimal is used, even though the computer stores the same binary. [2 marks]

Quiz Challenge, round 3: Big Think

  1. A web designer picks a colour with red 202, green 47 and blue 181. Convert each value to binary and to hexadecimal, showing your working, and explain why designers write colours in hex. [6 marks]

  2. A student says: 'Computers use hexadecimal because it saves memory, and an 8 bit number can store 256 as its largest value.' Evaluate this statement, correcting any errors. [6 marks]

This or That: tick the right answer

  1. Is the leftmost bit of a byte worth 1 or 128?

    • 128
    • 1
  2. 47 as an 8 bit answer: 101111 or 00101111?

    • 101111
    • 00101111
  3. Which is easier for a person to copy correctly?

    • 11001010
    • CA
  4. Do computers process hexadecimal directly?

    • Yes: it is faster
    • No: everything is binary
  5. What is the hex digit F worth?

    • 15
    • 16
  6. Split 101101 into nibbles: from the left or from the right?

    • From the right
    • From the left
  7. How many bits is a nibble?

    • 8
    • 4
  8. Convert hex CA to denary.

    • 202
    • 1210

Memory Match: match each term to its meaning

TermMeaning
A Bit1 8 bits, 256 values
B Nibble2 A single binary digit
C Byte3 Base 10
D Denary4 Base 2
E Hexadecimal5 4 bits, one hex digit
F Binary6 Base 16, digits 0 to 9 and A to F

Sort It: tick one box in each row

Which denary value does each one equal?

Statement20247181
128 + 64 + 8 + 2
1100 1010
0010 1111
CA
B5
32 + 8 + 4 + 2 + 1
128 + 32 + 16 + 4 + 1
2F
1011 0101
10110101
00101111
11001010
Answers

Round 1: Quiz Blitz

  1. Their components have two stable states On and off map directly onto 1 and 0, which keeps circuits reliable.
  2. 202 128 + 64 + 8 + 2 = 202.
  3. 00101111 32 + 8 + 4 + 2 + 1 = 47, padded to eight bits.
  4. 256 2 to the power 8 = 256.
  5. 255 256 values, starting at 0, so the largest is 255.
  6. A 1010 is 10, and 10 is A in hex.
  7. CA 1100 is C and 1010 is A.
  8. 47 2 x 16 + 15 = 47.
  9. False CA and 11001010 take exactly the same eight bits.
  10. It is shorter and easier to read than binary Hex is a shorthand for people. The machine still uses binary.
  11. 4 One hex digit is exactly one nibble.
  12. MAC addresses; Colour codes in web design It is also used for memory addresses and machine code listings.

Round 2: Quick Fire

    • Components have two stable states, such as on and off
    • Two states are reliable even with noise, while ten would be misread
    Model answer

    A computer's components have two stable states, such as a transistor being on or off, which map directly onto 0 and 1. Two states can still be told apart when the signal is noisy, but ten levels packed into the same voltage range would be misread after a little interference, so binary is far more reliable.

    • 181 is 10110101 in binary
    • Split into the nibbles 1011 and 0101
    • Giving B5
    Model answer

    181 = 128 + 32 + 16 + 4 + 1, which is 10110101 in binary. Split it into nibbles from the right: 1011 and 0101. 1011 is 11, which is B, and 0101 is 5, so 181 is B5.

    • 8 bits give 2 to the power 8 = 256 different values
    • Counting starts at 0, so the range is 0 to 255
    Model answer

    8 bits give 2 to the power 8 = 256 different patterns. One of them is 0, so the values run from 0 to 255, and 255 is 11111111.

    • It is shorter, so people read and write it more easily
    • Fewer mistakes, and each digit converts to exactly four bits
    Model answer

    Hexadecimal is much shorter, so people can read, write and compare values more easily and make fewer mistakes copying them. Each hex digit stands for exactly four bits, so it converts to and from binary with no arithmetic.

Round 3: Big Think

    • 202 = 11001010
    • 202 = CA
    • 47 = 00101111
    • 47 = 2F
    • 181 = 10110101
    • 181 = B5
    • Working shown with place values or nibbles
    • Hex is shorter and easier to read and copy
    Model answer

    Red: 202 = 128 + 64 + 8 + 2 = 11001010. Split into nibbles, 1100 is C and 1010 is A, so CA. Green: 47 = 32 + 8 + 4 + 2 + 1 = 00101111, and the nibbles 0010 and 1111 give 2F. Blue: 181 = 128 + 32 + 16 + 4 + 1 = 10110101, and the nibbles 1011 and 0101 give B5. The colour is written #CA2FB5. Designers use hex because six characters are far shorter and easier to read and copy than 24 bits, with fewer mistakes, and each hex digit maps to exactly four bits.

    • Computers use binary, not hex
    • Hex is a shorthand for people
    • Hex saves no memory: the same bits are stored
    • For example, CA and 11001010
    • 8 bits give 256 different values
    • But the largest is 255, because 0 is included
    • A conclusion that both claims are wrong
    Model answer

    Both claims are wrong. Computers use binary, because their components have two states; hexadecimal is only a shorthand that makes binary easier for people to read. It does not save memory: CA and 11001010 are stored as exactly the same 8 bits. An 8 bit number can represent 256 different values, but because one of them is 0, the largest is 255, which is 11111111. So the statement is incorrect on both counts.

This or That

  1. 128 Place values double from right to left.
  2. 00101111 If the question says 8 bit, write all eight digits.
  3. CA The same value, in two characters instead of eight.
  4. No: everything is binary Hex is only for people. Underneath, everything is still binary.
  5. 15 Hex digits run 0 to 9, then A to F for 10 to 15.
  6. From the right From the right gives 10 and 1101, which is 2D. Splitting from the left gives a wrong answer.
  7. 4 8 bits is a byte. A nibble is half of one.
  8. 202 12 x 16 + 10 = 202. Hex digits are not simply written side by side.

Memory Match

  • A 2 Bit: A single binary digit
  • B 5 Nibble: 4 bits, one hex digit
  • C 1 Byte: 8 bits, 256 values
  • D 3 Denary: Base 10
  • E 6 Hexadecimal: Base 16, digits 0 to 9 and A to F
  • F 4 Binary: Base 2

Sort It

  1. 202 128 + 64 + 8 + 2 That adds up to 202.
  2. 202 1100 1010 The nibbles C and A make 202.
  3. 47 0010 1111 The nibbles 2 and F make 47.
  4. 202 CA 12 x 16 + 10 = 202.
  5. 181 B5 11 x 16 + 5 = 181.
  6. 47 32 + 8 + 4 + 2 + 1 That adds up to 47.
  7. 181 128 + 32 + 16 + 4 + 1 That adds up to 181.
  8. 47 2F 2 x 16 + 15 = 47.
  9. 181 1011 0101 The nibbles B and 5 make 181.
  10. 181 10110101 128 + 32 + 16 + 4 + 1 = 181.
  11. 47 00101111 32 + 8 + 4 + 2 + 1 = 47.
  12. 202 11001010 128 + 64 + 8 + 2 = 202.