Binary ⇄ Hex ⇄ Dec ⇄ Oct
Binary, octal, decimal, hexadecimal — type in one place, sync in all four.
What it does: Convert non-negative integers between binary/octal/decimal/hexadecimal.
When to use it: When reading register values, tweaking bit masks, or reading a hex color or address.
MEANS Four ways of writing the same number —; in hexadecimal each digit corresponds to 4 binary bits.
No history yet. Each calculation is automatically saved to this device.
How to use the base converter
Pick a base → enter → all four bases sync.
- 01
Pick the input base
Choose binary / octal / decimal / hexadecimal as the base the number you type is written in.
- 02
Enter the number
You may include a
0xor0bprefix, and can group with_(e.g.1111_0000). Only non-negative integers are supported. - 03
Read all four base results
All four bases are output at once, and clicking any result copies it. Supports arbitrarily large integers (BigInt, exact with no error).
Common value reference
Memorize a few anchors and base conversion gets much faster.
| Decimal | Hexadecimal | Binary | Octal |
|---|---|---|---|
| 8 | 8 | 1000 | 10 |
| 10 | A | 1010 | 12 |
| 16 | 10 | 10000 | 20 |
| 255 | FF | 11111111 | 377 |
| 256 | 100 | 100000000 | 400 |
| 1024 | 400 | 10000000000 | 2000 |
Computed directly from the definition.
Common questions, answered in 3 minutes
Why is hexadecimal so common in programming?
4 binary bits map exactly to 1 hex digit, so writing registers / memory addresses in hex is both short and lets you see the bit structure at a glance.
Can it convert negative numbers or fractions?
This tool only handles non-negative integers. Negative numbers involve two's complement representation (see the sign-magnitude/one's/two's complement tool), and fractions involve fixed/floating point — separate tools.
Are the 0x and 0b prefixes required?
No. The prefixes just make it convenient to paste existing code; it parses correctly with or without them.
Will very large numbers be miscalculated?
No. Internally it uses JavaScript BigInt, so any number of digits is exact with no floating-point error.
Standards and sources referenced by this tool
| Item | Value / Formula | Source |
|---|---|---|
| Numeral base (radix) definition | value = Σ dᵢ × baseⁱ | Positional numeral system |
Pure bitwise/string conversion, no external API; large integers handled exactly with BigInt.