Hexadecimal numbers
Announcements Meeting of the Mathematics and Computing Society, Thursday 12:30pm BSC 126 Help available in Math Lab Check homework due in assignment schedule
Why Hexadecimal numbers? Binary numbers are long and difficult to read. Hexadecimal numbers are efficient to use for the computers and easy to read to human.
What are hexadecimal numbers?
Convert to decimal D = 13
Convert to decimal A = 105F = 15
Convert Hexadecimal to binary Method works only for hexadecimal not for decimal B Convert the decimal number 229 to decimal
Hexadecimal to binary Hexadecimal Digit Binary Number A1010 B1011 C1100 D1101 E1110 F1111 B32 16 B1011 B32 16 = B B
Hexadecimal to binary Hexadecimal Digit Binary Number A1010 B1011 C1100 D1101 E1110 F =
From Decimal to Binary We need to use repeated subtraction Greatest power of two that fits into 229 = 101 next power of twos: – 64 = 37 next power of twos: – 32 = 5 next power of twos: 4 5 – 4 = 1 next power of twos: 1 1 – 1 = 0 Stop =
From Binary to Hexadecimal = D9 16 Hexadecimal Digit Binary Number A1010 B1011 C1100 D1101 E1110 F D D
From Binary to Hexadecimal Rewrite in packets of 4, starting from right: Add 0 to left to complete packets of 4: Proceed as in previous slide
From Binary to Hexadecimal = Hexadecimal Digit Binary Number A1010 B1011 C1100 D1101 E1110 F
Practice Hexadecimal to decimal: 2B 16, 5F6 16 Hexadecimal to binary: A4C 16, Decimal to binary: 218 Binary to Hexadecimal: – – Binary to decimal: –