Logic Synthesis and Verification

Similar documents
3 Boolean Algebra 3.1 BOOLEAN ALGEBRA

Boolean Algebra CHAPTER 15

3. Abstract Boolean Algebras

Combinational Logic Design Principles

Combinational Logic. Review of Combinational Logic 1

Review CHAPTER. 2.1 Definitions in Chapter Sample Exam Questions. 2.1 Set; Element; Member; Universal Set Partition. 2.

Boolean algebra. Values

LATTICE AND BOOLEAN ALGEBRA

CS 226: Digital Logic Design

Chapter 2: Switching Algebra and Logic Circuits

Logic Design. Chapter 2: Introduction to Logic Circuits

EECS150 - Digital Design Lecture 19 - Combinational Logic Circuits : A Deep Dive

BOOLEAN ALGEBRA INTRODUCTION SUBSETS

EECS150 - Digital Design Lecture 4 - Boolean Algebra I (Representations of Combinational Logic Circuits)

Outline. EECS150 - Digital Design Lecture 4 - Boolean Algebra I (Representations of Combinational Logic Circuits) Combinational Logic (CL) Defined

Chapter 2 Combinational Logic Circuits

2. Associative Law: A binary operator * on a set S is said to be associated whenever (A*B)*C = A*(B*C) for all A,B,C S.

Compound Propositions

Midterm1 Review. Jan 24 Armita

CHAPTER III BOOLEAN ALGEBRA

2.2: Logical Equivalence: The Laws of Logic

Logic Synthesis and Verification

Conjunction: p q is true if both p, q are true, and false if at least one of p, q is false. The truth table for conjunction is as follows.

Lecture Notes on DISCRETE MATHEMATICS. Eusebius Doedel

ELEC Digital Logic Circuits Fall 2014 Boolean Algebra (Chapter 2)

Discrete Mathematics. CS204: Spring, Jong C. Park Computer Science Department KAIST

Combinational Logic Fundamentals

2009 Spring CS211 Digital Systems & Lab CHAPTER 2: INTRODUCTION TO LOGIC CIRCUITS

CHAPTER III BOOLEAN ALGEBRA

Section 1.2 Propositional Equivalences. A tautology is a proposition which is always true. A contradiction is a proposition which is always false.

Chapter 2 Combinational Logic Circuits

Digital Circuit And Logic Design I. Lecture 3

E&CE 223 Digital Circuits & Systems. Lecture Transparencies (Boolean Algebra & Logic Gates) M. Sachdev

Boolean algebra. Examples of these individual laws of Boolean, rules and theorems for Boolean algebra are given in the following table.

Notation Index. gcd(a, b) (greatest common divisor) NT-16

If f = ABC + ABC + A B C then f = AB C + A BC + AB C + A BC + A B C

Administrative Notes. Chapter 2 <9>

BOOLEAN ALGEBRA 1. DEFINITION

Chapter 2. Boolean Algebra and Logic Gates

CSC Discrete Math I, Spring Propositional Logic

Section 4.1 Switching Algebra Symmetric Functions

E&CE 223 Digital Circuits & Systems. Lecture Transparencies (Boolean Algebra & Logic Gates) M. Sachdev. Section 2: Boolean Algebra & Logic Gates

Hardware Design I Chap. 2 Basis of logical circuit, logical expression, and logical function

REVIEW QUESTIONS. Chapter 1: Foundations: Sets, Logic, and Algorithms

Chapter 1. Logic and Proof

Foundations of Mathematics Worksheet 2

LECTURE NOTES DISCRETE MATHEMATICS. Eusebius Doedel

Chapter 1 : The language of mathematics.

LECTURE NOTES DISCRETE MATHEMATICS. Eusebius Doedel

Packet #2: Set Theory & Predicate Calculus. Applied Discrete Mathematics

1. Name the person who developed Boolean algebra

Sample Problems for all sections of CMSC250, Midterm 1 Fall 2014

CS 121 Digital Logic Design. Chapter 2. Teacher Assistant. Hanin Abdulrahman

CNS 188a Computation Theory and Neural Systems. Monday and Wednesday 1:30-3:00 Moore 080

Equivalence and Implication

Switches: basic element of physical implementations

Boolean Algebra and Logic Gates

The least element is 0000, the greatest element is 1111.

