How to Read Binary Code: A Beginner's Guide

Updated · 7 min read · By the Hacker Typer team

Binary looks unreadable, but it follows one simple rule. Once you know it, you can turn 01001000 01101001 into "Hi" with nothing but addition. This guide takes you from zero to reading binary text by hand.

Binary place values 128 to 1 above the byte 01001000, which equals 72, the letter H
Check your answers: the text to binary converter translates in both directions.

What binary is

The numbers we use every day are base 10. There are ten digits, 0 to 9, and each position is worth ten times the one to its right: ones, tens, hundreds.

Binary is base 2. There are only two digits, 0 and 1, and each position is worth twice the one to its right: ones, twos, fours, eights. Computers use it because a circuit has two easy states, off and on.

One binary digit is a bit. Eight bits make a byte, and text is normally written one byte per character.

Step 1: learn the place values

For an eight-bit byte the positions are worth, from left to right:

1286432168421

Each value is double the next. This row of eight numbers is the only thing you need to memorise.

Step 2: add up the positions that hold a 1

Write the byte under the place values. Wherever there is a 1, keep that value. Wherever there is a 0, ignore it. Add what is left.

Example: 01000001

1286432168421
01000001

There is a 1 under 64 and a 1 under 1. 64 + 1 = 65.

Another: 00101101 has ones under 32, 8, 4 and 1. 32 + 8 + 4 + 1 = 45.

Step 3: turn the number into a letter

Text uses a lookup table called ASCII that gives every character a number. You do not need the whole table. Three anchors cover the alphabet:

So the byte from step 2, 65, is the letter A.

The shortcut for reading letters fast

ASCII was designed with a pattern that makes letters easy to spot without adding up the whole byte. Split each byte into its first three bits and its last five.

For the last five bits the place values are just 16, 8, 4, 2, 1. Take 011 01000: lower-case, and 01000 is 8, so it is the 8th letter, h.

Last five bitsPositionLetterLast five bitsPositionLetter
000011A0111014N
000102B0111115O
000113C1000016P
001004D1000117Q
001015E1001018R
001106F1001119S
001117G1010020T
010008H1010121U
010019I1011022V
0101010J1011123W
0101111K1100024X
0110012L1100125Y
0110113M1101026Z

Two more patterns are worth knowing. A byte starting 0011 is a digit, and its last four bits are the digit itself, so 0011 0111 is 7. And 00100000 is a space.

A full worked example

Decode 01001000 01100101 01101100 01101100 01101111.

ByteFirst threeLast fivePositionLetter
01001000010 (capital)010008H
01100101011 (lower)001015e
01101100011 (lower)0110012l
01101100011 (lower)0110012l
01101111011 (lower)0111115o

The message is Hello.

Writing a number in binary

To go the other way, work through the place values from the left. If the value fits into what remains of your number, write 1 and subtract it. If not, write 0.

Example: 77. Does 128 fit? No, 0. Does 64 fit? Yes, 1, leaving 13. 32? No. 16? No. 8? Yes, leaving 5. 4? Yes, leaving 1. 2? No. 1? Yes. Result: 01001101, which is the letter M.

Practice

Try these before looking at the answers.

  1. 01001111 01001011
  2. 01100011 01101111 01100100 01100101
  3. 00110100 00110010

Answers: 1 is "OK". 2 is "code". 3 is "42".

FAQ

How do you read binary code?

Give each of the eight positions the values 128, 64, 32, 16, 8, 4, 2 and 1 from left to right, add the values where there is a 1, then look up that number in the ASCII table to get the character.

What does 01001000 01101001 mean?

It means "Hi". 01001000 is 72, the code for capital H, and 01101001 is 105, the code for lower-case i.

Why are there eight digits in each group?

Eight bits make one byte, the standard unit computers use to store a character of basic text. Eight bits can represent 256 different values.

Is binary a language?

Not in the human sense. Binary is a number system. Text, images and programs are all stored as binary numbers, and standards such as ASCII and UTF-8 define which numbers stand for which characters.

More tools

See all tools

Keep reading