Question: Hints: On problem 3 on this week's homework, it can be a bit tricky to subtract fixed point binary numbers. The way to attack it

 Hints: On problem 3 on this week's homework, it can beHints:

On problem 3 on this week's homework, it can be a bit tricky to subtract fixed point binary numbers. The way to attack it is:

- figure out how many binary digits of precision you need to represent the fraction.

- represent both numbers to that level of precision.

- perform the mathematical operation WITHOUT the radix point ("decimal" point); that is, treat them as integers.

- put the radix point back in the answer.

There's also a nice trick to get the 2's complement version of a number:

Realize that n-bit 1's complement representation of -N (i.e. inverting all the bits) is just

(2^n-1)-N

In 8 bits

5 = 00000101

The 1's complement representation of this is

11111010 = 250 = 255-5

The 2's complement representation of a N is

2^n-N = 1's complement + 1

That is, you can take the 2's complement by

- inverting all the bits

- adding 1

Problem 3 Solve the following problems by converting to binary and solving with twos complemement arithmetic. Verify that the answers are correct. a) 67+101 b) 53-33 c) 17-24 d) 7.3+11.55 e) 19.77-8.2

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!