Number Base Converter
Enter a number and its base to see it converted to binary, octal, decimal, and hexadecimal.
Unsigned mode accepts up to 4096 input digits without integer rounding. Signed mode uses 8/16/32/64-bit two’s complement: enter a signed decimal or an unsigned bit pattern. Decimal results are signed; other bases show the encoded pattern. The additional output base can be 2–36. Bit and byte counts describe the encoded value; grouped binary is padded to whole bytes.
Enter valid values within the supported ranges. Invalid input clears the results.
How number base conversion works
A number base (or radix) determines how many unique digits are used to represent numbers. Decimal (base 10) uses digits 0-9; binary (base 2) uses only 0 and 1; octal (base 8) uses 0-7; and hexadecimal (base 16) uses 0-9 plus A-F to represent values 10 through 15.
Converting between bases works by first converting the input to decimal (summing each digit multiplied by the base raised to its position), then repeatedly dividing by the target base to build up the digits of the new representation.
Unsigned mode accepts up to 4096 input digits without integer rounding. Signed mode uses 8/16/32/64-bit two’s complement: enter a signed decimal or an unsigned bit pattern. Decimal results are signed; other bases show the encoded pattern. The additional output base can be 2–36. Bit and byte counts describe the encoded value; grouped binary is padded to whole bytes.
Frequently asked questions
Why is binary used in computing?
Binary maps directly onto the two physical states of digital electronics (on/off, high/low voltage), making it the natural number system for how computers store and process data.
What does hexadecimal A-F represent?
In hexadecimal, A through F stand for the decimal values 10 through 15, since a single hex digit needs to represent 16 possible values (0 through 15).
Why do programmers use hexadecimal instead of binary directly?
Each hex digit represents exactly 4 binary digits, so hexadecimal is a much more compact way to write binary values — useful for things like memory addresses and color codes.
How we verified this calculator
The calculator is checked against 6 reference cases computed independently of its code. Last passed: .
| # | Inputs | Expected result |
|---|---|---|
| 1 |
From base = Binary
Interpretation = Unsigned integer
Bit width = 8
Value = 0
Output base (2–36) = 36
|
Binary: 0
Octal: 0
Decimal: 0
Hexadecimal: 0
|
| 2 |
From base = Binary
Interpretation = Unsigned integer
Bit width = 8
Value = 1
Output base (2–36) = 36
|
Binary: 1
Octal: 1
Decimal: 1
Hexadecimal: 1
|
| 3 |
From base = Octal
Interpretation = Unsigned integer
Bit width = 8
Value = 0
Output base (2–36) = 36
|
Binary: 0
Octal: 0
Decimal: 0
Hexadecimal: 0
|
| 4 |
From base = Octal
Interpretation = Unsigned integer
Bit width = 8
Value = 1
Output base (2–36) = 36
|
Binary: 1
Octal: 1
Decimal: 1
Hexadecimal: 1
|
| 5 |
From base = Decimal
Interpretation = Unsigned integer
Bit width = 8
Value = 0
Output base (2–36) = 36
|
Binary: 0
Octal: 0
Decimal: 0
Hexadecimal: 0
|
| 6 |
From base = Decimal
Interpretation = Unsigned integer
Bit width = 8
Value = 1
Output base (2–36) = 36
|
Binary: 1
Octal: 1
Decimal: 1
Hexadecimal: 1
|