Answered step by step
Verified Expert Solution
Question
1 Approved Answer
How would i go about adding decimal numbers 23 and -23 in 16 bit signed (twos compliment) hex format. 23 (base 10) = 0x0017 -23
How would i go about adding decimal numbers 23 and -23 in 16 bit signed (twos compliment) hex format.
23 (base 10) = 0x0017
-23 (base 10) = 0xFFE9
So:
0x0017 + 0xFFE9
7+9 = 16 (carry a 1, leave a 1)
1+1+14 = 16 (carry a 1, leave a 1)
1+0+15 = 16 (carry a 1, leave a 1)
1+0+15 = 16 (carry a 1, leave a 1)
So the result would be:
0x1111, with a (1) as a overflow bit
and this would represent 1*(16^3) + 1*(16^2)+1*(16^1)+1*(16^0) = 4369 (base 10)
Is this the correct way to approach this problem? It seems like the addition is incorrect it should be 0.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started