Dale - Computer Science Illuminated 130

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

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

View Full Document Right Arrow Icon
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.
Background image of page 1
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

This note was uploaded on 01/13/2011 for the course CSE 1550 taught by Professor Marianakant during the Fall '10 term at York University.

Ask a homework question - tutors are online