Binary and denary
About this lesson: Binary and denary
In short
A processor contains billions of transistors: switches that are either off (0) or on (1). One switch gives 2 patterns. Add more switches and count how fast the patterns grow.

What you'll explore
- Why binary?: Billions of tiny switches
- A processor contains billions of transistors: switches that are either off (0) or on (1). One switch gives 2 patterns.
- Place values: Columns that double
- In denary, columns are worth 1, 10, 100… In binary each column is worth double the one to its right: 1, 2, 4, 8 … up to 128.
- Denary to binary: Does it fit? Write 1 and subtract
- Start at 128. If the place value fits into the number, write 1 and subtract it; otherwise write 0.
- Another method: Keep dividing by 2
- Divide by 2 again and again, writing down each remainder (0 or 1). Read the remainders from the bottom up: that is the binary number.
- Check yourself: Read a byte
- A sensor sends the byte 01101001 to a computer.
Also in this lesson
- Step by step
- Watch out for these
- Getting full marks
- How many values can n bits store?
- More than the lesson
- Stretch your brain
- Binary you can hold
Words to know
- binary
- Base 2: a number system using only 0 and 1.
- denary
- Base 10: our everyday number system.
- bit
- A binary digit: 0 or 1.
- nibble
- 4 bits.
- byte
- 8 bits.
- place value
- What a column is worth. Binary: 1, 2, 4, 8, 16, 32, 64, 128.
- transistor
- A tiny electronic switch: on or off.
- base
- How many digits a number system uses.
- convert
- Change a number from one base to another.
- MOD and DIV
- Remainder and whole-number result of a division.
Sources
- BBC Bitesize, GCSE Computer Science: Binary
- Isaac Computer Science: Number bases
- Computer History Museum: Claude Shannon and switching circuits
- Python documentation: built-in functions bin() and int()