Number Base Converter
Instantly convert numbers between all four number systems – with explanations
- Updated
You can type in either field. Whole numbers from 0 up to 2⁵³ − 1.
In binary
11111111
255 in decimal is 11111111 in binary.
In all bases
Tap to use the base as the target.
Each place counts 2 times the place to its right.
How this was calculated
Step 2 – from decimal: divide by 2 repeatedly and note the remainders.
Reading the remainders from bottom to top gives 11111111.
RZ-26 · headon.pro
Understanding number systems
The basics of the four most important number systems in computer science
The four most important number systems in mathematics and computer science are the binary system (base 2), the octal system (base 8), the decimal system (base 10) and the hexadecimal system (base 16). Each system uses a certain number of symbols (digits and letters) and arranges positions as powers of its base. Our number base converter instantly converts between all four systems.
In the decimal system (base 10), which we use in everyday life, each position represents a power of 10: the number 255 means 2 × 10² + 5 × 10¹ + 5 × 10⁰ = 200 + 50 + 5. In the binary system (base 2), 255 corresponds to the binary number 11111111, i.e. 8 set bits. In the hexadecimal system (base 16), 255 is represented as FF – particularly compact. In the octal system (base 8), the value is 377.
Converting between number systems follows a clear algorithm: first the input is converted to its decimal representation, then converted to the target system. In web design, hexadecimal color codes are important in practice (e.g. #1034A6 for Egyptian blue), while in systems programming, binary and hexadecimal representations of bitmasks and addresses are essential. Our converter saves manual conversion steps and prevents errors.
For students of computer science and mathematics, the number base converter is a valuable learning tool. You can try inputs in different bases and compare the results instantly. This strengthens the intuitive understanding of how number systems work and why certain representations are preferred in computer science. For example: a byte (8 bits) has the maximum value 11111111 in binary = FF in hexadecimal = 255 in decimal.
Calculation example: 255
- Decimal
- 255
- Binary (base 2)
- 1111 1111
- Octal (base 8)
- 377
- Hexadecimal (base 16)
- FF
Frequently asked questions about the number base converter
Basics, formulas and application examples
How do I convert a decimal number to binary?
To convert a decimal number to binary, repeatedly divide the number by 2 and note the remainders. Reading the remainders from bottom to top gives the binary number. Example: 13 ÷ 2 = 6 remainder 1, 6 ÷ 2 = 3 remainder 0, 3 ÷ 2 = 1 remainder 1, 1 ÷ 2 = 0 remainder 1. Result: 1101. Our calculator performs this conversion instantly and shows all four number systems at once.
What does the hexadecimal system mean and where is it used?
The hexadecimal system (base 16) uses the digits 0–9 and the letters A–F (A=10, B=11, … F=15). It is mainly used in computer science because it allows a compact representation of binary numbers: each hexadecimal digit corresponds to exactly 4 bits (a nibble). Colors on the web (e.g. #FF5733), memory addresses and byte values are often represented in hexadecimal.
Why is the binary system so important in computer science?
Computers process information exclusively in the form of electrical states: on (1) and off (0). The binary system (base 2) maps these two states directly. All data – text, images, programs – is ultimately stored and processed as sequences of ones and zeros. The binary system is therefore the fundamental language of all digital systems.
How do I convert hexadecimal to decimal?
Each digit of a hexadecimal number is multiplied by 16 raised to the power of its position (from the right, starting at 0), and all products are added. Example: FF = 15 × 16¹ + 15 × 16⁰ = 240 + 15 = 255. The letters A to F have the values 10 to 15. Our calculator automatically converts in all directions as soon as you enter a value.
What is the octal system and what is it used for?
The octal system (base 8) uses the digits 0–7. It was widely used in early computer history because 3 bits represent exactly one octal digit. Today it is used less often in practice, but is still found in Unix file permissions (e.g. chmod 755) and some embedded systems. Octal 755 means: 7 (rwx), 5 (r-x), 5 (r-x).