GoalConvert 8-bit binary numbers to denary and back.
New words
byte · a group of 8 bits8-bit binary · a binary number with eight places, worth 128, 64, 32, 16, 8, 4, 2 and 1
Explanation
A group of 8 bits is called a byte. The eight place values are 128, 64, 32, 16, 8, 4, 2 and 1. Each place is double the one to its right. To read an 8-bit number, add the place values that have a 1. If all eight bits are 1, the total is 255, so one byte can hold the numbers from 0 to 255. That is 256 different values. To convert denary to binary, use the same method as before: compare the number with each place value from the left, write 1 and subtract when it fits, and write 0 when it does not. Check by adding your place values back up.
128
64
32
16
8
4
2
1
bits
0
1
0
1
0
0
1
1
value used
64
16
2
1
Worked examples
128
64
32
16
8
4
2
1
bits
0
0
1
0
1
1
0
1
Read 00101101. The 1s are in the places worth 32, 8, 4 and 1. Add: 32 + 8 + 4 + 1 = 45.
Place value
Compare
Bit
Left over
128
77 ≥ 128? no
0
77
64
77 ≥ 64? yes
1
13
32
13 ≥ 32? no
0
13
16
13 ≥ 16? no
0
13
8
13 ≥ 8? yes
1
5
4
5 ≥ 4? yes
1
1
2
1 ≥ 2? no
0
1
1
1 ≥ 1? yes
1
0
Make binary from 77. It is not ≥ 128, so 0. It is ≥ 64, so 1 and 13 are left. 13 is 8 + 4 + 1. The answer is 01001101.
128
64
32
16
8
4
2
1
bits
1
1
0
0
0
1
1
0
Read 11000110 and check: 128 + 64 + 4 + 2 = 198. Notice how long the numbers are: this is why people do not write long binary numbers all day.
Class activity
Byte hunt (no computer). Draw a row of eight boxes and write 128, 64, 32, 16, 8, 4, 2, 1 above them. Choose any number from 0 to 255 and write its binary in the boxes. Ask a partner to read it and tell you the number. Then swap. Try five numbers each. Try these on purpose: the smallest (all zeros), the largest (all ones), a number with just one 1. Which numbers have only one 1? What do they have in common? (Answer: they are the place values, each double the last.) Check your answers by adding up. No computer is needed.
Practice
1
Convert 10010110 to denary.
128
64
32
16
8
4
2
1
bits
1
0
0
1
0
1
1
0
128 + 16 + 4 + 2 = 150.
2
Convert 200 to 8-bit binary. Show your working.
Place value
Compare
Bit
Left over
128
200 ≥ 128?
?
?
64
?
?
32
?
?
16
?
?
8
?
?
4
?
?
2
?
?
1
?
?
200 = 128 + 64 + 8, so 11001000.
3
What are the smallest and largest numbers that one byte can hold, and how many different numbers is that?
0 and 255. That is 256 different numbers (0 to 255 includes 0).
4
A pupil says that 00001000 is 8 and 00010000 is 16. Is the pupil right? Explain what happens each time the single 1 moves one place to the left.
Yes. Each place to the left is worth double, so the value doubles when the 1 moves one place left.