Академический Документы
Профессиональный Документы
Культура Документы
Boolean Algebra
by Kenneth H. Rosen, Discrete Mathematics & its Applications, Sixth Edition, Mc Graw-Hill, 2007
Adders
Question: How can we carry out operations such as
additions of two positive integers (in binary expansion)
using logic circuits?
We first build a circuit that can be used to determine
x + y where x and y are two bits
Input Output
x
1
1
0
0
Dr. Djamel Bouchaffra
y
1
0
1
0
s
0
1
1
0
c
1
0
0
0
CSE 504 Discrete Structures & Foundations of Computer Science. Ch. 10 (Part 1): Boolean Algebra
CSE 504 Discrete Structures & Foundations of Computer Science. Ch. 10 (Part 1): Boolean Algebra
x
y
Sum ( x y )( xy )
x
y
xy
xy
Carry = xy
CSE 504 Discrete Structures & Foundations of Computer Science. Ch. 10 (Part 1): Boolean Algebra
We need to compute the sum bit and the carry bit when two
bits and a carry are added
The inputs to this full adder are the bits x and y and the
carry ci
The outputs are the sum bit s and the new carry ci+1.
Input
Output
ci
Ci+ 1
1
1
1
1
0
0
0
0
1
1
0
0
1
1
0
0
1
0
1
0
1
0
1
0
1
0
0
1
0
1
1
0
1
1
1
0
1
0
0
0
CSE 504 Discrete Structures & Foundations of Computer Science. Ch. 10 (Part 1): Boolean Algebra
CSE 504 Discrete Structures & Foundations of Computer Science. Ch. 10 (Part 1): Boolean Algebra
ci
( x y )( xy )
x
y
Half
adder
Half
adder
xy
A full adder
Dr. Djamel Bouchaffra
CSE 504 Discrete Structures & Foundations of Computer Science. Ch. 10 (Part 1): Boolean Algebra
s0
Half
adder c0
s1
Full
Adder ci
s2
y1
x2
y2
Dr. Djamel Bouchaffra
Full
Adder
c2 = s 3
CSE 504 Discrete Structures & Foundations of Computer Science. Ch. 10 (Part 1): Boolean Algebra
Introduction
Goal: Representing circuits with Boolean expressions
having fewer operations
Example: a circuit has output 1 if and only if:
x = y = z = 1 or x = z = 1 and y = 0. The sum-ofproduct of this circuit is:
CSE 504 Discrete Structures & Foundations of Computer Science. Ch. 10 (Part 1): Boolean Algebra
10
xyz
xyz xyz
x
y
z
x
z
xyz
xz
CSE 504 Discrete Structures & Foundations of Computer Science. Ch. 10 (Part 1): Boolean Algebra
11
CSE 504 Discrete Structures & Foundations of Computer Science. Ch. 10 (Part 1): Boolean Algebra
12
CSE 504 Discrete Structures & Foundations of Computer Science. Ch. 10 (Part 1): Boolean Algebra
13
xy
xy
xy
xy
CSE 504 Discrete Structures & Foundations of Computer Science. Ch. 10 (Part 1): Boolean Algebra
y
x
x
x
(a)
x
x
(b)
1
(c)
14
15
CSE 504 Discrete Structures & Foundations of Computer Science. Ch. 10 (Part 1): Boolean Algebra
16
y
x
x
(a)
1
1
x
x
(b)
1
(c)
CSE 504 Discrete Structures & Foundations of Computer Science. Ch. 10 (Part 1): Boolean Algebra
17
CSE 504 Discrete Structures & Foundations of Computer Science. Ch. 10 (Part 1): Boolean Algebra