# JulieYue_Lab3PostLab.pdf - 1 For this circuit if the result...

• 4
• 100% (1) 1 out of 1 people found this document helpful

This preview shows page 1 - 4 out of 4 pages.

1. For this circuit, if the result is A or B, then there will be an output and no carry out. If a carry in is added on top of those 2 outcomes, then there will also be a carry out. If both A and B are 1, then there’s a carry out. Basically, adding a carry in is like adding a 1, and the result is the output and the c out is like the carry in an addition problem. I verified this by turning on A and B in different ways and seeing the LEDs’ reactions.
2. When you subtract 2 numbers, the result is equal to the sum of the number with the 2’s complement of the other number. Therefore, for subtraction, one of the inputs is the 2’s complement of the original number. So x XOR 0 = x and x XOR 1 = x’. I verified this by inserting 0’s or 1’s into the xor gates and seeing the LEDs’ reactions. A3 A2 A1 A0 B3 B2 B1 B0 Bout S3 S2 S1 S0 1 0 0 0 0 0 1 0 0 0 1 1 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 1 1 0 1 0 0 0 0 1 0 1 1 1 1 1 0 1 0
1 0 1 0 1 0 1 1 1 1 1 1 1 0 1 1 0 0 0 1 1 0 0 0 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 0 1 0 1 1 0 1 1 1 1 0 1 3. A BCD adder adds two BCD digits together and outputs a sum digit in BCD.