1. Engineering
  2. Computer Science
  3. please show steps in details...

Question: please show steps in details...

Question details

please show steps in details

PROBLEM 3 (38 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 byte. (8 pts) Example (n-8) , 54 + 210 77- 194 Borrow 54 = 0x36-00110110 210 = 0xD2 = 11010010 77-0x4D 01 001 1 0 1 - 194 = 0xC2 11000010 Overflow!--> 1 0 0 0 0 1 0 0 0 0 0 0 01 011 271137 111 75 4397 12843 b) We need to perform the following operations, where numbers are represented in 2s complement: (24 pts) -97256 413 617 -122 -26 For each case: 99 - 62 -127-37 -2-64 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 binary addition in 2s complement arithmetic. The result must have the same number of bits as the Determine whether there is overflow by: i. Usingc,Cn-1 (carries). ii. 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?

Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution