Convert Decimal to Hexadecimal
Convert Decimal (dec) to Hexadecimal (hex) instantly and accurately.
Selected Decimal (dec) - available characters: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9
Conversion Formula
Step-by-step example using the value 42 (decimal):
Convert Decimal (base 10) → Hexadecimal (base 16)
Step 1: Input is already decimal - skip to Step 2.
Value: 42
Step 2: Divide 42 by 16 repeatedly (read remainders upward):
42 ÷ 16 = 2 r 10 (A)
2 ÷ 16 = 0 r 2
Read remainders upward: 2A
────────────────────────────
Result: 42 (dec) = 2A (hex)
About Decimal
Decimal (base 10) is the universal positional system using digits 0-9. Each position is a power of 10: 10⁰=1, 10¹=10, 10²=100. Attributed to human anatomy (ten fingers). The Hindu-Arabic system - including zero - was formalised by Brahmagupta (628 CE) and spread via al-Khwarizmi (c. 820 CE). SI and metric systems are base-10. IEEE 754-2008 added decimal64/128 formats for exact decimal arithmetic in financial applications. Conversion: decimal 42 is the reference value used throughout this converter.
About Hexadecimal
Hexadecimal (base 16) uses digits 0-9 and A-F (A=10, B=11, C=12, D=13, E=14, F=15). Each position is a power of 16: 16⁰=1, 16¹=16, 16²=256. Because 16 = 2⁴, each hex digit = exactly 4 bits (one nibble). Ubiquitous in computing: memory addresses (0x7FFF…), CSS colours (#FF5733), IPv6, SHA-256 hashes (64 hex digits = 256 bits), MAC addresses, UUID/GUIDs, and binary file magic numbers. The '0x' prefix originated in C (1972) and is standard in C++, Java, Python, JS, Rust, and Go. Conversion: decimal 42 = 2×16+10 = 2A₁₆.
Quick Reference Table
| Decimal (dec) | Hexadecimal (hex) |
|---|---|
| 1 | 1 |
| 2 | 2 |
| 5 | 5 |
| 8 | 8 |
| 10 | A |
| 15 | F |
| 16 | 10 |
| 42 | 2A |
| 64 | 40 |
| 100 | 64 |
| 255 | FF |