|
Getting your Trinity Audio player ready...
|
Binary code looks intimidating — long strings of 0s and 1s with no obvious meaning. But it runs on one simple idea: every digit is worth double the one to its right. Learn that, and you can read any binary number by hand, turn letters into binary, and understand exactly how computers store text. This guide starts from zero and works up to real examples, no maths background needed.
What Is Binary Code?
Binary code is a way of writing numbers using only two digits: 0 and 1. Each digit is called a bit, short for binary digit — the smallest unit of data in computing. Think of a bit like a light switch: off (0) or on (1). Computers use binary because their circuits have two stable states, off and on, which map cleanly onto 0 and 1. Everything a computer stores — files, photos, messages — is, at the lowest level, a pattern of bits.
Bits, Bytes, and Place Values
Binary is a place-value system, exactly like the decimal numbers you count with. In decimal, each position is worth ten times the one to its right: ones, tens, hundreds. In binary, each position is worth twice the one to its right. Eight bits together make a byte, and a byte can store 256 different values (0 to 255) — enough for every letter, digit, and punctuation mark. The place values in one byte, left to right, are: 128, 64, 32, 16, 8, 4, 2, 1.
Binary is called the base-2 number system because it uses only two digits, 0 and 1. Every place value is a power of 2: 1, 2, 4, 8, 16, 32, 64, 128, and so on. The place values 128 and 64 are the ones that catch people out — 128 in binary is 10000000 and 64 in binary is 1000000, so 192 in binary is 11000000 (128 + 64). To calculate a binary number, add the place values of the 1s — that is all there is to it. A binary number is simply a number written using only 0 and 1.
How to Read Binary (Worked Examples)
To read a binary number, add up the place values wherever there is a 1 and ignore the places with a 0. Take 01001000: the 1s sit under 64 and 8. 64 + 8 = 72. That byte stores the number 72 — which, as you will see below, is the letter H. Another: 01011 has 1s under 8, 2, and 1. 8 + 2 + 1 = 11. So 01011 in binary is 11 in decimal. And the number 2 in binary is simply 10 (one 2, zero 1s).
01011 in Binary — A Worked Example
01011 in binary is 11 in decimal. Read it from right to left: the 1s sit in the 1, 2 and 8 positions, and 1 + 2 + 8 = 11. Try it yourself: cover the leftmost 0, read the remaining 1011, and add the place values.
Common Binary Numbers (0–10)
| Decimal | Binary |
|---|---|
| 0 | 0 |
| 1 | 1 |
| 2 | 10 |
| 3 | 11 |
| 4 | 100 |
| 5 | 101 |
| 6 | 110 |
| 7 | 111 |
| 8 | 1000 |
| 9 | 1001 |
| 10 | 1010 |
How Letters Become Binary — ASCII
Numbers alone do not explain text. The step from numbers to letters is a lookup table called ASCII (American Standard Code for Information Interchange). ASCII assigns every character a number from 0 to 127, and the computer stores that number as one byte. A is 65 (01000001), a is 97 (01100001), and the digit 0 is 48 (00110000). See the full ASCII binary table for every character.
How to Write Your Name in Binary
Writing text in binary is just repeating the lookup, one character at a time. Take the word “Hi”: H is 72 → 01001000, i is 105 → 01101001. So “Hi” in binary is 01001000 01101001. Try your own name with our free text to binary converter, and check the result with the binary to text converter.
Try It Yourself (Practice)
Cover the answers, work these out, then check with a converter. 1) What is 1010 in decimal? (Answer: 8 + 2 = 10.) 2) What is 111 in decimal? (Answer: 4 + 2 + 1 = 7.) 3) What is the letter L in binary? (Answer: L is ASCII 76 → 01001100.) 4) Decode 01001000 01101001. (Answer: Hi.)
Frequently Asked Questions
What is binary code? Binary code is a numbering system that uses only two digits, 0 and 1. Each digit is called a bit, and computers use it because their circuits have two states: off and on.
How do I read binary code? Add up the place values (128, 64, 32, 16, 8, 4, 2, 1) wherever there is a 1. The total is the decimal number the byte stores.
What is 01011 in binary? 01011 in binary is 11 in decimal (8 + 2 + 1).
What is 2 in binary? 2 in binary is 10 — one 2 and zero 1s.
How long does it take to learn binary? The basics — reading a byte and converting short words — take about an hour of practice. Fluency comes from doing it, not memorising tables.
Is binary code still used today? Yes. Every file, image, and message on every computer is stored as binary. You rarely see it directly, but it is still the foundation of all computing.
Binary code is not a secret language — it is just counting with two digits. Once you can add place values, you can read any byte, decode any short message, and write your own name in 1s and 0s. Keep practising with our free converters — text to binary, binary to text, and the binary decoder — or see our full text-to-binary guide for more examples.