Number Systems

The Denary, Binary & Hexadecimal Number Systems

  • In Computer Science there are 3 numbering systems used to represent data:
    • Denary
    • Binary
    • Hexadecimal 

The Denary Number System

  • The denary number system, also known as the decimal system, is a base-10 numbering system that uses 10 digits: 0, 1, 2, 3, 4, 5, 6, 7, 8, and 9
  • Denary numbers can be used to represent any quantity, including whole numbers, fractions, and decimals
  • Each digit in a denary number represents a power of 10, with the rightmost digit representing 100, the next representing 101, and so on
  • It is necessary to convert data from one number system to another eg. denary to binary or denary to hexadecimal
  • It is much easier to do conversions with a table:
    • The number 3268 (three thousand two hundred and sixty-eight) can be represented in the following table:
  • (3 x 1000) + (2 x 100) + (6 x 10) + (8 x 1) = 3268

The Binary Number System

  • The binary number system is a base-2 numbering system that uses only two digits: 0 and 1
  • Each digit in a binary number represents a power of 2, with the rightmost digit representing 20, the next representing 21, and so on.
  • Eg: the number 12 represented in binary is 1100:
  • We know this as (1 x 8) + (1 x 4) + (0 x 2) + 0 x 1) =12
     

The Hexadecimal Number System:

  • The hexadecimal number system is a base-16 numbering system that uses 16 digits: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, and F where 10 is represented by A, 11 by B and so on up to 15 represented by F
  • Each digit in a hexadecimal number represents a power of 16, with the rightmost digit representing 160, the next representing 161, and so on
  • E.g. the number 146 represented in hexadecimal is 92

(0 x 4096) + (0 x 256) + (9 x 16) + (2 x 1) = 146

Loading

error: Content is protected !!