Question: PROBLEM 4 (34 PTS) a) Perform the following additions and subtractions of the following unsigned integers. Use the fewest number of bits n to

PROBLEM 4 (34 PTS) a) Perform the following additions and subtractions of the following unsigned integers.

PROBLEM 4 (34 PTS) a) Perform the following additions and subtractions of the following unsigned integers. Use the fewest number of bits n to represent both operators. Indicate every carry (or borrow) from co to Cn (or bo to bn). For the addition, determine whether there is an overflow. For the subtraction, determine whether we need to keep borrowing from a higher bit. (8 pts) Example (n=8): 54+ 210 Overflow 221117 76 + 175 I=B C=1 i. ii. C=1 0 0 1 1 0 1 1 0 + 540x36= 210 0xD2 = 1 1 0 1 0 0 1 0 1 0 0 0 0 1 0 0 0 0= Co=0 77 - 194 Borrow out! 77= 0x4D = 194 0xC2 = 93 128 130 43 bg=1 by=0 87 - 62 -127 - 66 b=0 b) We need to perform the following operations, where numbers are represented in 2's complement (2C): (20 pts) 43 - 130 156 +359 126-91 For each case: Determine the minimum number of bits required to represent both summands. You might need to sign-extend one of the summands, since for proper summation, both summands must have the same number of bits. Perform the signed (2C) binary addition. The result must have the same number of bits as the summands. Determine whether there is overflow by: 0 1 0 0 1 1 0 1 - 1 1 0 0 0 0 1 0 1000 101 1 Using Cn Cn-1 (carries). Performing the operation in the decimal system and checking whether the result is within the allowed range for n bits, where n is the minimum number of bits for the summands. If we want to avoid overflow, what is the minimum number of bits required to represent both the summands and the result? c) Get the multiplication results of the following numbers that are represented in 2's complement arithmetic with 4 bits. (6 pts) 0101x0101, 1011x0111, 1010x1110.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

the bit size is is always important with twos complement since you must be able to tell where the si... View full answer

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 Programming Questions!