# Binary

1. **Binary** is a **base 2**, 8-bit number system invented by Gottfried Leibniz where numeric values are represented by different combinations of 0 and 1, also known as OFF or ON. The primary language of computers, binary is still used in today's machines because its simple and elegant design. Binary's 0 and 1 method is efficient at detecting an electrical signal's off or on state, or magnetic poles in media like hard drives. It is also the most efficient way to control logic circuits.

The second image shows a simple example of binary via a famous saying on many geek t-shirts. Those who can read binary will realize this quote actually says "There are only *two* types of people in the world: Those who understand binary and those who don't." In the binary system, '10' is actually two, not the number ten.

## How to read binary numbers

The following chart illustrates the binary number 01101000. Each column represents the number two raised to an exponent, with that exponent's value increasing by one as you move through each of the eight positions. In this example, we get the total value by reading the chart from **right to left** and adding each column's value to that of the previous column: (8+32+64) = 104. As you'll notice, we don't count the bits with a 0 because they're "turned off."

Exponent: |
2^{7} |
2^{6} |
2^{5 } |
2^{4 } |
2^{3} |
2^{2 } |
2^{1} |
2^{0} |

Value: | 128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 |

ON/OFF: | 0 | 1 | 1 | 0 | 1 | 0 | 0 | 0 |

The next example is 11111111 in binary, the maximum 8-bit value of 255. Again, reading right to left we have 1 + 2 + 4 + 8 + 16 + 32 + 64 + 128 = 255.

Note: Counting on a computer normally starts with 0 instead of 1. Therefore, counting all the bits does equal 255, but if you start at 0, it is really 256.

Value: | 128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 |

ON/OFF: | 0 | 1 | 1 | 0 | 1 | 0 | 0 | 0 |

Tip: If you took the binary code from the first example (which totaled 104) and put it into ASCII, it would produce a lowercase *h*. To spell the word *hi*, you would need to add the binary for the letter *i*, which is 01101001. Putting these two codes together, we have 0110100001101001 or 104 and 105; *hi*.

## Convert text into binary

The following tool converts any text into binary.

2. While in an FTP session, **binary**, is a command that switches the file transfer mode to binary. See the how to use ftp help page for information about binary and other FTP commands.

**Also see:** .BIN, Base, BCD, Binary file, Bit, Decimal, Hexadecimal, Least significant bit, Machine language, Most significant bit, Native language, Negation, Nibble, Octal, OFF, ON, Qubit, Two's complement