## The binary (aka Base 2) number system was invented by Gottfried Leibniz in 1679 and uses just two symbols for counting and expressing value.

### Binary Symbols and Values

In the binary number system, the symbols 0 and 1 represent values zero to one. Binary values are usually represented by the subscript '2', subscript 'b', subscript 'B', preceding 'bin', preceding '% 'or preceding '0b'.

#### Binary Symbols Table

Decimal Value | Binary Symbol | Possible Binary Value Representations |
---|---|---|

0 | 0 | `0` or `0` or `0` or `bin 0` or `%0` or `0b0` |

1 | 1 | `1` or `1` or `1` or `bin 1` or `%1` or `0b1` |

### Binary Digits

Similar to the base 10 system, the left most digit within a binary number is the least significant digit (LSD) and has the lowest place value. As further the digits move to the right, as higher the place value becomes. The right most digit within a binary number is the most significant digit (MSD) and has the highest place value.

#### Binary Place Values

7. Digit From Left | 6. Digit From Left | 5. Digit From Left | 4. Digit From Left | 3. Digit From Left | 2. Digit From Left | Left Most Digit | |
---|---|---|---|---|---|---|---|

Power of 2 (`2` ): | `2` | `2` | `2` | `2` | `2` | `2` | `2` |

Place Value: | `64` | `32` | `16` | `8` | `4` | `2` | `1` |

Place values are shown in decimal (base 10) number system as this is the number system we are most familiar with.

### Binary Number Line

Example of a number line displaying binary numbers from `-10`

to _{2}`1100`

only:_{2}

The subscript '2' is not required as the number line is labelled 'Binary Number Line' and is omitted for clarity.

### Binary Counting

#### Counting Bananas in Binary

In above image, let us count all the bananas in binary. We count as follows:

1 … That's it, there is just `1`

banana in above image!_{2}

#### Counting Pears in Binary

Now let us count all the pears in binary. We count as follows:

1 … 10 … 11 … That's it, there are `11`

pears in above image! Remember not to say eleven, as this would be the decimal pronunciation. Call the number digit by digit, e.g. one – one binary._{2}

#### Counting Apples in Binary

We can also count all the apples in binary. We count as follows:

1 … 10 … 11 … 100 … 101 … 110 … 111 … 1000 … 1001 … 1010 … 1011 … 1100 … That's it, there are `1100`

apples in above image! Again remember not to say one thousand and one hundred, as this would be the decimal pronunciation. Call the number digit by digit, e.g. one – one – zero – zero binary._{2}

#### Counting All Pieces of Fruit in Binary

Finally we count all the pieces of fruit in binary, count as follows:

1 … 10 … 11 … 100 … 101 … 110 … 111 … 1000 … 1001 … 1010 … 1011 … 1100 … 1101 … 1110 … 1111 … 10000 … That's it, there are a total of `10000`

pieces of fruit in above image! Don't say ten thousand, just call it e.g. one – zero – zero – zero – zero binary._{2}

### Binary Numbers in Computing

The internal working of almost every modern computing device is based on the binary number system. All CMOS and TTL logic gates operate on simple on or off states that can be noted as binary numbers.