13
Data Storage Data Storage Introduction to computer, 2nd semester, 2010/2011 Mr.Nael Aburas [email protected] Faculty of Information Technology Islamic University of Gaza

Data Storage Introduction to computer, 2nd semester, 2010/2011 Mr.Nael Aburas [email protected]@iugaza.edu.ps Faculty of Information Technology Islamic

Embed Size (px)

Citation preview

Page 1: Data Storage Introduction to computer, 2nd semester, 2010/2011 Mr.Nael Aburas nras@iugaza.edu.psnras@iugaza.edu.ps Faculty of Information Technology Islamic

Data StorageData StorageIntroduction to computer, 2nd semester, 2010/2011Mr.Nael Aburas [email protected] of Information TechnologyIslamic University of Gaza

Page 2: Data Storage Introduction to computer, 2nd semester, 2010/2011 Mr.Nael Aburas nras@iugaza.edu.psnras@iugaza.edu.ps Faculty of Information Technology Islamic

Hexadecimal (Hex)Hexadecimal (Hex)• Hex is a numbering system that uses Base 16. The

numbers 0-910 are represented normally, but the numbers 1010 through 1510 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)The following shows that the number (2AE)1616 in in hexadecimal is equivalent to 686 in decimal.hexadecimal is equivalent to 686 in decimal.

• The equivalent decimal number is N = 512 + 160 + 14 = The equivalent decimal number is N = 512 + 160 + 14 = 686.686.

Page 3: Data Storage Introduction to computer, 2nd semester, 2010/2011 Mr.Nael Aburas nras@iugaza.edu.psnras@iugaza.edu.ps Faculty of Information Technology Islamic

Hexadecimal (Hex)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, 1101100101001111 can be written as 1101 1001 0100 1111

Page 4: Data Storage Introduction to computer, 2nd semester, 2010/2011 Mr.Nael Aburas nras@iugaza.edu.psnras@iugaza.edu.ps Faculty of Information Technology Islamic

Hexadecimal to decimalHexadecimal to decimal

• The following shows how to convert the The following shows how to convert the hexadecimal number (1A)hexadecimal number (1A)1616 to decimal to decimal

= = 1 × 161 × 1611 + A × 16 + A × 1600

=16 + 10 ×1=16 + 10 ×1

=16+10 = 26=16+10 = 26convert (F4C)16 to decimal

= (F x 162) + (4 x 161) + (C x 160)= (15 x 256) + (4 x 16) + (12 x 1)

Page 5: Data Storage Introduction to computer, 2nd semester, 2010/2011 Mr.Nael Aburas nras@iugaza.edu.psnras@iugaza.edu.ps Faculty of Information Technology Islamic

Decimal to hexadecimalDecimal 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 1Answer: 1 2 A 0

Page 6: Data Storage Introduction to computer, 2nd semester, 2010/2011 Mr.Nael Aburas nras@iugaza.edu.psnras@iugaza.edu.ps Faculty of Information Technology Islamic

Hexadecimal to binaryHexadecimal to binary

• (24C)(24C)1616

• Each hexadecimal digit is converted to Each hexadecimal digit is converted to 4-bit4-bit patterns patterns

• 2 → 0010, 4 → 0100, and C → 11002 → 0010, 4 → 0100, and C → 1100• (306 ) = (00110000 0110)

Page 7: Data Storage Introduction to computer, 2nd semester, 2010/2011 Mr.Nael Aburas nras@iugaza.edu.psnras@iugaza.edu.ps Faculty of Information Technology Islamic

Binary to hexadecimal Binary to hexadecimal

Convert (010011100010)2 to hexadecimal ?

We first arrange the binary number in 4-bit patterns:

0100 1110 0010

4 E 2

Convert (0010110001101011)2 to hexadecimal?0010 1100 0110 1011

2 C 6 B

Page 8: Data Storage Introduction to computer, 2nd semester, 2010/2011 Mr.Nael Aburas nras@iugaza.edu.psnras@iugaza.edu.ps Faculty of Information Technology Islamic

OctalOctal

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.

Page 9: Data Storage Introduction to computer, 2nd semester, 2010/2011 Mr.Nael Aburas nras@iugaza.edu.psnras@iugaza.edu.ps Faculty of Information Technology Islamic

OctalOctal

• (1256)(1256)88

Page 10: Data Storage Introduction to computer, 2nd semester, 2010/2011 Mr.Nael Aburas nras@iugaza.edu.psnras@iugaza.edu.ps Faculty of Information Technology Islamic

Octal to DecimalOctal to Decimal

convert (632)8 to decimal= (6 x 82) + (3 x 81) + (2 x 80)= (6 x 64) + (3 x 8) + (2 x 1)= 384 + 24 + 2= (410)10

Page 11: Data Storage Introduction to computer, 2nd semester, 2010/2011 Mr.Nael Aburas nras@iugaza.edu.psnras@iugaza.edu.ps Faculty of Information Technology Islamic

Decimal to OctalDecimal to Octal

convert (177)10 to octal177 / 8 = 22 remainder is 122 / 8 = 2 remainder is 62 / 8 = 0 remainder is 2Answer = 2 6 1

Page 12: Data Storage Introduction to computer, 2nd semester, 2010/2011 Mr.Nael Aburas nras@iugaza.edu.psnras@iugaza.edu.ps Faculty of Information Technology Islamic

Binary to octalBinary to octal

111001112 = 3478

11000 010101010 010 0012 = 30252218

Page 13: Data Storage Introduction to computer, 2nd semester, 2010/2011 Mr.Nael Aburas nras@iugaza.edu.psnras@iugaza.edu.ps Faculty of Information Technology Islamic

Octal to binaryOctal to binary

convert (632)8 to binary

(110011010)2