I try to design a circuit that adds two 4-bit binary numbers, but I get confused about the carry thingy.
Above I add 0100 + 0101. The result should be 1001, but it shows 1100. buzzer
Later I did the 0110 + 1001 and it got it right (1111).
Then I tried 0111 + 0010 and I got 11010. buzzer
Is it the Half Adder fault?
Did I falsely connect each carry to the "CIN"s?
What's wrong?
Answer
Your switches are arranged LSb to MSb, but you're inputting the numbers MSb to LSb. Your schematic shows 0b0010 + 0b1010, with a correct result of 0b1100.
No comments:
Post a Comment