Binary · Octal · Decimal · Hexadecimal · Free
Number system converters online
All of UniSolvers’ tools for converting a number between bases: type the value and each converter gives you the result with every division, multiplication or bit grouping explained, so you can check your computer science or digital electronics exercises.
Base conversion calculators
Each conversion has its own method, and exams usually ask you to show the whole working, not just the answer. These converters show every operation exactly as you’d do it by hand:
Decimal to hexadecimal converter
Repeated division by 16 step by step, with huge numbers, negatives (two’s complement) and decimals.
Use it to: convert a base 10 number to base 16Hexadecimal to decimal converter
Sum of powers of 16 digit by digit, with fractional parts, negatives and a two’s complement warning.
Use it to: convert a base 16 number to base 10The four bases you’ll use
A positional number system uses a fixed number of digits (the base), and each position is worth the base raised to that position. In computing you almost always work with these four. For reference, here is the same quantity, 255, written in each one:
| System | Base | Digits | Where it’s used | 255 is written |
|---|---|---|---|---|
| Binary | 2 | 0 1 | Bits, digital circuits, logic operations | 11111111 |
| Octal | 8 | 0–7 | Unix/Linux permissions (chmod 755) | 377 |
| Decimal | 10 | 0–9 | Everyday life | 255 |
| Hexadecimal | 16 | 0–9 A–F | Memory addresses, bytes, web colors, cheat codes | FF |
Conversion chart from 0 to 15
With this chart you can solve almost any conversion between binary, octal and hexadecimal without going through decimal, because each hexadecimal digit is exactly 4 bits and each octal digit, 3 bits:
| Decimal | Binary | Octal | Hexadecimal |
|---|---|---|---|
| 0 | 0000 | 0 | 0 |
| 1 | 0001 | 1 | 1 |
| 2 | 0010 | 2 | 2 |
| 3 | 0011 | 3 | 3 |
| 4 | 0100 | 4 | 4 |
| 5 | 0101 | 5 | 5 |
| 6 | 0110 | 6 | 6 |
| 7 | 0111 | 7 | 7 |
| 8 | 1000 | 10 | 8 |
| 9 | 1001 | 11 | 9 |
| 10 | 1010 | 12 | A |
| 11 | 1011 | 13 | B |
| 12 | 1100 | 14 | C |
| 13 | 1101 | 15 | D |
| 14 | 1110 | 16 | E |
| 15 | 1111 | 17 | F |
Which converter do I need?
Look at which base the number you’re given is in and which base you’re asked to convert it to. Each converter explains its full method with a worked example:
| If you need to convert… | Use |
|---|---|
| From decimal (base 10) to hexadecimal (base 16) | Decimal to hexadecimal converter |
| From hexadecimal (base 16) to decimal (base 10) | Hexadecimal to decimal converter |
Working with logic instead of numbers? The logic calculators use the same 0s and 1s, applied to formulas: truth tables, normal forms and proofs.
Frequently asked questions
What is a positional number system?
One where the value of each digit depends on its position. In decimal, the 7 in 700 is worth seven hundred because it sits in the hundreds place (10²). Any other base works the same way, except that the positions are powers of that base.
Why do computers use binary and not decimal?
Because their circuits can only reliably tell two states apart (there is voltage or there isn’t), which are written as 1 and 0. Hexadecimal and octal aren’t used by the machine itself: people use them to write long strings of bits more compactly.
Why is a byte written with two hexadecimal digits?
A byte is 8 bits, and each hexadecimal digit stands for exactly 4 bits. That’s why any byte goes from 00 to FF (0 to 255 in decimal).