110 likes | 272 Vues
Revision Exercise. Hexadecimal Number System. Hexadecimal System. 16 different values possible: 0 1 2 3 4 5 6 7 8 9 A B C D E F (0 – 9) (10 11 12 13 14 15) A to F represent numbers 10 to 15 Base 16 E.g. C4 16. Binary to Hexadecimal Conversion.
E N D
Hexadecimal System • 16 different values possible: • 0 1 2 3 4 5 6 7 8 9 A B C D E F (0 – 9) (10 11 12 13 14 15) • A to F represent numbers 10 to 15 • Base 16 • E.g. C416
Binary to Hexadecimal Conversion Q: Convert 011011102 to hexadecimal. A: 8 4 2 1 8 4 2 1 0 1 1 0 1 1 1 0 4 + 2 8 + 4 + 2 6 14 = E 6E16
Hexadecimal to Binary Conversion Q: Convert C416 to binary. A: 8 4 2 1 8 4 2 1 1 1 0 0 0 1 0 0 2 8 + 4 4 C = 12 C416
Decimal to Hexadecimal Example 1 • Q: Convert 4110 to hex A: 16 41 16 2 Remainder 9 0 Remainder 2 Ans: 4110 = 2916
Decimal to Hexadecimal Example 2 • Q: Convert 10910 to hex A: 16 109 16 6 Remainder 13 0 Remainder 6 Ans: 10910 = 6 1316 = 6 D16
Hexadecimal to Decimal Example 1 • Q: Convert 3C16 to decimal A: 161 160 • Step 1: Place Values 3 C • Step 2: Multiply by place value (3 x 16) + (C x 1) • Step 3: Hex value for letters (3 x 16) + (12 x 1) • Step 4: Add values 48 + 12 6010
Hexadecimal to Decimal Example 2 • Q: Convert 1F16 to decimal A: 161 160 • Step 1: Place Values 1 F • Step 2: Multiply by place value (1 x 16) + (C x 1) • Step 3: Hex value for letters (1 x 16) + (15 x 1) • Step 4: Add values 16 + 15 3110
Decimal to Hexadecimal Short Method Q: Convert 13910 to hexadecimal. A: • convert 13910 to binary • 13910 100010112 • convert from 100010112 to hexadecimal. • 100010112 8B16
Hexadecimal to Decimal Short Method Q: Convert 1F16 to decimal. A: • convert 1F16 to binary • 1F16 000111112 • convert from 000111112 to decimal. • 000111112 3110