The Binary Control Room
Flip the switches. Watch the numbers change.
Your mission
Welcome to the control room! Every switch on this panel is a bit. Find out what each switch is worth, discover how the same number looks in decimal, octal and hexadecimal, then complete eight missions without the readouts to help you.
Explore
Switch each of the 8 bits on at least once, and find out what each position is worth.
This control panel has 8 switches, called bits. Each bit can be 0 (off) or 1 (on). Switch each one on to find out how much it is worth, and watch the readouts change.
0 of 8 switches tested
Experiment
Change the number of bits, show the groups, and make all four discoveries.
Discoveries
Use the panel to make each discovery. They tick themselves off.
0 of 4 discoveries made
Challenge
The readouts are switched off! Use place values to set the switches, or read them, for eight missions.
Complete all 8 missions to continue.
Understand
Here is what the control room was showing you, in the words you need for the exam.
Every position has a place value
In binary (base 2), each position is worth twice as much as the position to its right. To find the decimal value, add up the place values of the bits that are 1.
| Position | 2⁷ | 2⁶ | 2⁵ | 2⁴ | 2³ | 2² | 2¹ | 2⁰ |
|---|---|---|---|---|---|---|---|---|
| Place value | 128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 |
| Example | 1 | 0 | 1 | 0 | 1 | 1 | 0 | 1 |
10101101 = 128 + 32 + 8 + 4 + 1 = 173
MSB and LSB
The MSB (most significant bit) is the leftmost bit. It has the largest place value: 128 in an 8-bit number. The LSB (least significant bit) is the rightmost bit, worth 1.
Did you notice? The MSB on its own (128) is worth more than all the other bits added together (127).
How many values can n bits show?
With n bits there are 2ⁿ different patterns, so an unsigned number can go from 0 up to 2ⁿ − 1.
- 4 bits: 0 to 15
- 8 bits: 0 to 255
- 16 bits: 0 to 65,535
One number, four bases
| Binary (base 2) | Octal (base 8) | Decimal (base 10) | Hexadecimal (base 16) |
|---|---|---|---|
| 10101101 | 255 | 173 | AD |
Binary uses the digits 0 and 1, octal 0 to 7, decimal 0 to 9, and hexadecimal 0 to 9 and A to F (where A = 10, B = 11, C = 12, D = 13, E = 14 and F = 15). One octal digit matches a group of 3 bits, and one hex digit matches a group of 4 bits, which is why grouping makes conversion so quick.
Words to know
- Bit
- A binary digit: 0 or 1.
- Base
- How many digits a number system uses: 2, 8, 10 or 16.
- Place value
- What a digit is worth because of its position.
- MSB
- Most significant bit: the leftmost bit, with the largest place value.
- LSB
- Least significant bit: the rightmost bit, worth 1.
- Hexadecimal
- Base 16, using 0 to 9 and A to F.
Exam tip
When a question asks for an 8-bit answer, write all eight bits, including the zeros on the left (for example, 5 is 00000101). And always check your answer by adding the place values back up.