Independent reviewer · not a CSC or DICT publicationSign in to practice

Study notes · Number systems · DICT

Number Systems

Computers store everything in binary; octal and hexadecimal are compact ways to write binary. Conversions are mechanical once you know positional value.

2023 FAQ (copy)Scope: Binary, octal, decimal and hexadecimal representation and conversion.

§1 Positional value

In base b, each digit is multiplied by b raised to its position (starting at 0 on the right). 175₈ = 1·8² + 7·8¹ + 5·8⁰ = 125.

§2 Conversion methods

From → ToMethod
Decimal → base bDivide repeatedly by b; read remainders bottom to top
Base b → decimalSum digit × bᵖᵒˢⁱᵗⁱᵒⁿ
Binary ↔ hexGroup bits in fours from the right (1011 0111 = B7)
Binary ↔ octalGroup bits in threes from the right (101 110 = 56₈)
Decimal fraction → binaryMultiply the fraction by 2; record integer parts top to bottom

§3 Signed numbers

§4 Worked examples

Example 1

Convert 156₁₀ to binary and hexadecimal.

  1. 156 ÷ 2 → remainders 0,0,1,1,1,0,0,1 (bottom to top: 10011100).
  2. Group in fours: 1001 1100 = 9C.

Answer 10011100₂ = 9C₁₆

! Common traps

  • Reading remainders in the wrong direction.
  • Forgetting that A–F stand for 10–15 in hexadecimal.