Fundamentals of Computers and Number Systems
This domain, Fundamentals of Computers and Number Systems, tests whether you can describe how data is represented inside a computer and convert between the bases in the syllabus: binary (base 2), octal (base 8), decimal (base 10) and hexadecimal (base 16).
Core rules
- In a positional system, each digit is worth digit × base^position, with positions counted from 0 at the right.
- Decimal to any base: repeated division by the target base, collecting remainders from last to first.
- Any base to decimal: expand powers and add.
- Binary to octal: group 3 bits; binary to hex: group 4 bits, starting at the radix point and padding with zeros.
- For n-bit 2's complement, the range is −2^(n−1) to 2^(n−1)−1. 1's complement has two zeros; 2's complement has one.
- Negative numbers: invert all bits for 1's complement, then add 1 for 2's complement.
Worked example
Convert 156₁₀ to binary and hexadecimal. Since 156 = 128 + 16 + 8 + 4, the binary form is 10011100₂. Group into nibbles from the right: 1001 1100. 1001 = 9 and 1100 = C, so the hex form is 9C₁₆. Check: 9 × 16 + 12 = 144 + 12 = 156. The same bit pattern is 234₈ because 010 011 100 groups to 2, 3, 4.
Traps that cost marks
- Reading 10011100 as a decimal number instead of a binary one. Always write the subscript.
- Forgetting to pad the leftmost group to 3 or 4 bits before converting to octal or hex.
- Assuming all n-bit patterns are positive; the leading bit is the sign bit in signed representation.
- Mixing up the direction of remainders in repeated division.
- Writing hex digits as 10–15 instead of A–F.