Four ways to write the same number
A number base is just a counting system with a different number of digit symbols. Decimal, the everyday system, has ten. Binary has two — 0 and 1 — matching the on/off states of computer circuits, which is why machines think in binary and humans suffer reading it. Octal groups binary into threes with digits 0–7, and hexadecimal groups it into fours with digits 0–9 and A–F standing for ten through fifteen. Because 8 and 16 are powers of two, converting between binary, octal and hex is a tidy regrouping exercise, while decimal conversions need the place-value arithmetic the table below shows. The numbers themselves do not change: 255, 11111111, 377 and FF are four spellings of one quantity.
Handy reference values
| Decimal | Binary | Octal | Hex |
|---|---|---|---|
| 8 | 1000 | 10 | 8 |
| 10 | 1010 | 12 | A |
| 15 | 1111 | 17 | F |
| 16 | 10000 | 20 | 10 |
| 100 | 1100100 | 144 | 64 |
| 255 | 11111111 | 377 | FF |
| 256 | 100000000 | 400 | 100 |
| 1024 | 10000000000 | 2000 | 400 |
Where each base earns its keep
- Binary — the machine's native tongue: bits, bytes, memory addresses, subnet masks and logic. A byte of all ones is 255, the ceiling for one byte, which is why colour channels (0–255) and IPv4 address parts stop there.
- Hexadecimal — the programmer's shorthand for binary: web colours (#FF5733), MAC addresses, memory dumps, error codes and hash values are all hex because one digit is exactly four bits.
- Octal — mostly legacy now, but alive in one place nearly every server user meets: Unix file permissions, where 755 and 644 are octal triples of read/write/execute bits.
- Decimal — everything with fingers: money, humans and homework.
Why the converter validates digits
Many converters silently accept a "2" inside a binary number and produce nonsense, or quietly stop parsing at the first bad character and convert only part of your input. This one checks every digit against the base you selected and tells you plainly when something does not belong. For students checking homework and anyone eyeballing a hex dump, an honest "that is not valid binary" is worth more than a confident wrong answer. Very large values are handled exactly up to the safe integer limit of the browser (about 9 quadrillion); beyond that, specialist big-number tools take over.
Frequently asked questions
What is 255 in binary and hex?
255 is 11111111 in binary and FF in hexadecimal (and 377 in octal). It is the largest value a single byte can hold, which is why 255 keeps appearing in computing — from colour channels to IP addresses.
How do I convert binary to decimal by hand?
Write the powers of two over the digits — 128, 64, 32, 16, 8, 4, 2, 1 for a byte — and add the ones where the binary digit is 1. For 101101: 32 + 8 + 4 + 1 = 45. The method works for any length.
Why does hex use the letters A to F?
Hexadecimal counts in sixteens, so it needs sixteen digit symbols, but we only have ten numeral characters. The letters A–F stand in for the values 10–15, letting one hex digit represent exactly four binary digits — which is why programmers find hex compact.
What does it mean when the converter rejects my input?
Every digit in the input must belong to the base you chose: binary accepts only 0 and 1, octal 0–7, decimal 0–9 and hex 0–9 plus A–F. A 2 typed into a binary number, or an 8 in an octal one, is rejected with an explanation rather than silently mis-converted.
Private by design: conversions happen in your browser. Nothing is sent to or stored on a server.