Text to Binary Converter
Appliance Location: The Spice Rack Encoding ToolWhat is Binary Code?
Binary code is a base-2 numeral system that uses only two digits: 0 and 1. Computers use binary because transistors (the building blocks of processors) have two states: ON (1) and OFF (0). Every piece of data on your computer — text, images, videos, programs — is ultimately stored and processed as binary numbers.
In text encoding, each character (letter, number, symbol) is represented by a unique 8-bit binary sequence. This standard is called ASCII (American Standard Code for Information Interchange). For example, the letter 'A' is 01000001, 'B' is 01000010, and space is 00100000.
ASCII to Binary Reference Table
| Character | ASCII Code (Decimal) | Binary (8-bit) | Description |
|---|---|---|---|
A | 65 | 01000001 | Uppercase A |
B | 66 | 01000010 | Uppercase B |
C | 67 | 01000011 | Uppercase C |
a | 97 | 01100001 | Lowercase a |
b | 98 | 01100010 | Lowercase b |
0 | 48 | 00110000 | Digit zero |
1 | 49 | 00110001 | Digit one |
space | 32 | 00100000 | Space character |
How to Manually Convert Text to Binary
Follow these steps to convert any text to binary without a calculator:
- Step 1: Find the ASCII code for each character (A=65, B=66, a=97, space=32).
- Step 2: Convert each decimal number to binary using division by 2.
- Step 3: Pad each binary result to 8 bits (add leading zeros).
- Step 4: Combine all binary sequences with spaces for readability.
Example: Convert "Hi" to binary
'H' = ASCII 72 -> 72 / 2 = 36 remainder 0, continue -> binary 01001000
'i' = ASCII 105 -> 105 / 2 = 52 remainder 1, continue -> binary 01101001
Result: 01001000 01101001
Binary Number System Basics
| Decimal | Binary (4-bit) | Binary (8-bit) | 2^n Explanation |
|---|---|---|---|
| 0 | 0000 | 00000000 | 0x128 + 0x64 + 0x32 + 0x16 + 0x8 + 0x4 + 0x2 + 0x1 |
| 1 | 0001 | 00000001 | 0x128 + ... + 1x1 |
| 2 | 0010 | 00000010 | 0x128 + ... + 1x2 + 0x1 |
| 4 | 0100 | 00000100 | 0x128 + ... + 1x4 |
| 8 | 1000 | 00001000 | 0x128 + ... + 1x8 |
| 16 | 0001 | 00010000 | 1x16 + 0x8 + 0x4 + 0x2 + 0x1 |
| 32 | 0010 | 00100000 | 1x32 + 0x16 + 0x8 + 0x4 + 0x2 + 0x1 |
| 64 | 0100 | 01000000 | 1x64 + 0x32 + ... |
Frequently Asked Questions
What is ASCII code?
ASCII (American Standard Code for Information Interchange) is a character encoding standard that assigns unique numbers (0-127) to letters, digits, punctuation marks, and control characters. Extended ASCII adds 128-255 for additional symbols.
Why is binary always shown in 8-bit groups?
Computers use 8-bit bytes as the basic addressable unit of memory. One byte can store one ASCII character (0-255). 8-bit binary representation makes it easy to see exactly how the character is stored in computer memory.
How do I convert binary back to text?
Split the binary string into 8-bit chunks, convert each chunk to decimal (ASCII code), then map each decimal to its character. Use our companion tool "Binary to Text Decoder" for the reverse operation.
What is the difference between binary, decimal, and hexadecimal?
Binary uses base-2 (0,1), decimal uses base-10 (0-9), and hexadecimal uses base-16 (0-9, A-F). Computers use binary internally, but programmers often use hex because it's more compact (one hex digit = 4 binary bits).
Is this converter accurate for all characters?
Yes. The converter uses JavaScript's built-in charCodeAt() method, which returns the correct Unicode code point for every character. Standard ASCII characters (0-127) produce 8-bit binary.