Want to write secret messages in 1s and 0s, or just understand how text becomes binary? Every letter has a fixed 8-bit binary code from the ASCII table. Here’s the complete system.
The Basic Rule
Each character = its ASCII decimal number = that number in 8-bit binary.
- Find the letter’s ASCII code (A = 65, a = 97, space = 32)
- Convert to 8-bit binary (pad with leading zeros)
That’s the entire method. Everything below is just lookup tables and practice.
Binary Alphabet: Uppercase A-Z
Uppercase letters run from 65 (A) to 90 (Z):
| Letter | Decimal | Binary |
|---|---|---|
| A | 65 | 01000001 |
| B | 66 | 01000010 |
| C | 67 | 01000011 |
| D | 68 | 01000100 |
| E | 69 | 01000101 |
| F | 70 | 01000110 |
| G | 71 | 01000111 |
| H | 72 | 01001000 |
| I | 73 | 01001001 |
| J | 74 | 01001010 |
| K | 75 | 01001011 |
| L | 76 | 01001100 |
| M | 77 | 01001101 |
| N | 78 | 01001110 |
| O | 79 | 01001111 |
| P | 80 | 01010000 |
| Q | 81 | 01010001 |
| R | 82 | 01010010 |
| S | 83 | 01010011 |
| T | 84 | 01010100 |
| U | 85 | 01010101 |
| V | 86 | 01010110 |
| W | 87 | 01010111 |
| X | 88 | 01011000 |
| Y | 89 | 01011001 |
| Z | 90 | 01011010 |
Pattern: uppercase letters all start with `010`. A is `01000001` (65 = 64 + 1), and each subsequent letter just increments.
Binary Alphabet: Lowercase a-z
Lowercase runs from 97 (a) to 122 (z) – exactly 32 more than uppercase:
| Letter | Decimal | Binary |
|---|---|---|
| a | 97 | 01100001 |
| b | 98 | 01100010 |
| c | 99 | 01100011 |
| d | 100 | 01100100 |
| e | 101 | 01100101 |
| f | 102 | 01100110 |
| g | 103 | 01100111 |
| h | 104 | 01101000 |
| i | 105 | 01101001 |
| j | 106 | 01101010 |
| k | 107 | 01101011 |
| l | 108 | 01101100 |
| m | 109 | 01101101 |
| n | 110 | 01101110 |
| o | 111 | 01101111 |
| p | 112 | 01110000 |
| q | 113 | 01110001 |
| r | 114 | 01110010 |
| s | 115 | 01110011 |
| t | 116 | 01110100 |
| u | 117 | 01110101 |
| v | 118 | 01110110 |
| w | 119 | 01110111 |
| x | 120 | 01111000 |
| y | 121 | 01111001 |
| z | 122 | 01111010 |
Pattern: lowercase starts with `011`. The only difference from uppercase is bit 6 (the 32’s place): `01000001` (A) vs `01100001` (a). Flip that one bit to change case.
Numbers, Space, and Punctuation
| Character | Decimal | Binary |
|---|---|---|
| space | 32 | 00100000 |
| 0 | 48 | 00110000 |
| 1 | 49 | 00110001 |
| 9 | 57 | 00111001 |
| ! | 33 | 00100001 |
| ? | 63 | 00111111 |
| . | 46 | 00101110 |
Pattern: digits 0-9 are `0011` followed by the 4-bit binary of the digit itself. So 5 = `0011` + `0101` = `00110101`. Easy to compute mentally.
Worked Example: Encoding "Hi"
Convert each character:
- H = 72 = 01001000
- i = 105 = 01101001
Result: `01001000 01101001`
Verification: 01001000 = 64 + 8 = 72 = ‘H’ ✓; 01101001 = 64 + 32 + 8 + 1 = 105 = ‘i’ ✓
Worked Example: Encoding "HELLO"
- H = 72 = 01001000
- E = 69 = 01000101
- L = 76 = 01001100
- L = 76 = 01001100
- O = 79 = 01001111
Result: `01001000 01000101 01001100 01001100 01001111`
Rather than hand-converting, paste any text into a binary converter for instant results – then use these tables to verify you understand the mapping.
Worked Example: Decoding Binary to Text
Take `01010100 01100101 01110011 01110100`:
- Split into bytes: `01010100` `01100101` `01110011` `01110100`
- Convert each to decimal: 84, 101, 115, 116
- Look up: 84=’T’, 101=’e’, 115=’s’, 116=’t’
Result: “Test” ✓
The Case-Flip Trick
To switch a letter’s case in binary, flip only bit 6 (the bit worth 32):
- A = `01000001` → flip bit 6 → `01100001` = a
- Z = `01011010` → flip bit 6 → `01111010` = z
This works because uppercase and lowercase are exactly 32 apart in ASCII. Programmers use this trick (XOR with 32) for fast case conversion.
Frequently Asked Questions
How do I write my name in binary?
Look up each letter in the tables above (or use a binary converter for speed). Remember: uppercase and lowercase have different codes, and spaces are `00100000`.
What is "A" in binary?
01000001 (65 decimal, 0x41 hex). It’s the most commonly referenced binary byte – the canonical example.
How many bits per letter?
8 bits (1 byte) for standard English text. Accented characters and emoji use 16-32 bits in UTF-8 encoding.
Can I type binary directly on a keyboard?
Not as input – keyboards send character codes, not raw binary. But you can write binary *text* (the characters “0” and “1”) anywhere, and use a converter to decode it back to readable text.
What's the binary for space?
00100000 (32 decimal). It’s the most common byte in English text files – which is why compression algorithms love it.