Number Base Converter
Machines count in binary while people count in decimal, and programmers hop between the two through octal and hexadecimal. Whether you are decoding a colour hex code, a file permission mask or a homework exercise, the translation is mechanical — but this form accepts decimal input only. Type a decimal whole number and read it back in base 2, base 8 and base 16 together.
Enter values
Results
- Binary (base 2)
- 11111111
- Octal (base 8)
- 377
- Hexadecimal (base 16)
- FF
- Decimal (base 10)
- 255
How is the Number Base Converter calculated?
Type a whole decimal number of zero or more. Binary appears as the headline result, followed by octal, upper-case hexadecimal, and the decimal echo so you can confirm the input round-tripped. Fractions such as 12.5 have no finite representation in these bases, so the page shows em dashes instead of inventing digits, and negative values are out of scope for the same reason.
Formula
A digit's place in base b is worth bⁿ, so decimal 255 = 2×100 + 5×10 + 5 becomes 1×128 + 1×64 + 1×32 + 1×16 + 1×8 + 1×4 + 1×2 + 1×1 = 11111111₂. Hexadecimal packs four binary digits into each hex digit (F = 1111) and octal packs three (7 = 111), which is exactly why 255 reads FF in hex and 377 in octal.
Example
Decimal 255 is 11111111 in binary, FF in hexadecimal and 377 in octal — the largest value an 8-bit byte holds. The year 2026 becomes 11111101010₂, 3752₈ and 7EA₁₆. Push to a large value: 4,294,967,295 is 2³² − 1, the 32-bit unsigned ceiling, written FFFFFFFF in hex and thirty-two ones in binary.
Things to remember
Hexadecimal dominates real work — colours like #FF8800, memory addresses, byte dumps — because each hex digit maps cleanly onto four bits. Binary explains the structure, octal survives mainly in legacy systems, and decimal is where you began. With all four views on one screen you never need to translate twice.
Frequently Asked Questions
How do I convert decimal 255 into binary?
Divide by two repeatedly and read the remainders upwards: 255 ÷ 2 = 127 r1, 127 ÷ 2 = 63 r1, and so on down to 0. Eight 1s fall out, giving 11111111. Equivalently, note that 255 = 2⁸ − 1, the maximum of an 8-bit byte.
What does FF mean in hexadecimal?
F is the digit after 9 in base 16, representing 15, so FF = 15 × 16 + 15 = 255 decimal. Colour codes work the same way: #FFFFFF is three bytes of 255 — pure white — while #000000 is black and #FF8800 is a hot orange.
Why do programmers prefer hex over binary?
Because one hex digit equals exactly four binary digits, so 11111111 reads as FF at a glance instead of eight characters to count. Octal does the same job with groups of three bits, which is why 255 becomes 377 when you work in base 8.
Can this converter handle fractions or negative numbers?
No — the input takes non-negative whole decimals. Fractions such as 0.1 repeat forever in binary (0.000110011…), so no finite digit string exists, and negative values use a separate two's-complement scheme that this page deliberately leaves out.
Related Calculators
- Data Storage ConverterUnit ConvertersConvert GB to MB, TB to GB and bytes using the 1024 and 1000 conventions that storage marketing keeps apart.
- Factor CalculatorMath & ArithmeticList every factor of a whole number, count them and see the prime factorisation written out with powers.
- Fraction CalculatorMath & ArithmeticAdd, subtract, multiply or divide two fractions and get the answer simplified, plus its decimal and percentage forms.
- Prime Number CalculatorMath & ArithmeticCheck whether a number is prime, see its smallest prime factor and find the next prime that follows it.