Presentation is loading. Please wait.

Presentation is loading. Please wait.

Hexadecimal numbers. Announcements Meeting of the Mathematics and Computing Society, Thursday 12:30pm BSC 126 Help available in Math Lab Check homework.

Similar presentations


Presentation on theme: "Hexadecimal numbers. Announcements Meeting of the Mathematics and Computing Society, Thursday 12:30pm BSC 126 Help available in Math Lab Check homework."— Presentation transcript:

1 Hexadecimal numbers

2 Announcements Meeting of the Mathematics and Computing Society, Thursday 12:30pm BSC 126 Help available in Math Lab Check homework due in assignment schedule

3 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.

4 What are hexadecimal numbers?

5 Convert to decimal 161 1 3D = 13

6 Convert to decimal 16 2 16116 2 161 A = 105F = 15

7 Convert Hexadecimal to binary Method works only for hexadecimal not for decimal B32 16 7931 16 Convert the decimal number 229 to decimal

8 Hexadecimal to binary Hexadecimal Digit Binary Number 00000 10001 20010 30011 40100 50101 60110 70111 81000 91001 A1010 B1011 C1100 D1101 E1110 F1111 B32 16 B1011 B32 16 = 1011 0011 0010 2 B1011 30011 20010 B1011 30011

9 Hexadecimal to binary Hexadecimal Digit Binary Number 00000 10001 20010 30011 40100 50101 60110 70111 81000 91001 A1010 B1011 C1100 D1101 E1110 F1111 7931 16 70111 7951 16 = 0111 1001 0011 0001 2 70111 91001 30011 70111 91001 30011 10001 70111 91001

10 From Decimal to Binary We need to use repeated subtraction Greatest power of two that fits into 229  128 229 -128 = 101  next power of twos: 64 101 – 64 = 37  next power of twos: 32 37 – 32 = 5  next power of twos: 4 5 – 4 = 1  next power of twos: 1 1 – 1 = 0 Stop 1286432168421 1 1286432168421 11 1286432168421 111 1286432168421 1111 1286432168421 11111 1286432168421 11100101 229 = 1110 0101 2

11 From Binary to Hexadecimal 1101 1001 1101 1001= D9 16 Hexadecimal Digit Binary Number 00000 10001 20010 30011 40100 50101 60110 70111 81000 91001 A1010 B1011 C1100 D1101 E1110 F1111 1101 D D 1001 9

12 From Binary to Hexadecimal 11110011001 2 Rewrite in packets of 4, starting from right: 111 1001 1001 2 Add 0 to left to complete packets of 4: 0111 1001 1001 2 Proceed as in previous slide

13 From Binary to Hexadecimal 0111 1001 1001 2 0111 1001 1001= 799 16 Hexadecimal Digit Binary Number 00000 10001 20010 30011 40100 50101 60110 70111 81000 91001 A1010 B1011 C1100 D1101 E1110 F1111 0111 7 7 1001 9 0111 7 1001 9 9

14 Practice Hexadecimal to decimal: 2B 16, 5F6 16 Hexadecimal to binary: A4C 16, 718 16 Decimal to binary: 218 Binary to Hexadecimal: – 1011 1101 0101 – 1110011101 Binary to decimal: – 1011 1101


Download ppt "Hexadecimal numbers. Announcements Meeting of the Mathematics and Computing Society, Thursday 12:30pm BSC 126 Help available in Math Lab Check homework."

Similar presentations


Ads by Google