Number Base Converter
Convert a number between binary, octal, decimal and hexadecimal bases.
| Digit | Place Value | Contributes |
|---|---|---|
| 2 | 10^2 | 200 |
| 5 | 10^1 | 50 |
| 5 | 10^0 | 5 |
Each digit is worth its face value times 10 raised to its position — add those up and you get 255 in decimal.
- Octal377
- Decimal255
- HexadecimalFF
About the Number Base Converter
Computers store and process everything in binary, but people rarely think or communicate that way, which is why base conversion — moving a number between binary, octal, decimal and hexadecimal — is a routine task for programmers, computer science students, and anyone working with color codes, memory addresses, or bitwise data. A color like #FF5733 is hexadecimal; a permissions setting like 755 in Unix is octal; both are just decimal numbers wearing a different base's clothing.
This calculator converts a value from any of those four bases into all the others simultaneously, along with a place-value breakdown showing exactly how each digit contributes to the total — useful both for getting a fast answer and for actually understanding how positional number systems work under the hood.
How it’s calculated
Every positional number system works the same way, just with a different base: each digit's value is multiplied by the base raised to the power of its position, counting from 0 at the rightmost digit. Decimal 255 is 2×10² + 5×10¹ + 5×10⁰. The same number in binary, 11111111, is 1×2⁷ + 1×2⁶ + ... + 1×2⁰ — eight place values, each a power of 2, all summing to 255.
Hexadecimal (base 16) needs digits beyond 9, so it borrows letters: A=10, B=11, C=12, D=13, E=14, F=15. It's popular in computing specifically because each hex digit maps cleanly onto exactly 4 binary digits (bits), making it a much more compact way to write out binary data than writing the raw 1s and 0s.
Frequently asked questions
What is binary used for?
It's the native language of digital electronics — every transistor in a computer is either off or on, which maps directly to 0 and 1. All the number systems above binary (octal, decimal, hex) exist purely for human convenience, since raw binary gets long and hard to read quickly.
How do I convert hexadecimal to binary quickly?
Convert each hex digit to its 4-bit binary equivalent individually and concatenate them — hex digit A becomes 1010, hex digit 3 becomes 0011, so hex A3 becomes binary 10100011. This shortcut works because 16 is exactly 2⁴, so each hex digit maps to exactly 4 bits.
What's the largest single digit in a given base?
It's always one less than the base itself — the largest digit in base 10 is 9, in base 8 (octal) it's 7, in base 2 (binary) it's 1, and in base 16 (hex) it's F (which represents 15). Once a digit would reach the base's value, it carries over into the next place instead.
Why do computers use binary instead of decimal?
Because the underlying hardware — transistors and switches — naturally represents just two reliable states (off/on, low voltage/high voltage), which map perfectly onto binary's two digits. Building reliable hardware for ten distinct voltage states, as decimal would require, is far more complex and error-prone.
Related calculators
Powered by GetCalculator.online