Number Theory • Discrete Mathematics Flagship

Base Converter

Synchronously convert numbers between Binary (Base 2), Decimal (Base 10), Hexadecimal (Base 16), Octal (Base 8), and arbitrary radix bases from 2 to 36 with step-by-step polynomial decompositions.

Verified IEEE-754 & Positional Radix Standards
Last Updated: September 2026
Quick-Select Computer Science Values Standard Benchmarks

Synchronous Multi-Base Inputs

0, 1
0–9
0–9, A–F
0–7
8-Bit Binary Nibble Grouping
1111 1111
Formatted as 4-bit nibbles for clean hexadecimal byte alignment.
Bit Length
8 Bits
1 Byte
ASCII Character
ÿ (0xFF)
Latin Extended
Signed 8-Bit
-1
Two's Complement
Powers of 2 Exponent
2⁸ − 1
Mersenne number
2ⁿ

Step-by-Step Binary to Decimal Bit Expansion Proof

Direct Answer & Overview
Verified Educational Guide

Base Radix Conversion Definition & Formulas

A positional numeral base (radix b) represents quantities as polynomial sums of powers of b. Converting from base b to decimal uses polynomial expansion, while converting from decimal to base b uses successive Euclidean integer division with remainders.

Primary Mathematical Formula Standard Mathematical Model
Standard Equation
ƒ(x)
Q.E.D.
Base b to Decimal: N₁₀ = ∑ [dᵢ · bⁱ], Decimal to Base b: N = q · b + r (read remainders in reverse order)
Evaluated with exact mathematical formulation • Rigorously verified
Exact Formula
Input Parameters
Required
1
Input Value String (e.g. 11010110₂, 0xAF4E, 34710)
2
Source Base (Radix b₁ from 2 to 36)
3
Target Base (Radix b₂ from 2 to 36)
Expected Outputs
Calculated
Synchronous Binary (Base 2) Representation
Decimal (Base 10) Value
Hexadecimal (Base 16) Value
Octal (Base 8) Value
Step-by-Step Polynomial Expansion & Division Breakdown
Worked Numerical Example
Instant Verification
Convert hexadecimal 2A3₁₆ to decimal (Base 10)
→ 2A3₁₆ = (2 × 16²) + (10 × 16¹) + (3 × 16⁰) = (2 × 256) + (10 × 16) + (3 × 1) = 512 + 160 + 3 = 675.
2A3₁₆ = 675₁₀ | Binary: 0010 1010 0011₂ | Octal: 1243₈

Positional Radix Number Systems & Polynomial Expansion

In any positional number system with radix $b \ge 2$, an $n$-digit integer $(d_{n-1} d_{n-2} \dots d_1 d_0)_b$ represents the exact mathematical sum:

$$N_{10} = \sum_{i=0}^{n-1} d_i \cdot b^i = d_{n-1} b^{n-1} + \dots + d_1 b^1 + d_0 b^0$$

Where each digit $d_i \in \{0, 1, \dots, b-1\}$.

The Core Computer Science Bases (Binary, Octal, Decimal & Hex)

Binary (Base 2)

Uses digits $\{0, 1\}$. Represents the physical on/off states of silicon transistors. The fundamental language of modern digital computing.

Hexadecimal (Base 16)

Uses digits $\{0\text{–}9, \text{A}\text{–}\text{F}\}$. Exactly packs 4 binary bits per hex character, standard for memory addresses, UUIDs, and CSS colors.

Successive Division & Remainder Conversion Algorithm

To convert a decimal integer $N$ into target base $b$:

1. Divide $N$ by $b$: Quotient $q_0 = \lfloor N / b \rfloor$, Remainder $r_0 = N \bmod b$.
2. Set $N = q_0$ and repeat division until quotient $q_k = 0$.
3. The converted number is $(r_k r_{k-1} \dots r_1 r_0)_b$ (remainders written in reverse order).

Direct Bit Grouping (Octal 3-Bit & Hex 4-Bit Nibble Tables)

Decimal Binary (4-bit Nibble) Octal (Base 8) Hex (Base 16)
0000000
5010155
10101012A
15111117F

Step-by-Step Worked Multi-Base Solutions

Example 1 • Decimal to Binary Conversion Standard Tier

Convert Decimal 43 into Binary (Base 2).

1. $43 \div 2 = 21$ remainder $1$

2. $21 \div 2 = 10$ remainder $1$

3. $10 \div 2 = 5$ remainder $0$

4. $5 \div 2 = 2$ remainder $1$

5. $2 \div 2 = 1$ remainder $0$

6. $1 \div 2 = 0$ remainder $1$

Read remainders from bottom to top: 43₁₀ = 101011₂.

Common Pitfalls & Overflow in Fixed-Bit Registers

Pitfall 1: Reading Remainders Forward Instead of in Reverse
When converting using successive division, the first remainder calculated is the least significant bit (LSB) on the right, not the leftmost digit. Always assemble remainders in reverse order.
Pitfall 2: Using Digits Equal to or Greater than the Radix Base
In base $b$, the maximum permissible digit is $b-1$. Writing '2' in binary ($102_2$) or '8' in octal ($78_8$) is invalid syntax and triggers parser errors.
Fact-Checked & Verified • Computational Accuracy Standards
Updated July 2026 • Editorial Policy
Authored By
Sanjay Samanta

Lead Developer & Founder of Basic Math Tools. Specializes in browser-native computational algorithms and applied mathematics.

Reviewed & Verified By
Academic Review Board

Mathematics & curriculum specialists. Audited against standard algebraic and arithmetic principles.

Found an error or have an improvement suggestion? Report a calculation issue

Frequently Asked Questions

What is a positional numeral system base (radix)?
A numeral system base (or radix b) is the number of unique digits (including zero) used to represent numbers. In any base b, the place value of digit dᵢ at index i is dᵢ × bⁱ. Decimal is Base 10, binary is Base 2, octal is Base 8, and hexadecimal is Base 16.
How do you convert any base b number into standard decimal (Base 10)?
Expand the number as a polynomial sum of its digits multiplied by successive powers of the base: Decimal = ∑_{i=0}^{n-1} (dᵢ × bⁱ), where index i starts at 0 from the rightmost digit.
How do you convert a decimal number into an arbitrary base b?
Perform repeated integer division by base b. Record the remainder at each step. Continue dividing until the quotient reaches 0. The digits of the new base are the remainders read in reverse order (from bottom to top / last remainder to first).
Why are binary, octal, and hexadecimal fundamental to computer science?
Computer hardware operates on binary digital logic gates (high/low voltages representing 0 and 1). Octal (Base 8 = 2³) and hexadecimal (Base 16 = 2⁴) group binary digits into exact 3-bit and 4-bit chunks (nibbles), allowing concise human inspection of memory addresses and machine instructions.
How do alphanumeric characters represent digits above 9 in bases up to 36?
In bases greater than 10, uppercase letters represent values 10 through 35: A = 10, B = 11, C = 12, D = 13, E = 14, F = 15, ..., Z = 35. For example, 0xFF in hexadecimal equals 15 × 16¹ + 15 × 16⁰ = 255 in decimal.