This preview shows pages 1–2. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: Adding Binary Numbers A key requirement of digital computers is the ability to use logical functions to perform arithmetic operations. The basis of this is addition; if we can add two binary numbers, we can just as easily subtract them, or get a little fancier and perform multiplication and division. How, then, do we add two binary numbers? Let's start by adding two binary bits. Since each bit has only two possible values, 0 or 1, there are only four possible combinations of inputs. These four possibilities, and the resulting sums, are: 0 + 0 = 0 0 + 1 = 1 1 + 0 = 1 1 + 1 = 10 Whoops! That fourth line indicates that we have to account for two output bits when we add two input bits: the sum and a possible carry. Let's set this up as a truth table with two inputs and two outputs, and see where we can go from there. INPUTS OUTPUTS Well, this looks familiar, doesn't it? The Carry output is a simple AND function, and the Sum is an ExclusiveOR. Thus, we can use two gates to add these two bits together. The resulting circuit is shown below....
View
Full
Document
This document was uploaded on 02/08/2012.
 Winter '09

Click to edit the document details