{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Dale - Computer Science Illuminated 130

# Dale - Computer Science Illuminated 130 - What about the...

This preview shows page 1. Sign up to view the full content.

Full adder A circuit that computes the sum of two bits, taking an input carry bit into account 4.4 Circuits 103 is 0. If both A and B are 1, the sum is 0 and the carry is 1. This yields the following truth table: Note that in this case we are actually looking for two output results, the sum and the carry. So our circuit has two output lines. If you compare the sum and carry columns to the output of the various gates, you see that the sum corresponds to the XOR gate and the carry corresponds to the AND gate. Thus, the following circuit diagram repre- sents a half adder: Test this diagram by assigning various combinations of input values and determining what two output values will be produced. Do the results follow the rules of binary arithmetic? They should. Now compare your results to the corresponding truth table. They should match there also.
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: What about the Boolean expression for this circuit? Since the circuit produces two distinct output values, we represent it using two Boolean expressions: sum = A ⊕ B carry = AB Note that a half adder does not take into account a possible carry value into the calculation (carry-in). That is, a half adder is fine for adding two single digits, but it cannot be used as is to compute the sum of two binary values with multiple digits each. A circuit called a full adder takes the carry-in value into account. We can use two half adders to make a full adder. How? Well, the input to the sum must be the carry-in and the sum from adding the two input Sum Carry A B A 1 1 B 1 1 Sum 1 1 Carry 1...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online