Number System Converter

Convert integers, fractions, and negative two's complement numbers across arbitrary bases (binary, octal, decimal, hex, base 2 to 36) with exact BigInt precision.

LAST VERIFIED: 2026-07-16• Complies with IEEE Std 754-2019 & Knuth Seminumerical Radix Algorithms
⚡ Estimate-First Challenge
Can you guess the Hexadecimal value of Binary 11011010 without calculating?
Quick Test Scenarios
Converted Result (Base 16)
FF
Exact positional value in Base 16.
Binary (Base 2)
11111111
Octal (Base 8)
377
Decimal (Base 10)
255
Hexadecimal (Base 16)
FF
Two's Complement Bitmask (8-bit Binary)Hardware Signed Encoding
11111111
How is this calculated? (See Step-by-Step Polynomial & Division Math)
1. Polynomial Radix Expansion (To Decimal):
N = (2 × 10^2) + (5 × 10^1) + (5 × 10^0) = 255 (Decimal)
2. Successive Division by Target Base (16):
255 / 16 = 15 remainder 15 (F)
15 / 16 = 0 remainder 15 (F)
Scientific Verification & Formula Derivations (Knuth TAOCP & IEEE Std 754)

Polynomial Radix Expansion: Any positional integer representation $N$ in base $b$ maps to scalar magnitude via weighted polynomial summation:N_10 = ∑ (d_i × b^i) + ∑ (c_j × b^-j), where digits $d_i \in [0, b-1]$.

Exact 64-bit / 256-bit BigInt Precision: Standard web calculators rely on IEEE 754 double floating-point numbers (`parseInt`), which suffer from low-order truncation when integer magnitudes exceed `2^53 - 1` (`9,007,199,254,740,991`). Our engine utilizes exact arbitrary-precision `BigInt` modular arithmetic (`temp % BigInt(targetBase)`) to guarantee zero precision drift across 64-bit and 256-bit word widths.

Primary References:

  • Knuth, Donald E. The Art of Computer Programming, Volume 2: Seminumerical Algorithms (3rd ed., Addison-Wesley, §4.4 Radix Conversion).
  • IEEE Std 754-2019, IEEE Standard for Floating-Point Arithmetic, §5.12 Radix Conversion.
  • ECMAScript 2026 Language Specification, §7.1.4 ToNumber / parseInt Radix Boundaries.

About the Number System Converter

A number system converter translates a numeric value from one radix, or base, into another. Every positional numeral system assigns each digit a weight equal to the base raised to the power of its position, which means the same underlying quantity can be written in infinitely many ways depending on the base chosen. Decimal (base 10) is the human default because we have ten fingers, but digital computers use binary (base 2) because a transistor has two stable states. Hexadecimal (base 16) and octal (base 8) exist as compact shorthand for binary: one hex digit maps exactly onto four bits and one octal digit onto three, so programmers can read machine values without counting long strings of ones and zeros. Base conversion is fundamental to memory addressing, colour codes in web design, file permissions in Unix, network subnetting, character encoding, and low-level debugging, where the ability to move fluently between representations is a core professional skill.

Mathematical Formula & Logic

Positional notation and the two standard conversion algorithms: 1. Positional expansion (any base to decimal): For digits dₙ...d₁d₀ in base b: Value = dₙ·bⁿ + ... + d₁·b¹ + d₀·b⁰ Fractional digits continue with negative exponents: 0.f₁f₂f₃ = f₁·b⁻¹ + f₂·b⁻² + f₃·b⁻³ 2. Repeated division (decimal to any base, integer part): Divide by the target base, record the remainder, repeat with the quotient until the quotient reaches zero. Read the remainders bottom to top. 3. Repeated multiplication (decimal to any base, fractional part): Multiply the fraction by the target base, record the integer part, repeat with the remaining fraction. Read the integer parts top to bottom. 4. Digit alphabet: Bases above 10 borrow letters, so A=10, B=11 ... Z=35. This supports any base from 2 to 36. 5. Binary grouping shortcuts: 1 hexadecimal digit = 4 binary digits (nibble) 1 octal digit = 3 binary digits These let you convert by inspection without arithmetic.

