GameParticles
Numbers & units

How to Read Binary: Numbers, Bits, Bytes and ASCII Text

Learn how to read binary: count in binary numbers, group bits into bytes, and decode 8-bit patterns such as 01001000 into letters with a simple ASCII chart.

Updated

To read binary, give each digit a place value that doubles from right to left (1, 2, 4, 8, 16, 32, 64, 128) and add up the place values wherever there is a 1. So 01000001 is 64 + 1, which is 65. If the binary stands for text, split it into groups of eight bits, turn each group into a number, and look the number up in an ASCII chart, where 65 is the letter A.

Bits, bytes and nibbles

A bit is one binary digit: a 0 or a 1. On its own a bit can only answer a yes or no question, so bits are used in groups.

  • 4 bits make a nibble, which holds 16 values (0 to 15).
  • 8 bits make a byte, which holds 256 values (0 to 255).
  • 16 bits hold 65,536 values, and 32 bits hold 4,294,967,296.

Each extra bit doubles the number of possible patterns. The byte is the unit that matters most, because files, memory and text are all measured and addressed in bytes. For how bits and bytes show up in internet speeds and file sizes, see Bits vs Bytes.

Counting in binary

Counting works like a car odometer with only two digits on each wheel. The rightmost column flips on every step. When a column rolls over from 1 to 0, it carries into the column on its left.

DecimalBinaryDecimalBinary
0000081000
1000191001
20010101010
30011111011
40100121100
50101131101
60110141110
70111151111

Look down each column of bits and a rhythm appears. The ones column alternates every row. The twos column alternates every two rows, the fours column every four, and the eights column every eight.

You can count this way on your fingers. Treat each finger as a bit, down for 0 and up for 1. One hand reaches 31 and two hands reach 1,023.

Reading a binary number

Take the byte 01101001. Write the place values underneath and keep the ones that sit under a 1.

Bit01101001
Place value1286432168421

The ones are under 64, 32, 8 and 1. Adding them gives 105.

That is the whole skill. Longer numbers just have more columns. The guide to Binary to Decimal covers shortcuts, larger values and negative numbers, and Decimal to Binary goes the other way.

Reading binary as text

Binary has no built-in meaning. The byte 01101001 is the number 105, and whether that is a quantity, a shade of red or a letter depends on the agreement between whoever wrote it and whoever reads it. For text, the oldest and most widespread agreement is ASCII, which assigns a number from 0 to 127 to each English letter, digit and punctuation mark. In ASCII, 105 is a lowercase i.

CharacterDecimalBinary
space3200100000
04800110000
95700111001
A6501000001
B6601000010
C6701000011
Z9001011010
a9701100001
b9801100010
z12201111010

The pattern that saves you the chart

ASCII was laid out so that the bits themselves tell you what kind of character you are looking at. Split each byte into its first three bits and its last five.

  • Starts with 010: an uppercase letter. The last five bits are its position in the alphabet, so 00001 is A, 00010 is B and 11010 (26) is Z.
  • Starts with 011: a lowercase letter, with the same last five bits. 01100001 is a.
  • Starts with 0011: a digit. The last four bits are the digit's own value, so 00110111 is 7.
  • 00100000: a space.

Upper and lower case differ by a single bit, the one worth 32. That is why A is 65 and a is 97.

Worked example: decoding a word

Decode 01001000 01100101 01101100 01101100 01101111.

  1. 01001000 starts with 010, so it is uppercase. The last five bits, 01000, are 8. The eighth letter is H.
  2. 01100101 starts with 011, so it is lowercase. 00101 is 5: e.
  3. 01101100 is lowercase. 01100 is 12: l.
  4. 01101100 again: l.
  5. 01101111 is lowercase. 01111 is 15: o.

The message is "Hello". If a binary string arrives without spaces, count off eight bits at a time from the left.

Beyond ASCII

ASCII only covers 128 characters. Modern text uses UTF-8, which keeps every ASCII character as the same single byte and adds accented letters, other scripts and emoji as sequences of two to four bytes. In UTF-8, any byte that begins with 0 is plain ASCII, and bytes that begin with 1 belong to a longer sequence. So the method above reads English text correctly, and anything else needs a UTF-8 decoder.

