Binary to Decimal to Hexadecimal – Number System Conversion Guide (2026)
If you are studying computer science, digital electronics, or any programming related field, you cannot avoid number systems. Computers work on binary (base 2). Humans use decimal (base 10). And for compact representation, we use hexadecimal (base 16). You need to know how to convert between these systems quickly and correctly. In this guide, I will show you step-by-step methods for binary to decimal, decimal to binary, binary to hexadecimal, hexadecimal to binary, and decimal to hexadecimal conversions. I will also give you a free converter tool link at the end.
1. Binary to Decimal Conversion
Binary numbers use base 2. Each digit (bit) represents a power of 2, starting from the rightmost bit as 2^0. To convert binary to decimal, multiply each bit by its place value and sum them.
Method: Write the binary number. Starting from the right (least significant bit), multiply each bit by 2 raised to its position index (0,1,2,…). Add all results.
Example 1: Binary 1011 to Decimal
Positions from right: 3 2 1 0
Calculation: (1 × 2^3) + (0 × 2^2) + (1 × 2^1) + (1 × 2^0)
= (1 × 8) + (0 × 4) + (1 × 2) + (1 × 1) = 8 + 0 + 2 + 1 = 11 decimal.
Example 2: Binary 11001 to Decimal
Positions: 4 3 2 1 0
= (1×16)+(1×8)+(0×4)+(0×2)+(1×1) = 16+8+0+0+1 = 25 decimal.
Example 3: Binary 11111111 (8-bit all ones) to Decimal
2. Decimal to Binary Conversion
To convert a decimal number to binary, repeatedly divide the number by 2 and record the remainders (0 or 1). The remainders read from bottom to top give the binary representation.
Example 1: Decimal 25 to Binary
12 ÷ 2 = 6 remainder 0
6 ÷ 2 = 3 remainder 0
3 ÷ 2 = 1 remainder 1
1 ÷ 2 = 0 remainder 1
Read remainders bottom to top: 11001. So 25 decimal = 11001 binary.
Example 2: Decimal 156 to Binary
78 ÷ 2 = 39 rem 0
39 ÷ 2 = 19 rem 1
19 ÷ 2 = 9 rem 1
9 ÷ 2 = 4 rem 1
4 ÷ 2 = 2 rem 0
2 ÷ 2 = 1 rem 0
1 ÷ 2 = 0 rem 1
Reading bottom up: 10011100. So 156 decimal = 10011100 binary.
3. Binary to Hexadecimal Conversion
Hexadecimal is base 16. Each hex digit corresponds to 4 binary bits (a nibble). To convert binary to hex, group the binary digits into groups of 4 starting from the right. Pad the leftmost group with leading zeros if needed. Then replace each 4-bit group with its hex equivalent.
Here is the binary-to-hex mapping table:
| Binary (4 bits) | Hexadecimal | Decimal |
|---|---|---|
| 0000 | 0 | 0 |
| 0001 | 1 | 1 |
| 0010 | 2 | 2 |
| 0011 | 3 | 3 |
| 0100 | 4 | 4 |
| 0101 | 5 | 5 |
| 0110 | 6 | 6 |
| 0111 | 7 | 7 |
| 1000 | 8 | 8 |
| 1001 | 9 | 9 |
| 1010 | A | 10 |
| 1011 | B | 11 |
| 1100 | C | 12 |
| 1101 | D | 13 |
| 1110 | E | 14 |
| 1111 | F | 15 |
Example 1: Binary 11011011 to Hex
1101 = D, 1011 = B
So hex = DB. (DB in hex = 219 decimal)
Example 2: Binary 101011101 to Hex
0001 = 1, 0101 = 5, 1101 = D.
So hex = 15D.
4. Hexadecimal to Binary Conversion
This is the reverse. Replace each hex digit with its 4-bit binary equivalent using the same table. Then concatenate the groups.
Example: Hex 3A7 to Binary
So binary = 001110100111. Remove leading zeros if needed: 1110100111 (but keeping 12 bits is fine).
5. Decimal to Hexadecimal Conversion
Two methods: either convert decimal to binary first then binary to hex, or directly divide by 16 repeatedly (similar to decimal to binary but with base 16). Remainders 10-15 are represented as A-F.
Method 1 (Divide by 16):
456 ÷ 16 = 28 remainder 8 (least significant digit)
28 ÷ 16 = 1 remainder 12 (C)
1 ÷ 16 = 0 remainder 1
Read remainders from bottom to top: 1, C, 8 → 1C8 hex.
Method 2 (via binary):
6. Hexadecimal to Decimal Conversion
Multiply each hex digit by 16 raised to its position (rightmost position 0). For digits A-F, use decimal values 10-15.
Example: Hex 1C8 to Decimal
= (1 × 256) + (12 × 16) + (8 × 1) = 256 + 192 + 8 = 456 decimal.
Summary Table of Conversions
| Conversion Type | Method | Example |
|---|---|---|
| Binary → Decimal | Multiply bits by powers of 2 and sum | 1011₂ = 11₁₀ |
| Decimal → Binary | Repeated division by 2, read remainders bottom-up | 25₁₀ = 11001₂ |
| Binary → Hex | Group 4 bits from right, convert each group | 11011011₂ = DB₁₆ |
| Hex → Binary | Each hex digit to 4 bits | 3A7₁₆ = 001110100111₂ |
| Decimal → Hex | Divide by 16 repeatedly, remainders (10-15 as A-F) | 456₁₀ = 1C8₁₆ |
| Hex → Decimal | Multiply digits by powers of 16 | 1C8₁₆ = 456₁₀ |
Common Mistakes to Avoid
- Forgetting that binary to hex grouping starts from the rightmost bit, not leftmost.
- Misplacing the powers in binary to decimal (starting from 2^0 at the rightmost bit).
- Using wrong hex letters (A=10, not A=1).
- Not padding binary groups with leading zeros when the leftmost group has less than 4 bits.
- Confusing between decimal and hexadecimal when reading numbers like 12 (which is C in hex, not 12).
Use Our Free Number System Converter
If you need quick conversions or want to verify your manual work, use the number system converter tool on this site. It supports binary, decimal, hexadecimal, and also octal. Just enter a number in any base and see the equivalent in other bases instantly.
Convert between binary, decimal, hex, and octal