Answered step by step
Verified Expert Solution
Link Copied!

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Beginning Databases With PostgreSQL From Novice To Professional

Authors: Richard Stones, Neil Matthew

2nd Edition

1590594789, 978-1590594780

More Books

Students also viewed these Databases questions

Question

How can the Internet be helpful in a job search? (Objective 2)

Answered: 1 week ago