Unable to open this exercise
In Cambridge IGCSE Computer Science, all data inside a digital computer is processed and stored in binary format (base 2) using discrete electrical voltage states: $0$ (low voltage / off) and $1$ (high voltage / on).
Learning Objectives
- Understand why computers use binary representation for instructions and data.
- Convert positive integers between Denary (base 10), Binary (base 2), and Hexadecimal (base 16) up to 16-bit values.
- Explain the practical benefits and applications of hexadecimal representation in computer science.
Core Syllabus Theory
1. The Three Number Bases
System | Base | Allowed Digits / Symbols | Example Value |
|---|---|---|---|
Binary | Base 2 | $0, 1$ | $10110010_2$ |
Denary (Decimal) | Base 10 | $0, 1, 2, 3, 4, 5, 6, 7, 8, 9$ | $178_{10}$ |
Hexadecimal | Base 16 | $0\text{--}9, \text{A}(10), \text{B}(11), \text{C}(12), \text{D}(13), \text{E}(14), \text{F}(15)$ | $\text{B}2_{16}$ |
2. Conversion Methods
A. Binary to Denary
Construct an 8-bit binary positional place value table:
B. Denary to Binary (Successive Subtraction or Division by 2)
To convert $109_{10}$ to 8-bit binary:
- $109 \ge 64 \rightarrow \text{place 1 at 64, remainder } 45$
- $45 \ge 32 \rightarrow \text{place 1 at 32, remainder } 13$
- $13 \ge 8 \rightarrow \text{place 1 at 8, remainder } 5$
- $5 \ge 4 \rightarrow \text{place 1 at 4, remainder } 1$
- $1 \ge 1 \rightarrow \text{place 1 at 1, remainder } 0$
C. Binary to Hexadecimal (4-bit Nibble Grouping)
Group the binary string into 4-bit nibbles from right to left:
3. Why Hexadecimal is Used
- Human Readability: Hexadecimal strings are significantly shorter than binary (e.g. 8 binary bits condense into 2 hex digits), making them much easier for humans to read, write, and remember.
- Error Reduction: Shorter strings drastically reduce transcription errors when programmers copy memory addresses or byte values.
- Direct Nibble Mapping: Each hexadecimal digit corresponds exactly to one 4-bit binary nibble ($2^4 = 16$), making conversion between binary and hex instantaneous without complex calculations.
4. Common Hexadecimal Applications
- HTML/CSS Colour Codes:
#FF0000(Red),#00FF00(Green),#0000FF(Blue) — 24-bit true colour represented as 6 hex digits. - MAC Addresses: Physical hardware identifiers formatted as 12 hex digits (e.g.
00:1A:2B:3C:4D:5E). - Memory Dumps & Debugging: Displaying contents of RAM when troubleshooting system crashes or buffer overflows.
- IPv6 Addresses: 128-bit network addresses formatted in 8 groups of 4 hexadecimal digits.
Exam Tips & Common Pitfalls
Note: Pad to 8 Bits: In exam questions, always write binary answers as full 8-bit bytes (e.g. write
00101101rather than101101) unless instructed otherwise.
Key Terminology Glossary
- Bit: A binary digit, the smallest unit of digital data ($0$ or $1$).
- Nibble: A group of 4 binary bits (equivalent to 1 hexadecimal digit).
- Byte: A group of 8 binary bits (capable of representing $2^8 = 256$ distinct values).
Written practice and self-review
Identify two distinct reasons why computer scientists use hexadecimal notation instead of binary when displaying MAC addresses or memory addresses. Explain why this representation does NOT reduce the amount of physical storage required by the computer.
Write an explanation before checking the theory. Check that each claim answers the question, uses the correct concept and explains why it applies. Discuss uncertain points with a teacher. The structured exercise below checks specific facts; it does not automatically mark this explanation.
AI Socratic Tutor
Need guidance? Ask a question or use the hint below.
AI Socratic Tutor is an All-Access Benefit
Unlock step-by-step Socratic hints, algorithm trace table walkthroughs, and error diagnostics for every Cambridge exercise.
You're chatting with an AI tutor, not a person. AI can make mistakes, so double-check its answers.
Application: Check the reasoning
Application: Check the reasoning
- Hexadecimal 3A in denary: [Space 1]
- Denary 241 in hexadecimal: [Space 2]
- Hexadecimal 9C as eight binary digits: [Space 3]
Sign in or create a free account to test your solution and track XP.