What Is a Number System?
A number system (or numeral system) is a way to represent numbers using a fixed set of digits. The base (or radix) of a system is the number of unique digits it uses. The decimal system we use every day has base 10, using digits 0 through 9. Computers internally use binary (base 2) because electronic circuits have two states, on and off. Programmers also work with octal (base 8) and hexadecimal (base 16) because they map cleanly to binary groupings.
Converting between these systems is a fundamental skill in computer science, digital electronics, and low-level programming. For binary arithmetic and operations, use our Binary Calculator, and for hex arithmetic, try the Hex Calculator.
What This Calculator Does
Enter a value, select which base it is in, and the converter instantly shows the equivalent representation in all four bases: binary, octal, decimal, and hexadecimal. Input is validated against the selected base so you get immediate feedback if you type an invalid digit.
- Inputs: A value and its source base
- Outputs: The value in binary, octal, decimal, and hexadecimal
The Four Number Systems
Binary (Base 2)
Uses only two digits, 0 and 1. Each digit is called a bit. Binary is the native language of digital computers. Eight bits form a byte, which can represent 256 distinct values (0 to 255). The binary number 101010 equals 42 in decimal.
Octal (Base 8)
Uses digits 0 through 7. Each octal digit corresponds to exactly three binary digits, making it a compact way to represent binary values. Octal was popular in early computing systems with 12-bit, 24-bit, or 36-bit word sizes. The octal number 52 equals 42 in decimal.
Decimal (Base 10)
Uses digits 0 through 9. This is the number system humans use every day, likely because we have ten fingers. Each position represents a power of 10. The decimal number 42 equals 101010 in binary, 52 in octal, and 2A in hexadecimal.
Hexadecimal (Base 16)
Uses digits 0 through 9 and letters A through F (where A=10, B=11, C=12, D=13, E=14, F=15). Each hex digit corresponds to exactly four binary digits (a nibble). Hexadecimal is widely used in programming for memory addresses, color codes, and byte values. The hex number 2A equals 42 in decimal.
How Conversion Works
To convert from any base to decimal, multiply each digit by the base raised to the power of its position (starting from 0 on the right) and sum the results. To convert from decimal to another base, repeatedly divide by the target base and collect the remainders in reverse order. This calculator performs both steps internally: it first converts the input to decimal, then converts the decimal value to all three other bases.
How to Use the Calculator
- Select the base of your input value
- Enter the value in that base
- All four base representations appear instantly
- Use the copy buttons to copy any result
Example Conversion
Example: Convert the binary number 101010 to all bases. Select binary as the source base and enter 101010. The decimal value is 42 (1*32 + 0*16 + 1*8 + 0*4 + 1*2 + 0*1). The octal value is 52, and the hexadecimal value is 2A. Each result is shown with a copy button for convenience.
Common Mistakes to Avoid
- Using invalid digits: Each base only accepts certain digits. The digit 8 is invalid in octal, and the letter G is invalid in hexadecimal. This calculator validates input and warns you immediately.
- Confusing bases: Always confirm the source base before entering a value. The number 10 means ten in decimal, two in binary, eight in octal, and sixteen in hexadecimal.
- Forgetting hex letters: Hexadecimal uses A-F for values 10-15. The hex number FF equals 255 in decimal, not some error from unrecognized characters.