Lecture Notes 1 Basic Concepts of Mathematics MATH 352

Propositional Logics and their Algebraic Equivalents

CS206 Lecture 03. Propositional Logic Proofs. Plan for Lecture 03. Axioms. Normal Forms

With Question/Answer Animations. Chapter 2

CISC-102 Winter 2016 Lecture 17

Lab 1 starts this week: go to your session

Informal Statement Calculus

Logic and Discrete Mathematics. Section 3.5 Propositional logical equivalence Negation of propositional formulae

Chapter 2: Boolean Algebra and Logic Gates

Sets and Motivation for Boolean algebra

Boolean Algebra. Sungho Kang. Yonsei University

CISC-102 Fall 2018 Week 11

Introduction to Quantum Logic. Chris Heunen

BOOLEAN ALGEBRA. Introduction. 1854: Logical algebra was published by George Boole known today as Boolean Algebra

MaanavaN.Com MA1256 DISCRETE MATHEMATICS. DEPARTMENT OF MATHEMATICS QUESTION BANK Subject & Code : MA1256 DISCRETE MATHEMATICS

3.4 Set Operations Given a set A, the complement (in the Universal set U) A c is the set of all elements of U that are not in A. So A c = {x x / A}.

Propositional Calculus: Formula Simplification, Essential Laws, Normal Forms

Chapter 2: Princess Sumaya Univ. Computer Engineering Dept.

Ex: Boolean expression for majority function F = A'BC + AB'C + ABC ' + ABC.

2. The Logic of Compound Statements Summary. Aaron Tan August 2017

Chapter 4: Classical Propositional Semantics

Sets. We discuss an informal (naive) set theory as needed in Computer Science. It was introduced by G. Cantor in the second half of the nineteenth

2MA105 Algebraic Structures I

We last time we began introducing equivalency laws.

Section 1.1: Propositions and Connectives

1.3 Propositional Equivalences

Propositional Logic, Predicates, and Equivalence

Boolean Algebra. Philipp Koehn. 9 September 2016

Chapter-2 BOOLEAN ALGEBRA

Foundations of Mathematics

Ch 2. Combinational Logic. II - Combinational Logic Contemporary Logic Design 1

Propositional Logic Language

Logic and Proofs. (A brief summary)

software design & management Gachon University Chulyun Kim

Logic and Boolean algebra

What is Logic? Introduction to Logic. Simple Statements. Which one is statement?

Analysis 1. Lecture Notes 2013/2014. The original version of these Notes was written by. Vitali Liskevich

Propositional and Predicate Logic - VII

Propositional Equivalence

Chapter 2 : Boolean Algebra and Logic Gates

CHAPTER 12 Boolean Algebra

Tutorial Obtain the principal disjunctive normal form and principal conjunction form of the statement

Transcription:

Logic Synthesis and Verification Boolean Algebra Jie-Hong Roland Jiang 江介宏 Department of Electrical Engineering National Taiwan University Fall 2014 1 2 Boolean Algebra Reading F. M. Brown. Boolean Reasoning: The Logic of Boolean Equations. Dover, 2003. (Chapters 1-3) Boolean Algebra Outline Definitions Examples Properties Boolean formulae and Boolean functions 3 4

Boolean Algebra A Boolean algebra is an algebraic structure (B,,, 0, 1) B is a set, called the carrier and are binary operations defined on B 0 and 1 are distinct members of B that satisfies the following postulates (axioms): 1. Commutative laws 2. Distributive laws 3. Identities 4. Complements Postulates of Boolean Algebra (B,,, 0, 1) 1. B is closed under and a,b B, a b B and a b B 2. Commutative laws: a,b B a b = b a a b = b a 3. Distributive laws: a,b B a (b c) = (a b) (a c) a (b c) = a b a c 4. Identities: a B 0 a = a 1 a = a 5. Complements: a B, a B s.t. a a = 1 a a = 0 Verify that a is unique in (B,,, 0, 1). 5 6 Instances of Boolean Algebra Switching algebra (two-element Boolean algebra) The algebra of classes (subsets of a set) Arithmetic Boolean algebra The algebra of propositional functions Instance 1: Switching Algebra A switching algebra is a two-element Boolean Algebra ({0,1}, +,, 0, 1) consisting of: the set B = {0, 1} two binary operations AND( ) and OR(+) one unary operation NOT( ) where OR 0 1 0 0 1 1 1 1 AND 0 1 0 0 0 1 0 1 NOT - 0 1 1 0 7 8

