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

Slides:



Advertisements
Similar presentations
Boolean Algebra and Logic Gates
Advertisements

Chapter 2 Logic Circuits.
Logic Gate Level Part 2. Constructing Boolean expression from truth table First method: write nonparenthesized OR of ANDs Each AND is a 1 in the result.
Chapter 2 – Combinational Logic Circuits Part 1 – Gate Circuits and Boolean Equations Logic and Computer Design Fundamentals.
1 Section 10.1 Boolean Functions. 2 Computers & Boolean Algebra Circuits in computers have inputs whose values are either 0 or 1 Mathematician George.
Boolean Algebra and Logic Gates
Lecture 3. Boolean Algebra, Logic Gates
1 CSE 20: Lecture 7 Boolean Algebra CK Cheng 4/21/2011.
Propositional Calculus Math Foundations of Computer Science.
Algebra Algebra – defined by the tuple:  A, o 1, …, o k ; R 1, …, R m ; c 1, …, c k  Where: A is a non-empty set o i is the function, o i : A p i  A.
Fall 2002CMSC Discrete Structures1 Yes, No, Maybe... Boolean Algebra.
Chapter 2: Boolean Algebra and Logic Functions
Boolean Algebra Dr. Bernard Chen Ph.D. University of Central Arkansas Spring 2009.
Computer Organization
Systems Architecture I1 Propositional Calculus Objective: To provide students with the concepts and techniques from propositional calculus so that they.
BOOLEAN ALGEBRA Saras M. Srivastava PGT (Computer Science)
Boolean Algebra and Digital Circuits
F = ∑m(1,4,5,6,7) F = A’B’C+ (AB’C’+AB’C) + (ABC’+ABC) Use X’ + X = 1.
Computer Organization 1 Logic Gates and Adders. Propositions –Venn Diagrams.
Boolean Algebra and Computer Logic Mathematical Structures for Computer Science Chapter 7.1 – 7.2 Copyright © 2006 W.H. Freeman & Co.MSCS Slides Boolean.
Dr. Eng. Farag Elnagahy Office Phone: King ABDUL AZIZ University Faculty Of Computing and Information Technology CPCS 222.
Logic Gates Shashidhara H S Dept. of ISE MSRIT. Basic Logic Design and Boolean Algebra GATES = basic digital building blocks which correspond to and perform.
Lecture 22: 11/19/2002CS170 Fall CS170 Computer Organization and Architecture I Ayman Abdel-Hamid Department of Computer Science Old Dominion University.
LOGIC GATES & BOOLEAN ALGEBRA
Discrete Mathematics CS 2610 February 12, Agenda Previously Finished functions Began Boolean algebras And now Continue with Boolean algebras.
CSE 20: Lecture 7 Boolean Algebra CK Cheng
Discrete Mathematics CS 2610 September Equal Boolean Functions Two Boolean functions F and G of degree n are equal iff for all (x 1,..x n )  B.
CHAPTER 1 SETS, FUNCTIONs, ELEMENTARY LOGIC & BOOLEAN ALGEBRAs
Lecture 4 Boolean Algebra. Logical Statements °A proposition that may or may not be true: Today is Monday Today is Sunday It is raining °Compound Statements.
1 Lect # 2 Boolean Algebra and Logic Gates Boolean algebra defines rules for manipulating symbolic binary logic expressions. –a symbolic binary logic expression.
Binary Logic and Gates Boolean Algebra Canonical and Standard Forms Chapter 2: Boolean Algebra and Logic Gates.
Boolean Algebra & Logic Circuits Dr. Ahmed El-Bialy Dr. Sahar Fawzy.
ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN Lecture 4 Dr. Shi Dept. of Electrical and Computer Engineering.
Boolean Algebra. BOOLEAN ALGEBRA Formal logic: In formal logic, a statement (proposition) is a declarative sentence that is either true(1) or false (0).
CSE 461. Binary Logic Binary logic consists of binary variables and logical operations. Variables are designated by letters such as A, B, C, x, y, z etc.
Boolean Algebra.
CHAPTER 2 Boolean algebra and Logic gates
Chapter 12. Chapter Summary Boolean Functions Representing Boolean Functions Logic Gates Minimization of Circuits (not currently included in overheads)
Logic Gates and Boolean Algebra
Chapter 11 (Part 1): Boolean Algebra
Chapter 2: Boolean Algebra and Logic Functions
Boolean Algebra.
Unit 2 Boolean Algebra.
ECE 20B, Winter 2003 Introduction to Electrical Engineering, II LECTURE NOTES #2 Instructor: Andrew B. Kahng (lecture)
CS 105 Digital Logic Design
Gate Circuits and Boolean Equations
… and now for the Final Topic:
Overview Part 1 – Gate Circuits and Boolean Equations
Princess Sumaya University
ECE 331 – Digital System Design
CSE 311 Foundations of Computing I
Propositional Calculus: Boolean Algebra and Simplification
Boolean Algebra.
Discrete Mathematics CS 2610
Boolean Algebra.
CMSC Discrete Structures
Boolean Algebra & Logic Circuits
Basic Logic Gates 1.
Lecture 14: Boolean Algebra
Chapter 2 Boolean Algebra and Logic Gate
CSE 370 – Winter Combinational Logic - 1
Week 7: Gates and Circuits: PART II
Yes, No, Maybe... BooleanAlgebra 12/10/2018.
Boolean Algebra Introduction CSCI 240
Chapter 10.1 and 10.2: Boolean Algebra
Applied Discrete Mathematics Week 4: Functions
COMS 361 Computer Organization
Logic Circuits I Lecture 3.
CMSC Discrete Structures
Presentation transcript:

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

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

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

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

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 x~x 10 01

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.

Combinatorial circuits

Logic table The logic table corresponding to the Boolean expression y = ~((x 1 ^ x 2 ) v x 3 ). x1x1 x2x2 x3x3 y

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)

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.

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,

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

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.  

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.

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'.

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 +

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

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

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

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.

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.

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

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.

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 x1x2x1x

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

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.

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')

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

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

Full adder xyzcs Full adder table

A circuit to add two 3-bit numbers