Download presentation
Presentation is loading. Please wait.
Published byAnnabella Strickland Modified over 9 years ago
1
Computer Programming 12 Mr. Jean February 11 th, 2014
2
The plan: Video clip of the day Review of Binary Review of Decimal Hexadecimal to Decimal Hexadecimal to Binary
3
125 10 =>5 x 10 0 = 5 2 x 10 1 = 20 1 x 10 2 = 100 125 Base Weight Example in Decimal:
4
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”
5
Hexadecimal to Decimal Hexadecimal DecimalOctal Binary
6
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
7
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
8
Hexadecimal to Binary Hexadecimal DecimalOctal Binary
9
Hexadecimal to Binary Technique –Convert each hexadecimal digit to a 4-bit equivalent binary representation
10
Example 10AF 16 = ? 2 1 0 A F 0001 0000 1010 1111 10AF 16 = 0001000010101111 2
11
Decimal to Hexadecimal Hexadecimal DecimalOctal Binary
12
Decimal to Hexadecimal Technique –Divide by 16 –Keep track of the remainder
13
Example 1234 10 = ? 16 1234 10 = 4D2 16 16 1234 77 2 16 4 13 = D 16 0 4
14
Try this exercise Don’t use a calculator! DecimalBinary Hexa- decimal 33 1110101 1AF
15
Exercise – Convert … DecimalBinary Hexa- decimal 3310000121 117111010175 45111100001 1 1C3 43111010111 1 1AF Answer
16
To do: Complete #1 & #2 on worksheet #2 (the backside of the page we were working on)
17
Moodle Login
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.