# Binary

1. **Binary** is a **base 2** 8-bit number system invented by Gottfried Leibniz that represents numeric values of 0 or 1, also known as OFF or ON, and is the computers primary language.Today's computers still use binary because it is the easiest and most efficient method of detecting an electrical signal as being either off or on, detecting magnetic poles with magnetic media like a hard drive, and because it is the most efficient way to control logic circuits.

In the famous saying shown on many geek t-shirts and in the picture those who understand binary will realize this quote actually says "There are only **2** types of people in the world: Those who understand binary and those who don't." because '10' in binary is two and not the decimal number ten.

Below is an example of the maximum 8-bit value of 255, which is 11111111 in binary. To get this value add each position (column), so 1 + 2 + 4 + 8 + 16 + 32 + 64 + 128 = 255.

Value: | 128 (2^{7}) | 64 (2^{6}) | 32 (2^{5}) | 16 (2^{4}) | 8 (2^{3}) | 4 (2^{2}) | 2 (2^{1}) | 1 (2^{0}) |

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

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

Below is an example of 00010110 in binary, which is 104 (8 + 32 + 64)

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

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

Tip: When the computer reads binary it is reading from the right-to-left, so in the above example the computer is actually reading "00010110" and not "01101000" as shown above. If you took the binary 104 into ASCII it would a lowercase "h" and if you wanted to say "hi" in binary it would be "0110100001101001."

## Convert text into binary

Use the below convert tool to convert 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