Switching Algebra Instance 2: Algebra of Classes Just one of many other Boolean algebras (Ex: verify that the algebra satisfies all the postulates.) An exclusive property (not hold for all Boolean algebras) for two-element Boolean algebra: x + y = 1 iff x=1 or y=1 x y = 0 iff x=0 or y=0 OR 0 1 0 0 1 1 1 1 AND 0 1 0 0 0 1 0 1 NOT - 0 1 1 0 Subsets of a set B 2 S + 0 1 S S is a universal set (S ). Each subset of S is called a class of S. If S = {a,b}, then B = {, {a}, {b}, {a, b}} B (= 2 S ) is closed under and 9 10 Algebra of Classes Commutative laws: S 1,S 2 2 S S 1 S 2 = S 2 S 1 S 1 S 2 = S 2 S 1 Distributive laws: S 1,S 2,S 3 2 S S 1 (S 2 S 3 ) = (S 1 S 2 ) (S 1 S 3 ) S 1 (S 2 S 3 ) = (S 1 S 2 ) (S 1 S 3 ) Identities: S 1 2 S S 1 = S 1 S 1 S = S 1 Complements: S 1 2 S, S 1 2 S, S 1 =S\S 1 s.t. S 1 S 1 = S S 1 S 1 = Algebra of Classes Stone Representation Theorem: Every finite Boolean algebra is isomorphic to the Boolean algebra of subsets of some finite set S Therefore, for all finite Boolean algebra, B can only be 2 k for some k 1. The theorem proves that finite class algebras are not specialized (i.e. no exclusive properties, e.g. x + y = 1 iff x=1 or y=1 in two-element Boolean algebra) Can reason in terms of specific and easily visualizable concepts (union, intersection, empty set, universal set) rather than abstract operations (,,0,1) 11 12

Instance 3: Arithmetic Boolean Algebra (D n, lcm, gcd, 1, n) n: product of distinct prime numbers D n : set of all divisors of n lcm: least common multiple gcd: greatest common divisor 1: integer 1 (not the Boolean 1-element) n = 30 = 2 x 3 x 5 D n = {1, 2, 3, 5, 6, 10, 15, 30} If we look at D n as {, {2}, {3}, {5}, {2, 3}, {2, 5}, {3, 5}, {2, 3, 5}}, it is easy to see that arithmetic Boolean algebra is isomorphic to the algebra of classes. See Stone Representation Theorem Instance 4: Algebra of Propositional Functions (P,,,, ) P: the set of propositional functions of n given variables : disjunction symbol (OR) : conjunction symbol (AND) : formula that is always false (contradiction) : formula that is always true (tautology) 13 14 Lessons from Abstraction Abstract mathematical objects in terms of simple rules A systematic way of characterizing various seemingly unrelated mathematical objects Abstraction trims off immaterial details and simplifies problem formulation 15 Properties of Boolean Algebras For arbitrary elements a, b, and c in Boolean algebra 1. Associativity a + (b + c) = (a + b) + c a (b c) = (a b) c 2. Idempotence a + a = a a a = a 3. a + 1 = 1 a 0 = 0 4. Absorption a + (a b) = a a (a + b) = a 5. Involution (a ) = a 6. De Morgan's Laws (a + b) = a b (a b) = a + b 7. a + a b = a + b a (a + b) = a b 8. Consensus a b + a c + b c = a b + a c (a + b) (a +c) (b + c) = (a + b) (a + c) 16

Principle of Duality Every identity on Boolean algebra is transformed into another identity if the following are interchanged the operations + and, the elements 0 and 1 Example: a + 1 = 1 a 0 = 0 Postulates for Boolean Algebra (Revisited in View of Duality) Duality in (B,,, 0, 1) 1. B is closed under and a,b B, a b B and a b B 2. Commutative Laws: a,b B a b = b a a b = b a 3. Distributive laws: a,b B a (b c) = (a b) (a c) a (b c) = a b a c 4. Identities: a B 0 a = a 1 a = a 5. Complements: a B, a B s.t. a a = 1 a a = 0 17 18 Two Propositions 1. Let a and b be members of a Boolean algebra. Then a = 0 and b = 0 iff a + b = 0 a = 1 and b = 1 iff ab = 1 c.f. The following two propositions are only true for two-element Boolean algebra (not other Boolean algebra) x+y =1 iff x=1 or y=1 xy=0 iff x=0 or y=0 Boolean Formulas and Boolean Functions Why? 2. Let a and b be members of a Boolean algebra. Then a = b iff a b + ab = 0 19 20

