Programming 12 : Mr. Jean February 8 th, 2013
The plan: Video clip of the day Website Introduction to Hexadecimal Converting from Hexadecimal to Decimal Converting from Decimal to Hexadecimal Converting from Hexadecimal to Binary
Updated: Computer Science 12
Hexadecimal Decimal BLNKchttp:// BLNKc
Quantities/Counting (1 of 3) DecimalBinaryOctal Hexa- decima l p. 33
Quantities/Counting (2 of 3) DecimalBinaryOctal Hexa- decima l A B C D E F
Quantities/Counting (3 of 3) DecimalBinaryOctal Hexa- decima l Etc.
=>5 x 10 0 = 5 2 x 10 1 = 20 1 x 10 2 = Base Weight Example in Decimal:
Example in Binary: => 1 x 2 0 = 1 1 x 2 1 = 2 0 x 2 2 = 0 1 x 2 3 = 8 0 x 2 4 = 0 1 x 2 5 = Bit “0”
Hexadecimal to Decimal Hexadecimal DecimalOctal Binary
Hexadecimal to Decimal Technique –Multiply each bit by 16 n, where n is the “weight” of the bit –The weight is the position of the bit, starting from 0 on the right –Add the results
Example ABC 16 =>C x 16 0 = 12 x 1 = 12 B x 16 1 = 11 x 16 = 176 A x 16 2 = 10 x 256 =
Hexadecimal to Binary Hexadecimal DecimalOctal Binary
Hexadecimal to Binary Technique –Convert each hexadecimal digit to a 4-bit equivalent binary representation
Example 10AF 16 = ? A F AF 16 =
Decimal to Hexadecimal Hexadecimal DecimalOctal Binary
Decimal to Hexadecimal Technique –Divide by 16 –Keep track of the remainder
Example = ? = 4D = D
Try this exercise Don’t use a calculator! DecimalBinaryOctal Hexa- decimal AF
Exercise – Convert … DecimalBinaryOctal Hexa- decimal C AF Answer
To do: Complete worksheet #2 Homework Check on MONDAY for sheet #2