I am stumped on writing the logic to test my four bit adder with inputs X[0:3],
ID: 1797656 • Letter: I
Question
I am stumped on writing the logic to test my four bit adder with inputs X[0:3], Y[0:3], and Cin, and outputs S[0:3], Cout, and OVF. I think my problem is either with my adder layout, or more likely, with the way I am assigning values to the busses.
The full adders that my four bit adder is based on are correct, and I am pretty sure my four bit adder is correct, but I must test the adder to be certain.
I am trying to do a simple test to see if the overflow is correct when Cin=0, and the results show that something is wrong. Here is an example of what the adder is finding:
X= 10 Y= 9 Cin= 0 S= 7 Cout= 0 OVF= 0;
I think it should instead be X=10, Y=9, Cin=0, S=3, Cout=1, OVF=1
Where am I going wrong?
Here is my four bit adder and my test fixture:
Explanation / Answer
try changing this part you will get the reeults for(i=0;iRelated Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.