Binary and Data
Number bases, bits, bytes and compression.
Computers store everything, from numbers to photos to this sentence, as patterns of bits, each 0 or 1. Binary is base 2: each place is worth a power of two, so . Eight bits make a byte, which can hold different values.
Hexadecimal (base 16) is a compact way to write binary, with each hex digit standing for exactly four bits. Text is stored using codes such as ASCII and Unicode, images as grids of pixel colour values, and compression shrinks data either losslessly (every bit recoverable) or lossily (some detail discarded).
Key terms
- Binary place value
- Each place is a power of two.
Key ideas
- bits can represent distinct values.
- Convert decimal to binary by repeatedly dividing by 2 and reading remainders upward.
- Hex digits: 0-9 then A-F for 10-15; .
- Overflow happens when a result needs more bits than are available.
Worked example
Convert to binary and to hexadecimal.
- .
- Binary: .
- Group four bits from the right: .
- Hex: .
Answer:
Common mistakes
- Reading remainders top-down instead of bottom-up.
- Forgetting that counting starts at 0, so 8 bits reach 255, not 256.
- Assuming lossy compression can be fully undone.
Practice questions
Try each one, then open the answer. Numerical answers on this page are verified by an automated calculation check.
1.Convert to decimal.
Show answer
2.How many values can 10 bits represent?
Show answer
3.Convert to decimal.
Show answer