How decimal converts to binary
Divide by 2, write down the remainder, repeat with the quotient, then read the remainders from the bottom up. Converting 300 to binary:
| Step | Division | Quotient | Remainder (bit) |
|---|---|---|---|
| 1 | 300 ÷ 2 | 150 | 0 |
| 2 | 150 ÷ 2 | 75 | 0 |
| 3 | 75 ÷ 2 | 37 | 1 |
| 4 | 37 ÷ 2 | 18 | 1 |
| 5 | 18 ÷ 2 | 9 | 0 |
| 6 | 9 ÷ 2 | 4 | 1 |
| 7 | 4 ÷ 2 | 2 | 0 |
| 8 | 2 ÷ 2 | 1 | 0 |
| 9 | 1 ÷ 2 | 0 | 1 |
Reading the remainder column bottom to top gives 100101100, so 300 in decimal is 100101100 in binary. Going the other way, multiply each bit by its place value and add: 1×256 + 0×128 + 0×64 + 1×32 + 0×16 + 1×8 + 1×4 + 0×2 + 0×1 = 300.
Powers of two
Every binary place value is a power of two, which is why these numbers turn up constantly in memory sizes, colour depths, and address ranges.
| Exponent | Decimal | Hex | Binary |
|---|---|---|---|
| 2^0 | 1 | 0x1 | 1 |
| 2^1 | 2 | 0x2 | 10 |
| 2^2 | 4 | 0x4 | 100 |
| 2^3 | 8 | 0x8 | 1000 |
| 2^4 | 16 | 0x10 | 10000 |
| 2^5 | 32 | 0x20 | 100000 |
| 2^6 | 64 | 0x40 | 1000000 |
| 2^7 | 128 | 0x80 | 10000000 |
| 2^8 | 256 | 0x100 | 100000000 |
| 2^9 | 512 | 0x200 | 1000000000 |
| 2^10 | 1,024 | 0x400 | 10000000000 |
| 2^11 | 2,048 | 0x800 | 100000000000 |
| 2^12 | 4,096 | 0x1000 | 1000000000000 |
| 2^13 | 8,192 | 0x2000 | 10000000000000 |
| 2^14 | 16,384 | 0x4000 | 100000000000000 |
| 2^15 | 32,768 | 0x8000 | 1000000000000000 |
| 2^16 | 65,536 | 0x10000 | 10000000000000000 |
| 2^20 | 1,048,576 | 0x100000 | 1 followed by 20 zeros |
| 2^24 | 16,777,216 | 0x1000000 | 1 followed by 24 zeros |
| 2^32 | 4,294,967,296 | 0x100000000 | 1 followed by 32 zeros |
ASCII reference
The table below covers the ASCII range, where each character is one byte. Switch the input base above to Text to convert a whole string at once: ASCII characters still take one byte each, but the tool encodes the full Unicode range as UTF-8, where a character can take one to four bytes (for example, é encodes as two bytes, C3 A9).
| Character | Decimal | Binary (8-bit) | Hex |
|---|---|---|---|
| A | 65 | 01000001 | 0x41 |
| B | 66 | 01000010 | 0x42 |
| C | 67 | 01000011 | 0x43 |
| M | 77 | 01001101 | 0x4D |
| Z | 90 | 01011010 | 0x5A |
| a | 97 | 01100001 | 0x61 |
| b | 98 | 01100010 | 0x62 |
| c | 99 | 01100011 | 0x63 |
| m | 109 | 01101101 | 0x6D |
| z | 122 | 01111010 | 0x7A |
| 0 | 48 | 00110000 | 0x30 |
| 5 | 53 | 00110101 | 0x35 |
| 9 | 57 | 00111001 | 0x39 |
| space | 32 | 00100000 | 0x20 |
| ! | 33 | 00100001 | 0x21 |
| ? | 63 | 00111111 | 0x3F |
Why hex is shorter than binary
One hex digit covers exactly four bits, so hex is binary written four bits at a time - which is why memory addresses and colour codes use it. 1111 1111 is FF is 255. Octal works the same way with three bits per digit, which is why Unix file permissions read as three octal digits: 755 is 111 101 101.
What is binary?
Binary is base 2: it writes every number using only 0 and 1. Each position is worth twice the one to its right, so where decimal counts in ones, tens, and hundreds, binary counts in ones, twos, fours, and eights. Computers use it because a circuit only has to tell two states apart, off and on, rather than ten.
How to use this converter
- 1
Type your value
Enter the number or text you want to convert in the Input Value field.
- 2
Pick the base you are starting from
Set Input Base to match what you typed: Decimal, Binary, Octal, Hexadecimal, or Text.
- 3
Read every other representation
The results update as you type and show all the remaining bases at once, so you do not choose a target base.
- 4
Copy what you need
Copy the line you want straight from the results.
There is no target base to choose. Whatever you put in, the converter shows all the other representations at the same time.
Binary to decimal: 10110101
Give each bit its place value, then add the ones sitting above a 1.
| Bit | 1 | 0 | 1 | 1 | 0 | 1 | 0 | 1 |
|---|---|---|---|---|---|---|---|---|
| Place value | 128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 |
Adding the highlighted values: 128 + 32 + 16 + 4 + 1 = 181. So binary 10110101 is 181 in decimal.
Binary to hexadecimal: 10110101 to B5
Hex is quicker than going through decimal, because one hex digit is exactly four bits. Split the byte into two groups of four and convert each on its own: 1011 is 8 + 2 + 1, which is 11, written B. Then 0101 is 4 + 1, which is 5. Put them back together and 10110101 is B5. Checking against the decimal above, B5 is 11 times 16 plus 5, which is 181.
Binary to text: reading bytes as ASCII
Text mode reads eight bits at a time and looks each byte up as a character. Take 01001000 01101001. The first byte is 64 + 8, which is 72, and 72 is the letter H. The second is 64 + 32 + 8 + 1, which is 105, the letter i. Together they spell Hi. Set Input Base to Binary and paste both bytes to see the same result.
Negative numbers: two’s complement
This converter takes non-negative values only, so negatives are worth understanding by hand. Computers store them in two’s complement: write the positive value, flip every bit, then add 1. For -5 in eight bits, +5 is 00000101, flipping every bit gives 11111010, and adding 1 gives 11111011.
Those same eight bits are 251 when read as an unsigned number, which is what this tool will show you if you enter them. Whether the byte means -5 or 251 depends entirely on which convention the program reading it uses, and nothing in the bits themselves records the choice.
Quick reference
Decimal 0 to 15 in binary and hex
| Decimal | Binary | Hex |
|---|---|---|
| 0 | 0000 | 0 |
| 1 | 0001 | 1 |
| 2 | 0010 | 2 |
| 3 | 0011 | 3 |
| 4 | 0100 | 4 |
| 5 | 0101 | 5 |
| 6 | 0110 | 6 |
| 7 | 0111 | 7 |
| 8 | 1000 | 8 |
| 9 | 1001 | 9 |
| 10 | 1010 | A |
| 11 | 1011 | B |
| 12 | 1100 | C |
| 13 | 1101 | D |
| 14 | 1110 | E |
| 15 | 1111 | F |
Frequently asked questions
Related converters
- ASCII Converter Look up character codes on their own, in decimal, hex, and binary.
- Base64 Encoder Encode bytes for a URL, an email header, or a data URI.
- Data Storage Converter Convert bits and bytes into KB, MB, GB, and back.
- Roman Numeral Converter Another positional-to-symbolic conversion, for dates and numbering.
Last reviewed: September 2026
How do you convert binary to decimal?
To convert binary to decimal, multiply each digit by its power of two and add the results: 1011 becomes 8 + 0 + 2 + 1 = 11. To convert text to binary instead, each character maps to its 8-bit code - "Hi" is 01001000 01101001 in ASCII.
How do you convert decimal to binary?
To convert decimal to binary, divide the number by 2 repeatedly and read the remainders bottom to top. For 11: 11÷2 = 5 r1, 5÷2 = 2 r1, 2÷2 = 1 r0, 1÷2 = 0 r1 - giving 1011. Every whole number has exactly one binary representation.
What is a binary translator?
A binary translator converts between binary code and readable text, mapping each 8-bit group to one character using ASCII or UTF-8. The binary 01001000 01101001 translates to "Hi". The same translation runs in reverse, turning typed text back into its binary representation.
Runs in your browser. Your files and text never leave your device - nothing is uploaded.
