Year 9 · Y9.2 Data Representation · Lesson 2
Stretch tasks Binary addition and units
Quiz Challenge
A quiz game against four computer players, then short and long written answers.
- Quiz Blitz12 questions against the clock
- Quick Fire4 short answers
- Big Think2 long answers
About 20 minutes
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
Memory Match
Flip the cards two at a time to match each unit card to its size card.
- 12 cards: each unit has a size
- 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 addition and units
Binary addition and units: the questions
Quiz Challenge, round 1: Quiz Blitz
Add 00110110 and 00011011. Give the 8-bit answer.
In binary addition, what is 1 + 1 + 1?
- 1 carry 0
- 11 carry 1
- 1 carry 1
- 0 carry 1
11001000 + 01000000 overflows in 8 bits. Why?
- The answer is 264, which needs 9 bits
- The numbers are both even
- There are too many 1s in the numbers
- Binary cannot add numbers over 100
An overflow error means the stored answer will be wrong.
- True
- False
Order these from smallest to largest.
Number these 1 to 5.
- Byte
- Kilobyte
- Megabyte
- Bit
- Nibble
How many bits are in 3 bytes?
A 2 GB file is how many MB?
- 20
- 20,000
- 2,000
- 200
How many bytes are in 4 kilobytes?
Which TWO additions overflow in 8 bits?
Tick 2.
- 128 + 128
- 100 + 100
- 127 + 128
- 250 + 5
- 200 + 100
What is 01111111 + 00000001?
- 00000000
- 10000000
- 01111110
- 11111111
A nibble is half a byte.
- True
- False
A song is 4 MB. Roughly how many fit on an empty 16 GB phone?
- 64
- 4,000
- 400
- 40,000
Quiz Challenge, round 2: Quick Fire
Add 01011010 and 00101101. Give the answer in 8-bit binary, with your working. [2 marks]
What is an overflow error, and why does it make the stored answer wrong? [2 marks]
Explain why 255 is the largest number that 8 bits can store. [2 marks]
A photo is 3 MB. How many could you store on a 1.5 GB memory card? Show your working. [2 marks]
Quiz Challenge, round 3: Big Think
Add 10110110 and 01101101 using 8 bits. Explain what happens, and why the stored answer is wrong. [4 marks]
A phone has 64 GB of storage. Photos are 5 MB each and songs are 4 MB each. Work out how many of each would fit, and explain why the real number would be lower. [6 marks]
This or That: tick the right answer
What is 1 + 1 in binary?
- 0 carry 1
- 2
Which is bigger, a nibble or a byte?
- A nibble
- A byte
An 8-bit addition comes to more than 255. What happens?
- An overflow error
- A ninth bit is added
How many megabytes make a gigabyte?
- 1000
- 100
What is 00000011 + 00000001?
0000010000000012
How many bits are in a byte?
- 4
- 8
A file is 3,000 KB. How big is that in MB?
- 3,000,000 MB
- 3 MB
Which unit is the largest?
- Gigabyte
- Terabyte
Memory Match: match each unit to its size
| Unit | Size |
|---|---|
| A Bit | 1 1000 kilobytes |
| B Nibble | 2 A single 1 or 0 |
| C Byte | 3 4 bits |
| D Kilobyte | 4 1000 megabytes |
| E Megabyte | 5 8 bits |
| F Gigabyte | 6 1000 bytes |
Answers
Round 1: Quiz Blitz
- 01010001 54 + 27 = 81, which is 01010001. Check by converting both ways.
- 1 carry 1 1 + 1 + 1 is 3, which is 11 in binary: write 1 and carry 1.
- The answer is 264, which needs 9 bits 200 + 64 = 264, but 8 bits only go up to 255.
- True The carry out of the leftmost column has nowhere to go, so it is lost.
- Bit → Nibble → Byte → Kilobyte → Megabyte 1 bit, 4 bits, 8 bits, then 1000 bytes, then 1000 kilobytes.
- 24 8 bits in a byte, so 3 x 8 = 24.
- 2,000 1 GB is 1000 MB, so 2 GB is 2,000 MB.
- 4000 1 KB is 1000 bytes, so 4 KB is 4,000 bytes.
- 200 + 100; 128 + 128 Anything over 255 overflows: 300 and 256 do. 127 + 128 and 250 + 5 are exactly 255, which just fits.
- 10000000 127 + 1 = 128. Every carry ripples to the left, leaving 10000000.
- True A nibble is 4 bits and a byte is 8 bits.
- 4,000 16 GB is 16,000 MB, and 16,000 / 4 = 4,000 songs.
Round 2: Quick Fire
- Uses carries correctly, working from right to left
- 10000111
Model answerWorking from right to left and carrying 1 whenever a column adds to 2 or 3 gives 10000111. Check: 90 + 45 = 135, which is 10000111.
- The result needs more bits than are available
- The extra carry bit is lost, so the stored value is wrong
Model answerAn overflow error happens when the result of a calculation needs more bits than are available. The final carry has nowhere to go, so it is lost, and the value stored is wrong.
- All eight bits are 1: 11111111
- 128 + 64 + 32 + 16 + 8 + 4 + 2 + 1 = 255; there are 256 values starting from 0
Model answerThe largest number is when all eight bits are 1, 11111111, which is 128 + 64 + 32 + 16 + 8 + 4 + 2 + 1 = 255. There are 256 different values, but they start at 0.
- 1.5 GB = 1,500 MB
- 1,500 / 3 = 500 photos
Model answer1.5 GB = 1,500 MB, and 1,500 / 3 = 500 photos.
Round 3: Big Think
- Carries move from right to left, column by column
- The true answer, 291, needs 9 bits
- The final carry is lost: an overflow error
- The stored answer is 00100011, which is 35
Model answerAdding from right to left, carries ripple across the columns. The true answer is 182 + 109 = 291, which is 100100011 and needs 9 bits. With only 8 bits available, the final carry out of the leftmost column is lost: this is an overflow error. The stored answer is 00100011, which is 35, completely wrong.
- 64 GB = 64,000 MB
- 64,000 / 5 = 12,800 photos
- 64,000 / 4 = 16,000 songs
- 1 GB is 1000 MB
- The operating system and apps already use some of the space
- Real file sizes vary, for example with quality or compression
Model answer1 GB is 1000 MB, so 64 GB is 64,000 MB. That would hold 64,000 / 5 = 12,800 photos, or 64,000 / 4 = 16,000 songs. The real number would be lower, because the operating system and apps already use some of the storage, and real files vary in size: a high quality photo or a song with less compression is bigger.
This or That
- 0 carry 1 Binary has no digit 2. 1 + 1 makes 10, so write 0 and carry 1.
- A byte A nibble is 4 bits and a byte is 8 bits.
- An overflow error There are only 8 bits, so the carry out of the leftmost column is lost and the answer stored is wrong.
- 1000 Each unit is 1000 of the one below it, so 1000 MB make 1 GB.
000001003 + 1 = 4. In binary, 1 + 1 gives 0 carry 1 twice, leaving 100.- 8 A byte is 8 bits. Four bits is a nibble.
- 3 MB Going up a unit means dividing by 1000, so 3,000 KB is 3 MB.
- Terabyte A terabyte is 1000 gigabytes.
Memory Match
- A 2 Bit: A single 1 or 0
- B 3 Nibble: 4 bits
- C 5 Byte: 8 bits
- D 6 Kilobyte: 1000 bytes
- E 1 Megabyte: 1000 kilobytes
- F 4 Gigabyte: 1000 megabytes