Monday, 27 March 2017

digital logic - 4-bit adder carry confusion


I try to design a circuit that adds two 4-bit binary numbers, but I get confused about the carry thingy.


enter image description here


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

arduino - Can I use TI's cc2541 BLE as micro controller to perform operations/ processing instead of ATmega328P AU to save cost?

I am using arduino pro mini (which contains Atmega328p AU ) along with cc2541(HM-10) to process and transfer data over BLE to smartphone. I...