Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In prior classes, you learned that signed values are represented in 2 ' s complement form. So subtraction such as A - B is simply

In prior classes, you learned that signed values are represented in 2's complement form. So subtraction such as A-B is simply A +2's complement of B. Also, in hardware subtraction of any two values is done as if they are signed values. You may declare P and Q as unsigned char (or int) in your C code, but P-Q is done as P+2's complement of Q.
eg: 3+5=8(are they signed or unsigned)? answer is the same, still 8.
eg: 3-5=-2 even if 3 and 5 are looked at as unsigned. We cannot say 3-5 is 2 because 3 and 5 are unsigned. ALU hardware makes the answer 11111dots11110 which is -2.
Q1) An arithmetic and logic unit (ALU) performs integer and logic operations. Implement (draw a minimized logic circuit) the logic of a simple ALU that performs 2-bit addition and subtraction. Assume the operands are A1A0 and B1B0, and the output is C1C0. The control signal Op is only one bit, which selects addition or subtraction. Two ways to solve this. (a) Use 2 bit adder (half adder + full adder) with inputs to it being modified based on Op signal, or (b) start from a truth table. Then you may have to develop a truth table and use K maps for 5 variables leading to a large circuit. See next page for help. Recall that subtraction is done with adding after making the subtrahend negative (2's complement) regardless of whether arguments are signed or unsigned.
image text in transcribed

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_2

Step: 3

blur-text-image_3

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 Database Management Systems

Authors: Mark L. Gillenson

3rd Edition

978-1119907466

More Books

Students also viewed these Databases questions

Question

What is the tax liability?

Answered: 1 week ago