Data Storage Introduction to computer, 2nd semester, 2010/2011 Mr.Nael Aburas Faculty of Information Technology Islamic University of Gaza
Hexadecimal (Hex) Hex is a numbering system that uses Base 16. The numbers are represented normally, but the numbers through are represented by the letters A through F 1 hex digit is equivalent to 4 bits Numbers are 0,1,2…..8,9, A, B, C, D, E, F. The following shows that the number (2AE) 16 in hexadecimal is equivalent to 686 in decimal. The following shows that the number (2AE) 16 in hexadecimal is equivalent to 686 in decimal. The equivalent decimal number is N = = 686. The equivalent decimal number is N = = 686.
Hexadecimal (Hex) Using hexadecimal, a very large binary string of 1s and 0s can be represented with just a few hexadecimal numbers by breaking the binary number into groups of four and then using the hexadecimal equivalent; for example, can be written as
Hexadecimal to decimal The following shows how to convert the hexadecimal number (1A) 16 to decimal The following shows how to convert the hexadecimal number (1A) 16 to decimal = 1 × A × 16 0 = ×1 =16+10 = 26 convert (F4C) 16 to decimal = (F x 16 2 ) + (4 x 16 1 ) + (C x 16 0 ) = (15 x 256) + (4 x 16) + (12 x 1)
Decimal to hexadecimal convert (4768) 10 to hex. = 4768 / 16 = 298 remainder 0 = 298 / 16 = 18 remainder 10 (A) = 18 / 16 = 1 remainder 2 = 1 / 16 = 0 remainder 1 Answer: 1 2 A 0
Hexadecimal to binary (24C) 16 (24C) 16 Each hexadecimal digit is converted to 4-bit patterns Each hexadecimal digit is converted to 4-bit patterns 2 → 0010, 4 → 0100, and C → → 0010, 4 → 0100, and C → 1100 (306 ) = ( )
Binary to hexadecimal Convert ( ) 2 to hexadecimal ? We first arrange the binary number in 4-bit patterns: E 2 Convert ( ) 2 to hexadecimal? C 6 B
Octal The Octal numbering system is similar to the Hexadecimal numbering system. This big difference is that the maximum value for Octal is 7 since it is Base 8 1 octal digit is equivalent to 3 bits.
Octal (1256) 8 (1256) 8
Octal to Decimal convert (632) 8 to decimal = (6 x 8 2 ) + (3 x 8 1 ) + (2 x 8 0 ) = (6 x 64) + (3 x 8) + (2 x 1) = = (410) 10
Decimal to Octal convert (177) 10 to octal 177 / 8 = 22 remainder is 1 22 / 8 = 2 remainder is 6 2 / 8 = 0 remainder is 2 Answer = 2 6 1
Binary to octal = =
Octal to binary convert (632) 8 to binary ( ) 2