Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

the bit size is is always important with twos complement since you must be able to tell where the si... 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

Fundamentals of Digital Logic and Microcontrollers

Authors: M. Rafiquzzaman

6th edition

1-118-85579-9, 1118855795, 9781118969304, 978-1118855799

Students also viewed these Programming questions

Question

What is collectivism, and how is it different from individualism?

Answered: 1 week ago

Question

What is the technology used to fabricate EPROMs and EEPROMs?

Answered: 1 week ago