Boolean Formulas and Boolean Functions Outline: Definition of Boolean formulas Definition of Boolean functions Boole's expansion theorem The minterm canonical form n-variable Boolean Formulas Given a Boolean algebra B and n symbols x 1,, x n the set of all Boolean formulas on the n symbols is defined by: 1. The elements of B are Boolean formulas. 2. The variable symbols x 1,, x n are Boolean formulas. 3. If g and h are Boolean formulas, then so are (g) + (h) (g) (h) (g) 4. A string is a Boolean formula if and only if it is obtained by finitely many applications of rules 1, 2, and 3. There are infinitely many n-variable Boolean formulas. 21 22 n-variable Boolean Functions n-variable Boolean Functions A Boolean function is a mapping that can be described by a Boolean formula. Given an n-variable Boolean formula F, the corresponding n-variable function f : B n B is defined as follows: 1. If F = b B, then the formula represents the constant function defined by f(x 1,,x n ) = b ([x 1 ],,[x n ]) B n 2. If F = x i, then the formula represents the projection function defined by f(x 1,,x n ) = x i ([x 1 ],,[x n ]) B n where [x k ] denotes a valuation of variable x k 3. If the formula is of type either G + H, GH, or G, then the corresponding n-variable function is defined as follows (g + h)(x 1,,x n ) = g(x 1,,x n )+ h(x 1,,x n ) (g h)(x 1,,x n ) = g(x 1,,x n ) h(x 1,,x n ) (g )(x 1,,x n ) = g(x 1,,x n ) for ([x 1 ],,[x n ]) B n The number of n-variable Boolean functions over a finite Boolean algebra B is finite. 23 24

Example B = {0, 1, a, a } Variable symbols: {x, y} 2-variable Boolean formula: e.g., a x + a y 2-variable Boolean function: f : B 2 B Domain B 2 ={(0,0), (0,1),, (a,a)} x y f 0 0 a 0 1 0 0 a a 0 a 0 1 0 1 1 1 a 1 a 1 1 a a a 0 a a 1 0 a a a a a 0 a 0 1 a 1 a a a 1 Boole's Expansion Theorem Theorem 1 If f : B n B is a Boolean function, then f(x 1,,x n ) = x 1 f(0,,x n ) + x 1 f(1,,x n ) for ([x 1 ],,[x n ]) B n Proof. Case analysis of Boolean functions under the construction rules. Apply postulates of Boolean algebra. The theorem holds not only for twoelement Boolean algebra (c.f. Shannon expansion) a a a 25 26 Minterm Canonical Form Theorem 2 A function f : B n B is Boolean if and only if it can be expressed in the minterm canonical form A f ( X ) f ( A) X where X= (x 1,,x n ) B n, A = (a 1,,a n ) {0,1} n, and X A x 1 a1 x 2 a2 x n an (with x 0 x and x 1 x ) Proof. A {0,1} ( ) Follows from Boole's expansion theorem. n ( ) Examine the construction rules of Boolean functions. Example f is not Boolean! Proof. If f is Boolean, f can be expressed by f(x) = x f(1) + x f(0) = x + a x from the minterm canonical form. However, substituting x = a in the previous expression yields: f(a) = a + a a = a 1 x f(x) 0 a 1 1 a a a 1 27 28

Why Study General Boolean Algebra? General algebras can't be avoided f = x y + x z + x z Two-element view: x, y, z {0,1} and f {0,1} General algebra view: f as a member of the Boolean algebra of 3-variable Boolean functions Why Study General Boolean Algebra? General algebras are useful Two-element view: Truth tables include only 0 and 1. General algebra view: Truth tables contain any elements of B. J K Q Q+ 0 0 0 0 0 0 1 1 0 1 0 0 0 1 1 0........ J K Q+ 0 0 Q 0 1 0 1 0 1 1 1 Q 29 30