Featured image

Table of Contents Link to heading

Binary Numbering Link to heading

All computer data is represented using the binary number system.

Binary is base 2 and works with two digits, 0 and 1.

Binary numbers have some distinct advantages:

  • The simplicity of addition and subtraction
  • Binary information is easier to process due to having only two states (1 for ‘on’, 1 for ‘off’)
  • Less space consumed

Binary numbers are positional and each digit represents 2n, where n, starting from 0, is the position from the right.

Binary to Decimal Link to heading

Positional Notation Link to heading

Since there are 2 digits, each position represents a power of 2.

PositionBinaryDecimal
8th127 = 128
7th126 = 64
6th125 = 0
5th124 = 16
4th123 = 0
3rd122 = 0
2nd121 = 2
1st120 = 1

For example, to convert 110100112 to decimal.

PositionBinaryDecimal
8th1128
7th164
6th00
5th116
4th00
3rd00
2nd12
1st11

1101001110 = 1ร—27 + 1ร—26 + 1ร—24 + 1ร—21 + 1ร—20 = 12810 + 6410 + 1610 + 210 + 110 = 21110

Doubling Link to heading

Take each leftmost value, multiplied by 2 and added to the next value.

110100112

  1. 0ร—2 + 1 = 1
  2. 1ร—2 + 1 = 3
  3. 3ร—2 + 0 = 6
  4. 6ร—2 + 1 = 13
  5. 13ร—2 + 0 = 26
  6. 26ร—2 + 0 = 52
  7. 52ร—2 + 1 = 105
  8. 105ร—2 + 1 = 21110

Decimal to Binary Link to heading

PositionColumn ValueDecimalCompared to Column ValueResulting ActionBinary
8th128211Less than 256 but more than 128Mark a 1 for the 8th column and then subtract 128 from 2151
7th6487More than 64Mark a 1 for the 7th column then subtract 64 from 871
6th023Less than 32Mark a 0 for the 6th column0
5th1623More than 16Mark a 1 for the 5th column and then subtract 16 from 231
4th07Less than 8Mark a 0 for the 4th column0
3rd07More than 4Mark a 1 for the 3rd column and then subtract 4 from 71
2nd23More than 2Mark a 1 for the 2nd column and then subtract 2 from 31
1st11Equal to 1Mark a 1 for the 1st column1

Binary to Hexadecimal Link to heading

Read at ๐Ÿ”—

Hexadecimal to Binary Link to heading

Read at ๐Ÿ”—