Download presentation
Presentation is loading. Please wait.
Published byAntony Floyd Modified over 9 years ago
1
Bits, Data types, and Operations: Chapter 2 COMP 2610 Dr. James Money COMP 2610 1
2
Hexadecimal Notation A – 10 B – 11 C – 12 D – 13 E – 14 F - 15
3
Hexadecimal Notation How do we convert from decimal -> hexadecimal? We divide by 16 and use the remainer as before in the radix method
4
Hexadecimal Notation Convert the following numbers to hexadecimal: – 128 – 273 – 983
5
Hexadecimal Notation Converting to decimal from hexadecimal works similarly. We have to use the base of 16. If M = (b k b k-1 …b 2 b 1 b 0 ) 16, then M=b k x 16 k + b k-1 x 16 k-1 +… + b 1 16 1 + b 0 16 0
6
Hexadecimal Notation Convert the following hexadecimal numbers to unsigned decimal form: – 0x34 – 0x10D – 0xABC4
7
Hexadecimal Notation Addition with hexadecimal form follows the same as binary using long addition However, the carry can be more difficult to handle: you have to mod by 16 to get the right carry value You have to remember A=10, B=11, etc
8
Hexadecimal Notation Add: – 0x027A + 0x123 – 0xA357 + 0xB35D
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.