Any normalized base converter
Convert numbers between any base from 2 (Binary) up to 36 (using 0-9 and A-Z).
Conversion Result (Base 10)
0
Binary-Specific Conversions (For Binary Input Only)
Decimal (Base-10)
0
Hexadecimal (Base-16)
0
Gray Code (Reflected)
N/A
Academic Insight: Conversion Methods
1. Decimal ↔ Binary and Decimal ↔ Any Base
This process converts a decimal number to any target base by systematically removing remainders. Reading the remainders in reverse order produces a new number.
Formula: Decimal Number = (Quotient * Target Base) + Remainder
The process repeats until the quotient reaches zero, providing a reliable method for decimal to base B conversions.
This is the process to convert Any Base to Decimal. It depends on the position of each digit, multiplying the value of the digit by the base power of its position (starting from 0 on the right).
Formula (General): Summation of (Digit Value * Source Base ^ Position).
For Binary (Base-2), this is simply summing the powers of two (20, 21, 22, …) where the bit is ‘1’.
2. Binary ↔ Hexadecimal (Direct Conversion)
Since the relationship 24 = 16 holds, these conversions are direct, efficient, and do not require an intermediate stop at Decimal (Base-10).
Start from the right and group the binary digits into sets of four (a nibble). Convert each 4-bit nibble into its single corresponding Hexadecimal digit (0-F). Left-side zero-padding is used if the binary string length is not a multiple of four.
The inverse process: each Hexadecimal digit is expanded into its 4-bit Binary representation. These 4-bit sequences are then joined together (concatenated) to form the full Binary number. Example: Hex ‘C’ is ‘1100’ in binary.
3. Binary to Gray Code (Unique Logic)
Gray Code is a unit-distance code used to minimize errors in systems. It uses the Exclusive OR (XOR) logical operation on adjacent bits of the Binary number for direct conversion. The Most Significant Bit (MSB, Bn) is preserved (Gn = Bn), and subsequent bits are calculated as Gi = Bi XOR Bi-1.