Data Representation & Systems Architecture
Cambridge O Level Computer Science (2210) — 2025–2027
Mastering number bases, text/sound encoding, and Von Neumann architecture mechanics.
Free preview. Enrol in Cambridge O Level Computer Science (2210) — 2025–2027 to open every lesson in this topic, watch every video and track your progress.
Topic notes
Written topic notes for this unit are being prepared. The detailed notes for every lesson in this topic are just below the video lesson.
Video lesson coming soon
The notes for this topic cover the same work. Its video lesson will appear here once it is published.
Lessons in this topic
All lessonsLEARNING OBJECTIVES
- Convert numbers between denary, binary, and hexadecimal systems.
- Explain the role of base systems in computer data storage.
- Calculate two's complement values for negative numbers.
- Identify the relationship between binary bits and hexadecimal digits.
- Apply binary addition rules to solve simple logic problems.
IN SIMPLE TERMS
This lesson teaches you how computers store information using only numbers. Computers do not understand words or images directly. They only understand electricity that is either on or off. We represent this as 1 or 0 in a system called binary. You will learn how to change these 1s and 0s into the numbers we use every day. We also study hexadecimal to make long binary codes easier for humans to read. 0 to 9 are the same, but we use letters A to F for the numbers 10 to 15. Mastering these basics is vital for your exam. Examiners use these topics for quick marks. If you can perform these conversions fast, you save time for harder theory questions. It builds the foundation for understanding how software talks to hardware. Read the provided diagrams carefully. Practice each example by hand on paper before checking the answer. Work through the patterns step by step to build your speed. This practice will make you confident during your formal assessment.
KEY TERMS YOU MUST KNOW
- Binary: A number system that uses only two digits, 0 and 1, to represent data.
- Denary: The standard number system we use daily that is based on ten digits, 0 to 9.
- Hexadecimal: A shorthand base 16 system that uses digits 0 to 9 and letters A to F.
- Bit: The smallest unit of data in a computer, represented as a single 0 or 1.
- Byte: A group of eight bits that represents a single character or value.
- Two's complement: A mathematical method used to represent negative numbers in binary.
- Base: The number of unique digits used in a counting system, such as 2, 10, or 16.
- Positional notation: A system where the value of a digit depends on its location in a number.
INTRODUCTION
Welcome to your lesson on Data Representation, specifically focusing on Binary, Hexadecimal, and Two's Complement. In the Cambridge O Level Computer Science (2210) syllabus, this is the foundational bedrock of the entire course. Examiners love this topic because it is binary and objective: you either get the mark or you do not. Proficiency here is not just about passing; it is about building the speed necessary to breeze through Paper 1, allowing you more time for the complex theory and logic questions later in the exam.
KEY CONCEPTS
Computers process everything as electrical signals that are either on or off, represented as 1 or 0. This is the Binary system (Base 2). Because binary strings are incredibly long and difficult for humans to read, we use Hexadecimal (Base 16) as a shorthand. Hexadecimal uses digits 0-9 and letters A-F, where A=10, B=11, C=12, D=13, E=14, and F=15.
The diagram above illustrates how positional notation works across different bases. In Decimal, each position to the left is a power of 10. In Binary, each position to the left is a power of 2 (1, 2, 4, 8, 16, 32, 64, 128). In Hexadecimal, each position to the left is a power of 16 (1, 16, 256, 4096). Understanding this is critical for converting between bases.
Two's Complement is the standard method for representing negative integers in binary. To find the two's complement of a positive number, you follow two steps: first, invert all the bits (the 0 becomes a 1 and the 1 becomes a 0); second, add 1 to the result. The most significant bit (the leftmost bit) acts as the sign bit: if it is 1, the number is negative. If it is 0, the number is positive.
WORKED EXAMPLE 1: BINARY TO HEXADECIMAL
Question: Convert the binary number 1101 0110 to hexadecimal. Step 1: Split the binary string into two nibbles (groups of 4 bits). 1101 and 0110. Step 2: Convert the first nibble: 1101. (1*8) + (1*4) + (0*2) + (1*1) = 8 + 4 + 1 = 13. In hex, 13 is D. Step 3: Convert the second nibble: 0110. (0*8) + (1*4) + (1*2) + (0*1) = 4 + 2 = 6. In hex, this is 6. Result: The hex representation is D6.
WORKED EXAMPLE 2: TWO'S COMPLEMENT
Question: Represent -5 in 8-bit two's complement. Step 1: Represent positive 5 in binary. 0000 0101. Step 2: Invert the bits (1's complement). 1111 1010. Step 3: Add 1 to the result. 1111 1010 + 1 = 1111 1011. Result: 1111 1011 represents -5.
WORKED EXAMPLE 3: DECIMAL TO BINARY AND HEX
Question: Convert the denary number 150 to binary and then to hex. Step 1: Find the largest power of 2 that fits into 150. That is 128. 150 - 128 = 22. Step 2: The next power of 2 is 64 (no), 32 (no), 16 (yes). 22 - 16 = 6. Step 3: The next power is 8 (no), 4 (yes), 2 (yes), 1 (no). Step 4: Putting it together: 1001 0110. Step 5: Group into nibbles: 1001 = 9, 0110 = 6. Result: 1001 0110 in binary and 96 in hex.
The diagram above shows the 8-bit structure used in standard O Level questions. Always ensure you are working within the specified bit depth. If an exam asks for an 8-bit representation, and your answer only has 4 bits, you must pad the left side with leading zeros. This is a common trap.
EXAMINER TRAPS
- Forgetting the leading zero: In an 8-bit two's complement question, if your answer is 1011, you must write 0000 1011. An examiner will mark the lack of required bit depth as incomplete.
- Confusing 1's complement with 2's complement: Many students perform the inversion but forget to add 1. Always check your work by converting the binary back to decimal to see if it matches the negative target.
- Hexadecimal letter errors: Remember that F is 15. A common mistake is thinking F is 16. In base 16, the highest single-digit value is 15.
- Sign bit confusion: In two's complement, the leftmost bit is the sign bit. If you convert a negative number and your resulting binary starts with a 0, your calculation is definitively wrong.
- Miscalculating the power of 2: Students often rush the conversion. Write the place values 128, 64, 32, 16, 8, 4, 2, 1 above your binary string to avoid simple arithmetic errors.
PAST-PAPER STYLE WALKTHROUGH
Question: Convert the denary value -42 into an 8-bit two's complement binary number. Show your working.
Step 1 (Analyze): The command word is "show your working". You must write out the steps, not just provide the final answer. Step 2 (Binary Conversion): First, convert +42 to binary. 42 = 32 + 8 + 2. Binary = 0010 1010. Step 3 (Invert): Apply the 1's complement by flipping every bit. 0 becomes 1, 1 becomes 0. 0010 1010 becomes 1101 0101. Step 4 (Add): Add 1 to the result. 1101 0101 + 1 = 1101 0110. Step 5 (Final check): Verify the sign. The result starts with 1, which correctly signifies a negative number in two's complement. Answer: 1101 0110.
The balance diagram illustrates the concept of equivalence. Just as a scale must be balanced, the value of the number must remain the same regardless of whether it is expressed in decimal, binary, or hexadecimal. If the left side (denary) and the right side (binary/hex) do not equate to the same numerical quantity, your conversion is unbalanced and therefore incorrect.
SUMMARY
Mastering binary, hexadecimal, and two's complement is essential for your O Level success. Remember that binary is the language of the hardware, and hexadecimal is the language of the programmer. Always perform your conversions methodically, use nibbles when moving between binary and hex, and always, always check your two's complement sign bit. Practice these conversions daily until they become second nature. If you can master these foundational skills, you will find the later topics like logic gates and computer architecture significantly easier to grasp. Stay disciplined with your notation and keep your working clear for the examiner. Good luck with your studies.