Download presentation

Presentation is loading. Please wait.

Published byHoward Henry Modified about 1 year ago

1
R. Johnsonbaugh Discrete Mathematics 5 th edition, 2001 Chapter 9 Boolean Algebras and Combinatorial Circuits

2
9.1 Combinatorial circuits A bit is a 0 or a 1. Input x 1, x 2 can be 0 or 1 ------------------------------------------- Conjunction: AND x 1 x 2 = 1 if x 1 = x 2 = 1 0 otherwise Logical gates

3
Inclusive disjunction OR x 1 v x 2 = 1 if x 1 = 1 or x 2 = 1 0 otherwise

4
Negation NOT ~ x = 1 if x = 0 0 if x = 1

5
Logic Tables A logic table of a combinatorial circuit is a table with all possible inputs and all its resulting outputs x1x1 x2x2 x1^x2x1^x2 x 1 v x 2 1111 1001 0101 0000 x~x 10 01

6
Boolean expressions A Boolean expression such as y = ~((x 1 ^ x 2 )vx 3 ) is composed of literals like x 1, x 2, x 3 and symbols like ^, v, ~, ) and ( We write y = y(x 1, x 2, x 3 ) The value of a Boolean expression is the bit obtained when the literals are replaced by bits, e.g. y(0,1,0) = 1.

7
Combinatorial circuits

8
Logic table The logic table corresponding to the Boolean expression y = ~((x 1 ^ x 2 ) v x 3 ). x1x1 x2x2 x3x3 y 1110 1100 1010 1001 0110 0101 0010 0001

9
9.2 Properties of Combinatorial Circuits 4. Identity laws av0 = a a^1 = a 5. Complement laws av(~a) = 1 a^(~a) = 0 For a, b, c {0, 1} 1. Associative laws av(bvc) = (avb)vc a^(b^c) = (a^b)^c 2. Commutative laws avb = bva a^b = b^a 3. Distributive laws a^(bvc) = (a^b) v (a^c) av(b^c) = (avb) ^ (avc)

10
Boolean expressions Two Boolean expressions X = X(x 1, x 2,…,x n ) and Y = Y(x 1, x 2,…, x n ) are equal (write X = Y) if and only if X(a 1,a 2,…, a n ) = Y(a 1, a 2,…, a n ) for all a i {0, 1}, 1 < i < n. Example: X(x 1,x 2, x 3 ) = ~x 1 ^ (x 2 vx 3 ) and Y(x 1,x 2, x 3 ) = (~x 1 ^ x 2 ) v (~x 1 ^ x 3 ) are equal.

11
Equivalent combinatorial circuits Two combinatorial circuits, each having inputs x 1,…, x n and a single output for each set of inputs, are equivalent if, given the same inputs, the two circuits produce the same output. Theorem 9.2.7: Let C and D be two combinatorial circuits with X and Y the Boolean expressions that represent C and D, respectively. C and D are equivalent if and only if X = Y,

12
9.3 Boolean algebras Let A be a nonempty set containing distinct elements 0 and 1, endowed with two binary operations + and and a unary operation ~ (complement) that satisfy properties 1 to 5. Then A is called a Boolean algebra. 1. Associative laws a + (b + c) = (a + b) + c a (b c) = (a b) c 2. Commutative laws a + b = b + a a b = b a 3. Distributive laws a (b + c) = (a b) + (a c) a + (b c) = (a + b) (a + c) 4. Identity laws a + 0 = a a 1 = a 5. Complement laws a + (~a) = 1 a (~a) = 0

13
Example 1 of a Boolean algebra Example 1: Z Z 2 = {0,1}, with the operations and defined by the tables below, is a Boolean algebra. 01 001 110 01 000 101

14
Example 2: Power set Let U be a universal set and S = P(U) = power set of U. For any elements X, Y S define X + Y = X Y X·Y = X Y ~X = U - X Let 0 = and 1 = U. Then properties 1-5 hold and S is a Boolean algebra.

15
Complement in a Boolean algebra In a Boolean algebra A, given x A, an element x' such that x' + x = 1 and x' x = 0 is called the complement of x. Theorem 9.3.4: The complement x' of each x in a Boolean algebra is unique. Specifically, if x + y = 1 and x y = 0 then y = x'.

16
Dual statements Equations in Boolean algebras come in pairs. For example, the identity laws x+0 = x and x1 = x. These are called dual statements. The dual of a statement in Boolean algebras is obtained by making the following replacements: 0 replaced by 1, 1 replaced by 0, + replaced by, replaced by +

17
A duality theorem The following is an important theorem about duality statements in a Boolean algebra: Theorem 9.3.10: The dual of a theorem about Boolean algebras is also a theorem.

18
9.4 Boolean functions and synthesis of circuits Let X(x 1,…, x n ) be a Boolean expression. A Boolean function is a function of the form f(x 1,…, x n ) = X(x 1,…, x n ) Its domain is Z (Z 2 ) n = {(x 1, x 2,…, x n ) | x i {0, 1}, 1 < i < n} Z and its range is Z 2 = {0, 1} ZZ X : (Z 2 ) n Z 2

19
Example of a Boolean function Exclusive OR, in symbol The binary operation can be expressed as a Boolean function x 1 x 2 = X(x 1,x 2 ), Z with domain = {(1,1),(1,0),(0,1),(0,0)} = (Z 2 ) 2 ; Z and range = Z 2 = {0, 1}. x1x1 x2x2 x 1 x 2 110 101 011 000

20
Minterm A minterm in the symbols x 1,…, x n is a Boolean expression of the form m = y 1 ^ y 2 ^ … ^ y n where each y k is either x k or its complement x k ', 1 < k < n.

21
Disjunctive normal form Theorem 9.4.6: Let f: (Z 2 ) n Z 2 be a Boolean function not identically zero. Let A 1, A 2,…, A k denote the elements of (Z 2 ) n such that f(A i ) = 1. For each A i = (a 1,…, a n ) set m i = y 1 ^…^ y n where y j = x j (if a j = 1) OR ~x j (if a j = 0). Then f(x 1,…, x n ) = m 1 v…v m k. The disjunctive normal form of a Boolean function is a representation of f as a disjunction of m k 's as in the theorem.

22
Use of disjunctive normal form Let f(x 1, x 2 ) = (~x 1 )vx 2. Its truth table is A 1 = (1,1) A 2 = (0,1) A 3 = (0,0) Then m 1 = x 1 ^ x 2 m 2 = (~x 1 ) ^ x 2 m 3 = (~x 1 ) ^ (~x 2 ) It can be verified that f(x 1, x 2 ) = m 1 v m 2 v m 3 x1x1 x2x2 ~x 1 vx 2 111 100 011 001

23
9.5 Applications Definition of functionally complete set of gates: A gate is a function f : (Z 2 ) n Z 2, for n > 1 A set of gates S = {g 1, g 2,…, g k } is said to be functionally complete if given any positive integer n and a function f : (Z 2 ) n Z 2, it is possible to construct a combinatorial circuit that computes f using only the set of gates S.

24
NAND The NAND gate x 1 x 2 is equivalent to ~(x 1 ^ x 2 ), and is defined by the table and the diagram x1x1 x2x2 x1x2x1x2 110 101 011 001

25
NAND circuits Using NAND we can write x' = x x x v y = (x x) (y y)

26
Functionally complete sets of gates Theorem 9.4.6: The set of gates {AND, OR, NOT} is functionally complete. Theorem 9.5.5: The sets of gates S 1 = {AND, NOT} and S 2 = {OR, NOT} are functionally complete. Theorem 9.5.7: The set {NAND} is functionally complete.

27
Minimization problem The minimization problem consists of finding the circuit that represents a Boolean function with the minimal number of gates. Example: The following circuit represents the Boolean function f(x,y,z) = xyz v xyz' v xy'z' = x(y v z')

28
Half adder Input: two bits x and y Two outputs: binary sum cs, where c is the carry bit and s is the sum bit. xycs 1110 1001 01 0000

29
Half adder circuit Two outputs: s = (x v y) ^ [~(x ^ y)] = x y c = x ^ y

30
Full adder xyzcs 11111 11010 101 10001 01110 01001 001 00000 Full adder table

31
A circuit to add two 3-bit numbers

Similar presentations

Presentation is loading. Please wait....

OK

(CSC 102) Discrete Structures Lecture 5.

(CSC 102) Discrete Structures Lecture 5.

© 2017 SlidePlayer.com Inc.

All rights reserved.

Ads by Google

Ppt on domestic robots in japan Ppt on polynomials and coordinate geometry games Ppt on diode characteristics curve Ppt on barack obama leadership behaviors Ppt on automobile related topics in economics Ppt on pi in maths games Ppt on body language management Ppt on useful and harmful insects Ppt on polynomials for class 10 Ppt on statistics and probability for dummies