In simple terms
A friendly intro before the formal notes — no formulas yet.
The Language of Computers
Computers only understand 'on' and 'off', represented by 1s and 0s (binary). We use clever systems to turn these simple signals into numbers, text, and all the complex data we use every day.
Imagine you only have a row of light switches. To represent the number 5, you could turn on the first and third switches (representing 1 and 4). To show the letter 'A', you might use a specific, agreed-upon pattern of on/off switches. Data representation is the set of rules for these patterns.
- 1
Denary ↔ binary using place value (powers of 2).
- 2
Hexadecimal: one digit = 4 bits — compact notation.
- 3
Characters stored as numeric codes (ASCII / Unicode).
- 4
Two's complement represents signed integers.
Explore the concept
Use the live diagram and synced steps — play it or tap a step card to walk through.
Full topic notes
Formal explanation with the rigour you need for the exam.
Number Systems: Denary, Binary, and Hexadecimal
We are accustomed to the denary (base-10) number system, which uses ten digits (0-9). Computers, however, operate on the binary (base-2) system, using only two digits: 0 and 1. Each digit in a binary number is a 'bit'. To make long binary strings more manageable for humans, we often use the hexadecimal (base-16) system. Hexadecimal uses 16 symbols: the digits 0-9 and the letters A-F (representing 10-15).
Each position in a binary number represents a power of 2 (e.g., ..., 128, 64, 32, 16, 8, 4, 2, 1).
Hexadecimal is a compact notation for binary. Each hexadecimal digit corresponds to a unique 4-bit binary sequence (a nibble).
For example, the hexadecimal digit is equivalent to the denary number 11, which is 1011 in binary.
A single byte (8 bits) can be represented by exactly two hexadecimal digits (e.g., 11111111₂ = FF₁₆ = 255₁₀).
Representing Negative Numbers: Two's Complement
Representing negative numbers in binary requires a special system. A simple approach might be to use one bit for the sign (e.g., 0 for positive, 1 for negative), known as sign-and-magnitude. However, this method has issues, including two different representations for zero (+0 and -0) and complex arithmetic logic. The standard method used by modern computers is Two's Complement. In this system, the most significant bit (MSB) of a number indicates its sign (0 for positive, 1 for negative), but it also carries a negative place value. This results in a single representation for zero and makes binary addition and subtraction straightforward for both positive and negative numbers.
To find the two's complement representation of a negative number (e.g., -X):
- Write the binary representation for the positive number (+X), ensuring it fills the required number of bits (e.g., 8 bits).
- Invert all the bits (change 0s to 1s and 1s to 0s). This is the one's complement.
- Add 1 to the result.
The range for an n-bit two's complement integer is from to .
Character Representation: ASCII and Unicode
Computers must also represent text. This is achieved by assigning a unique binary code to each character. A 'character set' is the collection of characters and their corresponding codes. The earliest widespread standard was ASCII (American Standard Code for Information Interchange), which uses 7 bits to represent 128 characters, including uppercase and lowercase English letters, numbers, and punctuation. Extended ASCII uses 8 bits for 256 characters. However, ASCII is insufficient for global languages. Unicode is the modern standard, designed to represent characters from virtually all writing systems. It can use up to 32 bits per character, allowing for over a million unique codes. UTF-8 is a popular and efficient way of encoding Unicode characters, using a variable number of bytes.
ASCII: 7-bit standard (128 characters), 8-bit extended (256 characters). Sufficient for English but not for world languages.
Unicode: A universal character set. Can represent over 1 million characters. Solves the limitations of ASCII.
Character sets map characters to unique integer values (code points). For example, in ASCII, 'A' is 65, which is 01000001 in binary.
The number of characters that can be represented is , where is the number of bits used per character.
Worked examples
See the formulas applied — reveal one step at a time, like the exam.
A computer stores a positive integer as an 8-bit binary number. Convert the denary number 173 into: (i) 8-bit binary, and (ii) hexadecimal.
- 1
(i) To convert 173 to binary, we find the largest power of 2 that fits into it and work down. Place values: 128, 64, 32, 16, 8, 4, 2, 1
Represent the denary number -58 as an 8-bit two's complement binary number.
- 1
Find the 8-bit binary for +58:
How it all connects
The big idea sits in the middle — tap a linked idea to explore the link.
Tap a linked idea to see how it connects back to the main topic — that connection is what examiners reward.
Glossary
Try to recall each definition before you reveal it.
Quick check
Answer in your head first — then tap to check. No pressure.
Revision flashcards
Flip the card. Test yourself before the exam.
What is a bit?
The smallest unit of data in a computer, representing a single binary value of either 0 or 1.
Key takeaways
Review these before you close the topic — retrieval beats re-reading.
- ✓
Each position in a binary number represents a power of 2 (e.g., ..., 128, 64, 32, 16, 8, 4, 2, 1).
- ✓
Hexadecimal is a compact notation for binary. Each hexadecimal digit corresponds to a unique 4-bit binary sequence (a nibble).
- ✓
For example, the hexadecimal digit is equivalent to the denary number 11, which is 1011 in binary.
- ✓
A single byte (8 bits) can be represented by exactly two hexadecimal digits (e.g., 11111111₂ = FF₁₆ = 255₁₀).
Practice — then mark it
The whole point: a real Cambridge question, marked mark-by-mark.
Test Your Knowledge on Data Representation
Test Your Knowledge on Data Representation
Extra simulations & links
PhET, GeoGebra and other curated tools — open in a new tab.
Frequently asked
Checkpoint
One marked question is worth ten re-reads — close the loop before you move on.
Reading it isn’t knowing it — prove it.
Before you move on: do Test Your Knowledge on Data Representation on paper, snap a photo, and get examiner-style feedback on exactly where you win and lose marks.