Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

A. Which scheme below ( 1 or 2 ) WILL NOT perform 4-bit subtraction correctly fo

ID: 1810551 • Letter: A

Question


A. Which scheme below (1 or 2) WILL NOT perform 4-bit subtraction correctly for the 4-bit words A=a3a2a1a0 and B=b3b2b1b0? For the scheme that can correctly perform 4-bit subtraction   (A-B), what is the required binary value for the flag ADD/SUB in order to compute A-B?

B. If A = 0110, B = 1101 and using the correct scheme above to perform the operation A-B. What are the values of co, s3, s2, s1, s0 at the end of the operation?


B. If A = 0110, B = 1101 and using the correct scheme above to perform the operation A-B. What are the values of co, s3, s2, s1, s0 at the end of the operation?

Explanation / Answer

A

subtraction is addition with two's complement of the number.


so to subtract B from A, we must perform [ A + (two's complement of B) ]


XOR acts as a controled inverter

so when ADD/SUB flag is binary '1' , B gets inverted. this gives 1's complent of B on XOR output.

two make it two's complement, binary '1' must be added.

such scheme is in scheme 1. so scheme 1 performs substraction.

and for subtraction ADD/SUB flag must be 1


B

A=0110 and B=1101

one's complement of B= 0010

so two's complement of B = [ one's complement of B + 1 ]

=0011

now ( A-B ) = [ A + (two's complement of B) ]

= 0110 + 0011

= 1001 (with carry 0)

c0 = 0

s3=1

s2=0

s1=0

s0=1

though this is the result of the above circuit. this does not turn out to be a correct subtraction result since A<B. this happens because above adder/subtractor does not take into account signed numbers( negetive numbers)


Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote