Skip to the tool
Binary Translator Free tools

What is binary code?

Binary code writes information with just two symbols, 0 and 1. This guide shows how numbers and text become those two symbols, and how to read them back. Try it in the box first: type a word, or paste some binary.

Updated · Written and checked by Murugan Vellaichamy

Waiting for input
Text
Binary
Try:

On this page

The short answer

Binary code is a way of writing information using only two symbols, 0 and 1. Each 0 or 1 is called a bit. Computers use it because their circuits work with two states, such as a voltage being low or high, and two states are easy to tell apart reliably.

On its own a row of bits means nothing. It needs an agreed meaning: read as a whole number, as text in a character encoding such as ASCII or UTF-8, as a negative number, as a fraction, as a colour. The same eight bits, 01000001, are the number 65 and also the letter “A” in ASCII.

Counting in binary

Binary has two digits, so each place is worth twice the place to its right: 1, 2, 4, 8, 16 and so on. To read a binary number, add the place values where there is a 1: 1011 is 8 + 2 + 1 = 11. The binary number system guide covers counting, reading and a full binary chart.

Bits and bytes

Each 0 or 1 is a bit, and 8 bits make a byte. One byte has 256 different patterns, so it holds a number from 0 to 255, or one ASCII character. The bits and bytes guide explains the sizes, including why a kilobyte can mean 1,000 or 1,024 bytes.

How text becomes binary

Text is stored by giving every character a number, then writing the number in binary. ASCII, the original standard, numbers 128 characters from 0 to 127: “A” is 65, “a” is 97, a space is 32, and the codes 0 to 31 are control characters such as line feed. The ASCII table lists them all.

UTF-8 is the encoding most text uses today. It keeps the ASCII characters as the same single bytes and uses two, three or four bytes for every other character, from “é” to Chinese characters to emoji.

So “Hi” is two bytes: H is 72 and i is 105, which gives 01001000 01101001. Paste those bits into the binary translator and you get “Hi” back.

Common words in binary

WordBinary (ASCII and UTF-8)
Hello01001000 01100101 01101100 01101100 01101111
Hi01001000 01101001
Yes01011001 01100101 01110011
No01001110 01101111
OK01001111 01001011
I love you01001001 00100000 01101100 01101111 01110110 01100101 00100000 01111001 01101111 01110101

Each letter is one byte, and the space in “I love you” is 00100000. Tap a word to open it in the text to binary converter.

Reading binary code by hand

  1. Split the bits into groups of eight.
  2. For each group, add the place values 128, 64, 32, 16, 8, 4, 2 and 1 wherever there is a 1.
  3. Look each number up in the ASCII table.

A shortcut for letters: capitals start with 010 and small letters with 011, and the last five bits give the position in the alphabet (00001 is A, 11010 is Z). The binary alphabet has the full list. To practise, print a binary worksheet with an answer key.

Worked example: the letter “H”
128
64
32
16
8
4
2
1
0
1
0
0
1
0
0
0

64 + 8 = 72 = H

Where you meet binary

WhereWritten asThe bits
A web colour#FF8000 (orange)11111111 10000000 00000000: red 255, green 128, blue 0
An IPv4 address192.168.1.111000000 10101000 00000001 00000001: one 32-bit number
A letter in a text fileA01000001: ASCII code 65

A web colour such as #FF8000 is three bytes in hex, one each for red, green and blue. An IPv4 address is four bytes, usually written as four decimal numbers separated by dots. The bit workbench shows any address as its 32 bits.

Negative numbers, fractions and more

Plain binary only covers whole numbers from 0 up. Computers store negative whole numbers in two’s complement, where the leftmost bit counts as negative, and numbers with a fractional part in IEEE 754 floating point, which splits the bits into a sign, an exponent and a significand.

Programmers often write binary in hexadecimal instead, because each hex digit stands for exactly four bits: 1111 1111 is FF.

Some devices use other bit codes as well, such as Gray code, where neighbouring numbers differ in only one bit.

On our other sites

Sources and method

Questions

Is binary code a language?

Not in the sense of a spoken or programming language. It’s a way of writing data with two symbols; what the bits mean depends on the encoding or format agreed for them.

What does 01001000 01101001 mean?

Read as ASCII or UTF-8 text, it is “Hi”: 01001000 is 72 (H) and 01101001 is 105 (i).

Why do bytes have 8 bits?

Eight bits became the standard size on most computers. It’s enough for all 128 ASCII characters with a bit to spare, and two hex digits describe it exactly.

How do I translate binary code into words?

Paste it into the binary translator. It splits the bits into bytes, decodes them, and points out any byte that doesn’t decode.

More converters

Copied