Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

please show as much work as possible! PROBLEM 1 (38 PTS) a) Perform the following additions and subtractions of the following unsigned integers. Use the

image text in transcribed

please show as much work as possible!

PROBLEM 1 (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 bit. (8 pts) Example (n=8): 54 + 210 0=) Ci=0 77 - 194 Borrow out! Cg=1 PO C=1 PO C=1 OP C5=1 oo Cz=1 OP C2=1 0= oo bg=1 Po b=0 0=q Ha b=0 oo b=0 oo b=0 O bg=0 Obz=1 Obo=0 54 = 0x36 210 = OxD2 0 0 1 1 0 1 1 0 + 1 1 0 1 0 0 1 0 77 = 0x4D = 194 = OxC2 0 1 0 0 1 1 0 1 - 1 1 0 0 0 0 1 0 Overflow! 1 0 0 0 0 1 0 0 0 0 0 0 0 1 0 1 1 23 + 403 103 + 204 128 - ) 199 - 107 225 + 31 137 + 886 b) We need to perform the following operations, where numbers are represented in 2's complement: (24 pts) -61 + 128 -126 + 263 -511 - 167 256 - 257 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 binary addition in 2's complement arithmetic. The result must have the same number of bits as the summands. Determine whether there is overflow by: i. Using Cn 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? c) Perform the multiplication of the following numbers that are represented in 2's complement arithmetic with 4 bits. (6 pts) 0101x0111, 0101x1001, 1100x1010

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

Database Horse Betting The Road To Absolute Horse Racing 2

Authors: NAKAGAWA,YUKIO

1st Edition

B0CFZN219G, 979-8856410593

More Books

Students also viewed these Databases questions