The binary alphabet is the set of binary codes a computer uses for the letters A to Z. Each letter is stored as one byte, a group of 8 bits, so A is 01000001 and z is 01111010. The chart above shows every letter in uppercase and lowercase, and the box turns any word into binary. Below is where these codes come from, the patterns that make them easy to remember, and how to write your name in binary.
Where the binary alphabet comes from
Computers store letters as numbers, using a standard called ASCII. It numbers the uppercase letters from 65 to 90 and the lowercase letters from 97 to 122. Writing those numbers in binary gives the binary alphabet: 65 is 1000001, so A is 01000001 once it's padded to a full byte. Almost every computer, phone and website uses the same codes, because UTF-8, the encoding behind modern text, keeps ASCII's values for the English letters. The ASCII table lists the codes for every other character too.
The pattern behind the letters
You don't have to memorize 52 codes. Every uppercase letter starts with 010 and every lowercase letter with 011. The remaining five bits are the letter's position in the alphabet, counting A as 1. A ends in 00001, M in 01101 (13) and Z in 11010 (26). So to write M, take 010, add 13 in five bits, and you get 01001101. Puzzles that number letters from A = 1 to Z = 26 are using exactly those last five bits.
Uppercase and lowercase
The only difference between a capital letter and a small one is the third bit from the left, which is worth 32. A is 65 and a is 97, Z is 90 and z is 122. In binary, 01000001 becomes 01100001: one bit flips and nothing else changes. Programs use this to change case quickly, and it's also why uppercase letters sort before lowercase ones when text is ordered by code.
How to write your name in binary
Write each letter's code in order, keeping capitals and small letters as they are. Sam is S (83), a (97) and m (109), which gives 01010011 01100001 01101101. A space between two names is a character too, 00100000, so a full name in binary is one byte per letter plus one for each space. Type your name into the box above and copy the result, or check each letter against the chart as it's highlighted.
Numbers, spaces and punctuation
Digits have their own codes, from 48 for 0 to 57 for 9. Each one is 0011 followed by the digit's own value in four bits, so 7 is 00110111. Punctuation and the space come just before them:
| Character | Code | Binary |
|---|---|---|
| Space | 32 | 00100000 |
| ! | 33 | 00100001 |
| , | 44 | 00101100 |
| . | 46 | 00101110 |
| ? | 63 | 00111111 |
| @ | 64 | 01000000 |
Reading a binary message letter by letter
The same pattern works in reverse, so you can decode short messages without a chart. Take 01001000 01001001. Both bytes start with 010, so both are uppercase letters. The last five bits of the first byte are 01000, which is 8, and the 8th letter is H. The second ends in 01001, which is 9, the letter I. The message reads HI. A byte starting with 011 would be a lowercase letter, 00100000 is a space, and a byte starting with 0011 is a digit. For longer messages, paste them into the binary to ASCII converter.
7-bit or 8-bit letters
ASCII only needs 7 bits, because its 128 codes run from 0 to 127. Computers store each character in an 8-bit byte, so the binary alphabet is usually written with a leading 0, as on this page. Some textbooks and puzzles drop it and write A as 1000001. Switch the chart to 7-bit to see that form. Both mean the same letter.
Beyond the alphabet
- Letters outside A to Z, like
éorß, aren't part of the binary alphabet. The binary translator handles them with UTF-8. - To decode a message letter by letter, use the binary to ASCII converter.
- For whole sentences in either direction, try the text to binary converter.
Try writing your initials by hand first, then check them in the box above. After a few letters, the 010 and 011 patterns start to stick.