Reference no: EM133370954
Create a logic gate with inputs for 2 bits, and a carry in, then outputs the sum of those 2 bits, as well as giving us a carry-out.
1. Create two inputs and label them A, and B
2. Create an output called Sum
3. Create an extra input called carry in, and an extra output called carry out
4. If and only if A or B is 1, set the sum to 1
5. If A and B are 1, set sum to 0 and carryOut to 1
4. When the result of your addition overflows, put that overflow into your carry out (Yes, I'm being a little vague here. I believe in you guys!! There are some examples down below if you're still confused)
Some examples to get you started:
Given (A = 1, B = 0, CarryIn = 0) Sum = 1, CarryOut = 1
Given (A = 1, B = 1, CarryIn = 0) Sum = 0, CarryOut = 1
Given (A = 1, B = 1, CarryIn = 1) Sum = 1, CarryOut = 1