Certify66
← Back to Digital Techniques / Electronic Instrument Systems
Section 5.2

Numbering Systems

Binary, octal and hexadecimal numbering systems; conversion between them and decimal; binary coded decimal and two's complement for signed values.

Notes

Numbering systems, summary notes

Main ideas
  • A positional system gives each digit a weight of baseᵏ, counting k from 0 at the least-significant digit. Binary (base 2) weights are …16, 8, 4, 2, 1; octal is base 8; hexadecimal is base 16.
  • Hexadecimal digits A, B, C, D, E, F represent decimal 10, 11, 12, 13, 14, 15, not 11-16.
  • Binary converts to octal by grouping bits in THREES from the right, and to hexadecimal by grouping in FOURS from the right, padding the left-hand group with zeros.
  • BCD (binary coded decimal) encodes each decimal digit as its own 4-bit group: 29 → 0010 1001. It is not the same as the plain binary value of 29 (1 1101). BCD wastes the codes 1010-1111 but makes decimal display driving trivial.
  • Signed binary uses two's complement: invert every bit and add 1. The MSB is then the sign bit (1 = negative), and ordinary binary addition works for signed values with no special case.
  • Octal is the natural shorthand for ARINC 429 labels; hexadecimal is the natural shorthand for memory addresses and byte data.
  • ⚠ Exam trap: mis-grouping is the commonest error, octal groups in 3s, hexadecimal in 4s. Reading a hex answer as if it were BCD (or vice versa) is the second commonest.
Key formulas
Positional value (base b)
value = Σ (dₖ · bᵏ), k = 0 at the LSD
Binary place values
… 128 · 64 · 32 · 16 · 8 · 4 · 2 · 1
Binary → octal
group bits in 3s from the right
Binary → hexadecimal
group bits in 4s from the right
Two's complement (n-bit)
invert all bits, then add 1; MSB = sign
Largest value in n bits
2ⁿ − 1 (unsigned)
Solved examples
  1. Convert 1011 0110₂ to hexadecimal and to decimal.

    Group in 4s: 1011 = B and 0110 = 6, so the value is B6₁₆. In decimal, add the place values where a 1 appears: 128 + 32 + 16 + 4 + 2 = 182₁₀.

  2. Encode 45 in BCD, then represent −45 in 8-bit two's complement.

    BCD takes each decimal digit separately: 4 → 0100 and 5 → 0101, giving 0100 0101. For two's complement, +45 = 0010 1101; invert to 1101 0010; add 1 to get 1101 0011. The leading 1 confirms a negative value.

Simulation

Number-system converter

Number-System ConverterFull screen ↗
Loading simulation…
Mind map

Numbering systems concept map

Numbering Systems

Quiz

Numbering systems quiz

Numbering Systems, quiz

Ref 5.212 of 17Pass 75%
  1. 1. The binary number 1101 expressed in decimal is:

    13
    11
    26
  2. 2. The decimal number 255 expressed in hexadecimal is:

    FF
    F0
    100
  3. 3. The hexadecimal number A5 expressed in decimal is:

    165
    155
    105
  4. 4. The decimal number 27 expressed in binary is:

    11011
    11101
    10111
  5. 5. The decimal number 47 expressed in binary coded decimal (BCD) is:

    0100 0111
    0010 1111
    0100 1110
  6. 6. Convert 1101 0011₂ to hexadecimal.

    D3
    C3
    B3
  7. 7. Hexadecimal F represents which decimal value?

    15
    14
    16
  8. 8. In BCD, the decimal number 36 is encoded as:

    0011 0110
    0010 0100
    0110 0011
  9. 9. The binary number 1011 equals which decimal value?

    11
    13
    9
  10. 10. To convert binary to octal, the bits are grouped from the right in:

    Threes
    Fours
    Twos
  11. 11. Convert 0011 1010₂ to decimal.

    58
    56
    62
  12. 12. The two's complement of the 8-bit number 0010 1101 is:

    1101 0011
    1101 0010
    0010 1110