Long runs of bits are hard on the eyes, which is why programmers usually write each byte as two base 16 digits instead. What Is Hexadecimal explains that shorthand.

Checking your reading with the converter

The Number Base Converter converts numbers, not text, so it will not turn a whole binary message into words. It is still the quickest way to check each byte. Type 01001000 into the binary field and the decimal field shows 72, which you can look up as H. The same screen shows the hex form, 48, and the bit length.

To go the other way, type a character's ASCII number into the decimal field and read its bits from the 8-bit row of the binary panel, already padded with leading zeros.

Try it

Open the Number Base Converter, type 1 into the binary field, and keep adding digits to watch the decimal value double with each 0 you append. Then decode this one yourself, a byte at a time: 01000010 01101001 01110100.

Tools in this guide

Frequently asked questions

What are binary numbers?

Binary numbers are numbers written in base 2, using only the digits 0 and 1. Each position is worth twice the one to its right: 1, 2, 4, 8 and so on. Computers use binary because a circuit can reliably tell two states apart, such as on and off.

How do you read binary code as text?

Split the binary into groups of eight bits. Convert each group to a decimal number by adding its place values, then look that number up in an ASCII chart. For example, 01001000 is 72, which is H, and 01101001 is 105, which is i.

What is the difference between a bit and a byte?

A bit is a single binary digit, either 0 or 1. A byte is a group of eight bits. One byte can hold 256 different values, from 0 to 255, which is enough for one basic text character.

How do you count to 10 in binary?

One to ten in binary is 1, 10, 11, 100, 101, 110, 111, 1000, 1001, 1010. The rightmost digit flips on every step, and each time a column goes from 1 back to 0, the column to its left flips too.

More numbers & units guides

JSON Formatter
Developer · Format, validate and minify JSON with syntax highlighting.
↵
Base64 Encode / Decode
Developer · Encode text to Base64 or decode Base64 back to plain text.
↵
URL Encoder / Decoder
Developer · Encode or decode URL components and query strings.
↵
Hash Generator
Developer · Generate MD5, SHA-1, SHA-256 and SHA-512 hashes.
↵
UUID Generator
Developer · Generate UUIDs v4 (random) in bulk with one click.
↵
Regex Tester
Developer · Test regular expressions against text with live match highlighting.
↵
Word Counter
Text · Count words, characters, sentences, paragraphs and reading time.
↵
Case Converter
Text · Convert text between UPPER, lower, Title, camelCase, snake_case and more.
↵
List Sorter
Text · Sort, reverse, deduplicate and shuffle lists of text.
↵
Markdown Preview
Text · Write Markdown and see a live rendered preview side by side.
↵
Percentage Calculator
Numbers · Calculate percentages, increases, decreases and what % one number is of another.
↵
Color Converter
Colors · Convert colors between HEX, RGB, HSL and HSV instantly.
↵
Snake
Arcade · Eat food, grow longer, don't hit the walls. A timeless classic.
↵
2048
Puzzle · Slide tiles and combine them to reach the legendary 2048 tile.
↵
Word Grid
Puzzle · Guess the hidden five letter word in six tries using color clues.
↵
Sudoku
Puzzle · Fill the 9x9 grid with logic. Four difficulties from easy to expert.
↵
Minesweeper
Strategy · Use number clues to clear the minefield. Classic logic, three levels.
↵
Breakout
Arcade · Smash every brick with paddle and ball. Power-ups, combos, endless levels.
↵
Typing Practice
Casual · Build your WPM and accuracy with timed drills from 30 seconds to 5 minutes. Find your weak keys.
↵
TypeRunner
Arcade · Multiplayer typing race. Race friends by link, beat computer runners, or chase your own ghost.
↵
Typing Blocks
Arcade · Type each word before its wooden block lands. Miss, and the pile climbs toward the line.
↵
Bubble Shooter
Arcade · Aim, bank shots off the walls, and pop groups of three or more bubbles.
↵
Road Rush
Arcade · Race seven rivals through traffic and punch your way to the front.
↵