Base Converter and Binary Calculator – Binary, Octal, Decimal, Hex
Unified Base & Binary Calculator
High-precision cross-base conversions and full binary arithmetic suite

Quick answer
A base converter rewrites a number in a different number system. To go from decimal to binary, divide by 2 repeatedly and read the remainders from bottom to top: 42 = 101010₂. In hexadecimal the same number is 2A, and in octal it is 52. This tool converts between bases 2, 8, 10 and 16 and also does binary addition, subtraction, multiplication and division.
Our free base converter shows not just the answer but the working: the input, the normalized decimal value and the final output. Switch to the Binary Math tab to calculate with binary numbers directly. It is built for computer science students, programmers, network engineers and anyone learning how computers store numbers.
Number Bases Explained
| Base | Name | Digits used | Common use |
|---|---|---|---|
| 2 | Binary | 0, 1 | How computers store all data |
| 8 | Octal | 0–7 | Unix file permissions (e.g. 755) |
| 10 | Decimal | 0–9 | Everyday counting |
| 16 | Hexadecimal | 0–9, A–F | Colors, memory addresses, MAC addresses |
Each place in a number is worth the base raised to a power. In binary, 101010 means 1×32 + 0×16 + 1×8 + 0×4 + 1×2 + 0×1 = 42. A base converter simply applies this rule in both directions.
How to Use the Base Converter
Step 1: Choose the From Base and To Base
On the Base Converter tab, pick the base your number is in under From Base and the base you want under To Base. We convert from 10 (Decimal) to 2 (Binary).

Step 2: Enter the Number
Type your number in the Enter Number box. Use only digits valid for the From Base (for hex, letters A–F are allowed). We enter 42.

Step 3: Click Convert Layout
Press Convert Layout. Use Clear to reset the fields and start again.

Step 4: Read the Output and Steps
The base converter shows 101010 as the output, with a Copy button. Below it, the steps breakdown lists the input (Base-10, 42), the normalized decimal value and the target output in base 2.

Base Conversion Chart
| Decimal | Binary | Octal | Hex |
|---|---|---|---|
| 10 | 1010 | 12 | A |
| 42 | 101010 | 52 | 2A |
| 100 | 1100100 | 144 | 64 |
| 255 | 11111111 | 377 | FF |
| 1000 | 1111101000 | 1750 | 3E8 |
| 4096 | 1000000000000 | 10000 | 1000 |
Binary Math: Add, Subtract, Multiply and Divide
Click the Binary Math tab, enter two binary numbers, pick +, −, × or ÷ and press Calculate Math. The tool shows each operand in decimal, the operation it performed and the binary result. For example, 1010 + 110 = 10000, because 10 + 6 = 16.
| Binary rule | Result |
|---|---|
| 0 + 0 | 0 |
| 0 + 1 | 1 |
| 1 + 1 | 10 (write 0, carry 1) |
| 1 + 1 + 1 | 11 (write 1, carry 1) |
Common Mistakes to Avoid
- Using invalid digits. 2 is not a binary digit, and 9 is not an octal digit. The base converter cannot read them, so check your input first.
- Reading remainders in the wrong order. When converting by hand, read from the last remainder to the first.
- Dropping leading zeros in bytes. 5 is 101 in binary, but as an 8-bit byte it is 00000101.
- Mixing hex letters and case. A–F and a–f mean the same values (10–15).
For single-purpose conversions, try our decimal to binary converter or hex to binary converter.
Frequently Asked Questions
What is a base converter?
A base converter changes a number from one number system to another, such as decimal to binary or binary to hexadecimal, without changing its value.
What is 42 in binary?
42 in binary is 101010. In hexadecimal it is 2A and in octal it is 52.
What is 255 in hex?
255 is FF in hexadecimal and 11111111 in binary, the largest value one byte can hold.
Can I convert directly from binary to hex?
Yes. Choose 2 as From Base and 16 as To Base. Each group of four binary digits maps to one hex digit.
Can this tool do binary addition?
Yes. Use the Binary Math tab to add, subtract, multiply or divide two binary numbers, with the decimal working shown.
Is this base converter free?
Yes. It is free, needs no sign-up, and runs entirely in your browser.