The Hex to Decimal Calculator converts hexadecimal (base‑16) numbers to decimal (base‑10) and vice versa. Hexadecimal is widely used in computing because it is a compact representation of binary – each hex digit corresponds to 4 bits. This calculator shows the complete conversion process: for hex→dec, place‑value multiplication; for dec→hex, repeated division by 16. It's an essential tool for programmers, computer science students, and anyone working with low‑level data.
How to Convert Hexadecimal to Decimal
Step 1: Write the hex digits with their place values (powers of 16, starting from 0 on the right).
Step 2: Convert each hex digit to decimal (A=10, B=11, …, F=15).
Step 3: Multiply each digit by its place value and sum the results.
Example: 1A (hex) = 1×16 + 10×1 = 16 + 10 = 26 decimal.
How to Convert Decimal to Hexadecimal
Step 1: Divide the decimal number by 16.
Step 2: Write the remainder (0‑15) as a hex digit (0‑9, A‑F).
Step 3: Repeat with the quotient until it becomes 0.
Step 4: Read remainders from bottom to top – that is the hex number.
Example: 255 → 255÷16=15 rem 15 (F), 15÷16=0 rem 15 (F) → FF hex.
Hexadecimal Conversion Table (0‑15)
| Decimal | Hex |
|---|---|
| 0 | 0 |
| 1 | 1 |
| 2 | 2 |
| 3 | 3 |
| 4 | 4 |
| 5 | 5 |
| 6 | 6 |
| 7 | 7 |
| 8 | 8 |
| 9 | 9 |
| 10 | A |
| 11 | B |
| 12 | C |
| 13 | D |
| 14 | E |
| 15 | F |
Real‑World Applications of Hexadecimal
- Color codes: Web colors (e.g., #FF5733 = red, green, blue).
- Memory addresses: CPU registers and pointers are often displayed in hex.
- MAC addresses: Device identifiers (e.g., 00:1A:2B:3C:4D:5E).
- Debugging: Hex dumps show binary data in a compact, readable form.