Skip to content
BetterDL

Number system

Also called: numeral system, number representation, numbering system

A set of rules for writing quantities with a fixed set of digit symbols, such as decimal (base 10), binary (base 2) or hexadecimal (base 16).

A number system is an agreement about how to write an amount down. It fixes which digit symbols you may use and what each digit is worth depending on where it sits.

The amount itself doesn't depend on the system. Twelve marbles are twelve marbles whether you write 12 in decimal, 1100 in binary or C in hexadecimal. Only the spelling changes.

The systems in this course are all positional (see positional notation): each position has a weight that is a power of the radix.

  • Decimal, base 10: digits 0–9. What people use.
  • Binary, base 2: digits 0 and 1. What hardware stores, because a wire is either low or high.
  • Octal, base 8: digits 0–7. A short way to write binary in groups of 3 bits.
  • Hexadecimal, base 16: digits 0–9 and A–F. A short way to write binary in groups of 4 bits.

Not every number system is positional. Roman numerals give each symbol a fixed value (X is always ten), which is why they're so clumsy for arithmetic. Positional systems make adding, carrying and converting follow the same few rules in every base.

1
8
1
4
0
2
0
1

Worked example

Example

One amount, four spellings

Write the quantity forty-five in each of the four systems used in this course.

  1. 1.

    Decimal: 4 × 10 + 5 = 45, so 45₁₀.

  2. 2.

    Binary: 45 = 32 + 8 + 4 + 1, so 101101₂.

  3. 3.

    Octal: group the bits in threes from the right, 101 | 101, so 55₈. Check: 5 × 8 + 5 = 45.

  4. 4.

    Hex: pad to 0010 | 1101, so 2D₁₆. Check: 2 × 16 + 13 = 45.

  5. 5.

    Four different strings, one quantity.

Common mistakes

  • Thinking the digits are the amount. 10 is ten only in base 10. In binary it's two, and in hex it's sixteen.

  • Reading a number without checking its base. Look for a subscript such as ₂ or ₁₆, or a prefix such as 0x.

Practice Number system

Interactive questions with instant feedback and a worked solution for every wrong answer.

Learn it step by step

Number system is taught in Number Systems.