Bits, bytes and binary
Binary
- Binary is a system that uses 0s and 1s that can represent data
- Computers use binary because electricity has two states: on and off
- These 1s and 0s are called bits
Bit
- A bit is the smallest unit of data a computer can use
- A bit is either 0 or 1
- A bit can be used to store
- A colour (black/white)
- A switch (on/off)
- An answer (yes/no)
Byte
- 1 byte is 8 bits of data
- A byte can be used to store
- A number (0-255)
- A letter
Converting binary
Convert the binary number 00000011 to denary
- Each column in binary has a value: 128, 64, 32, 16, 8, 4, 2, 1
- Write the binary number into the table
- Add the columns that have a 1
| 128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 | Answer | |
| 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | = | 2 + 1 = 3 |
Convert the number 7 to binary
- Write the place values across: 128, 64, 32, 16, 8, 4, 2, 1
- Starting at the left put a 1 in a columns needed to create 7
- Put 0 in all other columns
| 128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 | ||
| 0 | 0 | 0 | 0 | 0 | 1 | 1 | 1 | = | 7 |