Introduction to Binary Octal and Hexadecimal Numbers Part
Introduction to Binary, Octal and Hexadecimal Numbers Part 4 – Hexadecimal Numbers Thaddeus Konar Slide # 1 Binary, Octal and Hex Numbers Copyright Thaddeus Konar
Hexadecimal (Hex) Integers 1 Just as the each digit (position) in decimal integer is represented by the power of 10, in binary integer power of 2, in octal numbers - power of 8, and in hex integers – power of 16 (Base = 16). Digits range: 0 -> (Base - 1) Number of values represented by a single digit: Base Digits range: 0 -> 15 (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F) Number of values represented by a single digit: 16 Slide # 2 Binary, Octal and Hex Numbers Copyright Thaddeus Konar
Hex Integers 2 In the decimal number the digits could be 0, 1, 2, 3, 4, 5, 6, 7, 8, 9. (0 -> Base-1), in binary 0, 1 (Base-1), in octal 0, 1, 2, 3, 4, 5, 6, 7. (0 -> Base-1). In hex numbers the digits would be 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F (0 -> Base-1). The letters A through F represent the decimal numbers 10 to 15. The single decimal number can represent 10 values, the single binary number can represent only 2 values, the single octal number can represent 8 values, and the single hex number can represent 16 values. Slide # 3 Binary, Octal and Hex Numbers Copyright Thaddeus Konar
Hex Integers 3 In Hex integers Base = 16. Please recall the formula: (D 0*B 0)+(D 1*B 1)+(D 2*B 2)+(D 3*B 3)+…(Dn*Bn) B 0=1, B 1=16, B 2=256, B 3 =4096, B 4=65536… Lets look at the hex number A 59 C D 0=C, D 1=9, D 2=5, D 3=A Slide # 4 Binary, Octal and Hex Numbers Copyright Thaddeus Konar
Hex Integers 4 …A 59 C means: (12*160)+(9*161)+(5*162)+(A*163) = (12*1)+(9*16)+(5*256)+(10*4096) = 4239610 Here are the first few hex numbers: 00016 = 010 00416 = 410 00816 = 810 00 C 16 = 1210 01016 = 1610 00116 = 110 00516 = 510 00916 = 910 00 D 16 = 1310 01116 = 1710 00216 = 210 00616 = 610 00 A 16 = 1010 00 E 16 = 1410 01216 = 1810 00316 = 310 00716 = 710 00 B 16 = 1110 00 F 16 = 1510 01316 = 1910 Slide # 5 Binary, Octal and Hex Numbers Copyright Thaddeus Konar
- Slides: 5