Step-by-Step Example

Convert the decimal number 205.625 into binary: Integer part (205) by repeated division: 1. 205 ÷ 2 = 102 remainder 1 2. 102 ÷ 2 = 51 remainder 0 3. 51 ÷ 2 = 25 remainder 1 4. 25 ÷ 2 = 12 remainder 1 5. 12 ÷ 2 = 6 remainder 0 6. 6 ÷ 2 = 3 remainder 0 7. 3 ÷ 2 = 1 remainder 1 8. 1 ÷ 2 = 0 remainder 1 Reading the remainders bottom to top: 11001101 Fractional part (0.625) by repeated multiplication: 9. 0.625 × 2 = 1.25 → digit 1, carry 0.25 10. 0.25 × 2 = 0.5 → digit 0, carry 0.5 11. 0.5 × 2 = 1.0 → digit 1, remainder 0, terminate Reading top to bottom: 101 Result: 205.625 decimal = 11001101.101 binary Check by expansion: 128+64+8+4+1 = 205, and 0.5+0.125 = 0.625. Correct. Regrouped into nibbles, 1100 1101 = CD hexadecimal, confirming the shortcut.

Reference Data & Values

decimalbinaryoctalhexadecimal
81000108
10101012A
15111117F
16100002010
64100000010040
100110010014464
20511001101315CD
25511111111377FF
1024100000000002000400
655351111111111111111177777FFFF

Frequently Asked Questions

Hexadecimal is a lossless compression of binary that the human eye can actually parse. Because 16 is 2 to the fourth power, every hex digit corresponds to exactly four bits with no arithmetic required, so the 32-bit value 11111111000000001010101100001101 becomes FF00AB0D at a glance. Long binary strings are easy to miscount by one digit, an error that silently changes the value, whereas an eight-character hex string can be read aloud, compared, and typed reliably. This is why memory addresses, colour codes such as #FF5733, and hash digests are all conventionally shown in hex.
Two's complement is the standard way processors represent signed integers, in which the most significant bit carries a negative weight. To negate a value you invert every bit and add one, so in 8-bit form 5 is 00000101 and −5 is 11111011. Its advantage is that a single addition circuit handles both signed and unsigned arithmetic correctly, with no separate hardware for subtraction and no duplicate encoding for zero. The consequence is an asymmetric range: 8 bits span −128 to +127, not −127 to +127.
A fraction terminates in a given base only when its denominator, once reduced, contains no prime factors outside that base. Since binary has only the prime factor 2, a fraction terminates only when the denominator is a power of two, which is why 0.625 (five eighths) ends cleanly but 0.1 (one tenth) repeats as 0.000110011... forever. This is the root cause of the famous floating-point surprise in which 0.1 plus 0.2 does not exactly equal 0.3, because neither operand can be stored exactly in a binary format.
The converter handles any base from 2 to 36 in either direction. The upper limit comes from the digit alphabet: the ten digits 0 through 9 followed by the twenty-six letters A through Z give exactly thirty-six distinct symbols. Base 36 is the densest representation available using only alphanumeric characters, which is why it appears in URL shorteners and compact identifiers where every character of length matters.
Unix permissions come in three groups of three bits — read, write and execute for owner, group and others — and one octal digit encodes exactly three bits. That makes chmod 755 a direct transcription of 111 101 101, meaning full rights for the owner and read-plus-execute for everyone else. The mapping is so clean that experienced administrators read the octal and the permission string interchangeably, with 4 for read, 2 for write and 1 for execute summing to each digit.
Group the binary digits into blocks of four starting from the binary point and moving outward, padding the outermost group with zeros if needed, then replace each block with its hex digit. So 11001101 splits into 1100 and 1101, which are C and D, giving CD. Reverse the process to go from hex to binary by expanding each digit into its four-bit pattern. Octal works identically with groups of three bits instead of four.