Download presentation
Presentation is loading. Please wait.
Published byDaniela Wright Modified over 9 years ago
1
Programming 12 : Mr. Jean February 8 th, 2013
2
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
3
Updated: Computer Science 12 http://hrsbstaff.ednet.ns.ca/michaeljean/
4
Hexadecimal Decimal http://www.youtube.com/watch?v=TFY8Yu BLNKchttp://www.youtube.com/watch?v=TFY8Yu BLNKc
5
Quantities/Counting (1 of 3) DecimalBinaryOctal Hexa- decima l 0000 1111 21022 31133 410044 510155 611066 711177 p. 33
6
Quantities/Counting (2 of 3) DecimalBinaryOctal Hexa- decima l 81000108 91001119 10101012A 11101113B 12110014C 13110115D 14111016E 15111117F
7
Quantities/Counting (3 of 3) DecimalBinaryOctal Hexa- decima l 16100002010 17100012111 18100102212 19100112313 20101002414 21101012515 22101102616 23101112717 Etc.
8
125 10 =>5 x 10 0 = 5 2 x 10 1 = 20 1 x 10 2 = 100 125 Base Weight Example in Decimal:
9
Example in Binary: 101011 2 => 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 = 32 43 10 Bit “0”
10
Hexadecimal to Decimal Hexadecimal DecimalOctal Binary
11
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
12
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 = 2560 2748 10
13
Hexadecimal to Binary Hexadecimal DecimalOctal Binary
14
Hexadecimal to Binary Technique –Convert each hexadecimal digit to a 4-bit equivalent binary representation
15
Example 10AF 16 = ? 2 1 0 A F 0001 0000 1010 1111 10AF 16 = 0001000010101111 2
16
Decimal to Hexadecimal Hexadecimal DecimalOctal Binary
17
Decimal to Hexadecimal Technique –Divide by 16 –Keep track of the remainder
18
Example 1234 10 = ? 16 1234 10 = 4D2 16 16 1234 77 2 16 4 13 = D 16 0 4
19
Try this exercise Don’t use a calculator! DecimalBinaryOctal Hexa- decimal 33 1110101 703 1AF
20
Exercise – Convert … DecimalBinaryOctal Hexa- decimal 331000014121 117111010116575 45111100001 1 7031C3 43111010111 1 6571AF Answer
21
To do: Complete worksheet #2 Homework Check on MONDAY for sheet #2
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.