Hexadecimal & Denary Conversions
Key Terminology
• Binary (Base 2) – digits 0,1
• Denary / Decimal (Base 10) – digits 0{-}9
• Hexadecimal (Base 16) – digits 0{-}9,\,A{-}F (A=10…F=15)
• Nibble – group of 4 binary bits (range 0{-}15)
• Remainder – value left after integer division
Hex → Denary (Decimal)
• Positional method
Write column weights: 16^1,16^0 (extend for more digits)
Replace hex letters with values A=10,…,F=15
Multiply each digit by its weight and add
• Example: 97{16}=9\times16+7\times1=151{10}
• Binary-bridge methodConvert each hex digit to 4-bit binary
Write binary under weights 128,64,32,16,8,4,2,1
Add weighted values ➝ denary result
• Example: BE{16}=1011\,11102 \Rightarrow 128+32+16+8+4+2 = 190_{10}
Denary → Hex
• Division method
Divide denary number by 16
Quotient = high-order digit, remainder = low-order digit
Convert digits 10{-}15 to A{-}F
• Example: 166/16=10\,(A),\text{ rem }6 \Rightarrow A6_{16}
• Binary-bridge methodConvert denary to binary
Pad to full nibbles; split into 4-bit groups
Convert each nibble to hex
• Example: 166{10}=101001102 = 1010\,01102 \Rightarrow A6{16}
Binary ↔ Hex Quick Map
• 0000=0, 0001=1, 0010=2, 0011=3
• 0100=4, 0101=5, 0110=6, 0111=7
• 1000=8, 1001=9, 1010=A, 1011=B
• 1100=C, 1101=D, 1110=E, 1111=F
Common Examples (from lessons)
• FF{16}=15\times16+15=255{10}
• 3D{16}=3\times16+13=61{10}
• 200{10} \Rightarrow 12\,(C)\,\text{rem }8 \Rightarrow C8{16}
• 100100012 = 1001\,00012 \Rightarrow 91_{16}
Quick Steps Cheat-Sheet
Hex → Denary: multiply by powers of 16, add.
Denary → Hex: divide by 16; quotient & remainder → digits.
Binary → Hex: group 4 bits → single hex.
Hex → Binary: expand each digit to 4 bits.