Answered step by step
Verified Expert Solution
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 s complement form. So subtraction such as AB is simply A s complement of B Also, in hardware subtraction of any two values is done as if they are signed values. You may declare and as unsigned char or int in your C code, but is done as s complement of
eg: are they signed or unsigned answer is the same, still
eg: even if and are looked at as unsigned. We cannot say is because and are unsigned. ALU hardware makes the answer dots which is
Q 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 bit addition and subtraction. Assume the operands are and and the output is The control signal is only one bit, which selects addition or subtraction. Two ways to solve this. a Use 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 variables leading to a large circuit. See next page for help. Recall that subtraction is done with adding after making the subtrahend negative s complement regardless of whether arguments are signed or unsigned.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started