1.4.3 Denary → Hexadecimal (repeated division by 16)
Divide by 16.
Record the remainder (0‑9 or A‑F).
Continue with the quotient until it is 0.
Read remainders upwards.
Example: 254₁₀ → hexadecimal
Division
Quotient
Remainder
254 ÷ 16
15
14 (E)
15 ÷ 16
0
15 (F)
Result: FE₁₆
1.4.4 Hexadecimal ↔ Binary
Hex → Binary: Replace each hex digit with its 4‑bit binary equivalent.
Example: 3B₁₆ = 0011 1011₂ (or simply 11 1011₂).
Binary → Hex: Group binary digits into fours (starting from the right) and replace each group with the matching hex digit.
Example: 11010111₂ → 1101 0111 → D7₁₆.
1.4.5 Binary Addition (Unsigned)
Use the same carry rules as decimal addition.
Bit position (right‑most first)
Bits added
Sum
Carry
0
1 + 0
1
0
1
0 + 1
1
0
2
1 + 1
0
1
3
1 + 1 + carry 1
1
1
…
…
…
…
Adding 10110101₂ and 01101110₂ gives 1 0010 0001₂. In an 8‑bit register the leading “1” is discarded, leaving 0010 0001₂ = 33₁₀.
1.4.6 Overflow (Unsigned 8‑bit)
Range: 0 – 255 (0000 0000₂ to 1111 1111₂).
If addition produces a ninth bit, that bit is lost – this is **overflow**.
In an 8‑bit system the most‑significant bit (MSB) is the sign bit (0 = positive, 1 = negative).
Write the absolute value in binary (8‑bit).
Invert every bit (0→1, 1→0).
Add 1 to the inverted result.
Example – Represent –45₁₀:
45₁₀ = 0010 1101₂
Invert → 1101 0010₂
Add 1 → 1101 0011₂
Thus 1101 0011₂ encodes –45. Adding 45 and –45 yields 0000 0000₂ after discarding the carry‑out, confirming the representation.
1.4.9 Signed Binary Addition (Two’s‑Complement)
Same procedure as unsigned addition; overflow is detected when the carry into the sign bit differs from the carry out of the sign bit.
Example: –60₁₀ + 25₁₀
–60 → 1100 0100₂ (two’s‑complement)
+25 → 0001 1001₂
Sum = 1101 1101₂ → sign bit 1, so result is negative.
Invert + 1 → 0010 0011₂ = 35 → final result = –35₁₀.
1.5 Summary of 8‑bit Ranges
Representation
Range
Unsigned
0 – 255
Signed (Two’s‑Complement)
–128 – +127
2. Text, Sound and Images
2.1 Text Representation
ASCII – 7‑bit code (128 characters). Extended ASCII uses the 8th bit for additional symbols (total 256).
Unicode – 16‑bit (or 32‑bit) code point space; allows > 65 000 characters, supporting world languages.
UTF‑8 – variable‑length encoding of Unicode; compatible with ASCII for the first 128 characters.
UTF‑16 – uses one or two 16‑bit code units; common on Windows.
Why needed? Different languages need more symbols than 128; Unicode provides a universal set, while ASCII remains useful for simple English text and legacy systems.
Example: The character “A”
System
Binary
Hex
Decimal
ASCII (7‑bit)
0100 0001₂
41₁₆
65₁₀
Unicode (U+0041)
0000 0000 0100 0001₂
0041₁₆
65₁₀
2.2 Sound Representation
Sample rate – number of samples per second (Hz). CD quality = 44 100 Hz.
Lossless compression – original data can be perfectly reconstructed (e.g., ZIP, PNG). Useful for text and executable files.
Lossy compression – some data is permanently discarded to achieve higher compression ratios (e.g., JPEG, MP3). Acceptable for images, audio, video where a small loss of quality is tolerable.
Purpose: reduce storage requirements and speed up transmission.
Your generous donation helps us continue providing free Cambridge IGCSE & A-Level resources,
past papers, syllabus notes, revision questions, and high-quality online tutoring to students across Kenya.