The circuit below is a 3 bit adder/subtraction circuit depending on the setting
ID: 653830 • Letter: T
Question
The circuit below is a 3 bit adder/subtraction circuit depending on the setting of the switch. Let A = 100 and B =101 be signed numbers and the switch is connected to 5V. Find the output of the B2 xor gate, B1 xor gate and B0 xor gate Find the adder outputs S2, S1 S0 and Co Perform the problem in decimal and compare the two answers. State if there is an overflow Let A = 100 and B =101 be unsigned numbers and the switch is connected to GROUND. Find the output of the B2 xor gate, B1 xor gate and B0 xor gate Find the adder outputs S2, S1 S0 and Co Perform the problem in decimal and compare the two answers. State if there is an overflowExplanation / Answer
When the switch is connected to 5V:
a) B = 101,
output of B2 XOR gate is 1 xor 1 = 0
output of B1 XOR gate is 0 xor 1 = 1
output of B0 XOR gate is 1 xor 1 = 0
b) carry_in for the adder is the switch and it is 1.
the adder inputs are 100 and 010 with C = 1
So the adder outputs are
1 0 0
0 1 0
1
1 1 1
The adder outputs are S2S2S0=111
and C0 = 0
c)
decimal addition is as shown
A = 100 signed number. first bit is 1 ==>> it is a negative number and hence in two's compilment form
A in decimal is -4
similarly B= 101 in decimal is - 3
And the switch is connected to 5 , so it is subtraction.
hence the output is -4 - (-3) = -1
- 1 in binary is 111
hence the output is correct and no overflow.
When the switch is connected to Ground:
a) B = 101,
output of B2 XOR gate is 1 xor 0 = 1
output of B1 XOR gate is 0 xor 0 = 0
output of B0 XOR gate is 1 xor 0 = 1
b) carry_in for the adder is the switch and it is 0
the adder inputs are 100 and 101 and C =0
So the adder outputs are
1 0 0
1 0 1
0
10 0 1
The adder outputs are S2 S1 S0 = 001
and C0 = 1
c)
decimal addition is as shown
A = 100 signed ===>> A in decimal is -4
B= 101 signed ==>>> B in decimal is -3
And the it is addition
SO it is -4 + -3 = -7
-7 in binary is 1001 and hence the output is overflown and the S2 S1 S0 along with C0 gives the result.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.