chapter 2. outlines 2.1 introduction 2.2 basic definitions 2.3 axiomatic definition of boolean...

38
Boolean Algebra and Logic Gates hapter 2

Upload: augustus-turner

Post on 02-Jan-2016

219 views

Category:

Documents


2 download

TRANSCRIPT

Slide 1

Boolean Algebra and Logic GatesChapter 2

Outlines 2.1 Introduction 2.2 Basic Definitions2.3 Axiomatic Definition of Boolean Algebra2.4 Basic thermos and proprieties of Boolean Algebra2.5 Boolean Functions2.6 Canonical and standard forms2.7 Other Logic Operations2.8 Digital Logic Gates

IntroductionBecause binary logic is used in all of todays digital computers and devices, the cost of the circuits that implement it is an important factor addressed by designers.This chapter provides a basic vocabulary and a brief foundation in Boolean algebra that will enable you to optimize simple circuits and to understand the purpose of algorithms used by software tools to optimize complex circuits involving millions of logic gates.

Basic Definitions of Algebra Algebra Basic definitions:1. Closure: A set Sis closed with respective to a binary operator if, for every pair of elements of S, the binary operator specifies a rule for obtaining a unique element of S.2. Associative law: A binary operator * on a set S is said to be associative whenever (x*y)*z= x*(y*z) for all x, y, z S.3. Communicative law: A binary operator * on a set Sis said to be communicative whenever x*y= y*x for all x, y S.4. Identity element: A set Sis said to have an identity element with respect to a binary operation * on S if there exists an element e S with the property that x*e = e*x =x for every x S.5. Inverse: A set Shaving the identity element e with respect to a binary operation * is said to have an inverse whenever xS, there exists an element y S such that x*y = e.6. Distributive law: If * and are two binary operators on a set S, * is said to be distributive over whenever x*(yz)=(x*y)(x*z)

Axiomatic Definition of Boolean Algebra Boolean Algebra defined by a set of elements B and two binary operators + and and has the following postulates:Postulate 1: (a) The structure is closed with respect to the operator +. (b) The structure is closed with respect to the operator .Postulate 2: (a) The element 0 is an identity element with respect to +. 0+x = x+0 = x (b) The element 1 is an identity element with respect to . 1.x = x1= x Postulate 3: (a) The structure is communicative with respect to +. x + y = y + x (b) The structure is communicative with respect to . X y = y x

Axiomatic Definition of Boolean Algebra Postulate 4(a) The operator is distributive over +: x(y+z)=(xy)+(xz)(b) The operator + is distributive overx+(yz)=(x+y)(x+z) Postulate 5: (a) For every element x B, there exists an element x' B (complement of x) such that (a)x+x'=1 and (b) xx'=0.Postulate 6: There exist at least two elements x, y B such that x y.Difference with ordinary algebraThe operator + is distributive over is valid for Boolean algebra, but not for ordinary algebra.Boolean algebra does not have additive and multiplicative inverses; therefore, there are not subtraction or division operations.Complement is valid for Boolean algebra, but not for ordinary algebra.

Two-Valued Boolean AlgebraPostulate 4: The distributive law can be shown to hold from the truth table of all possible values of x, y, and z. Postulate 5: Complementx+x'=1: since 0+0'=0+1=1 and 1+1'=1+0=1xx'=0: since 00'=01=0 and 11'=10=0Postulate 6: Has two distinct elements 1 and 0, with 0 1NoteA set of two elements+ : OR operation; : AND operationA complement operator: NOT operationBinary logic is a two-valued Boolean algebra

Basic Theorems and Properties

DualityThe binary operators are interchanged; AND ORThe identity elements are interchanged; 1 0

Basic Theorems and PropertiesTheorem 1(a): x+x = x x+x = (x+x) 1by postulate 2(b)= (x+x) (x+x')5(a)= x+xx'4(b)= x+05(b)= x2(a)Theorem 1(b): xx= x xx= xx + 0by postulate 2(a) = xx + xx'5(b)= x (x + x')4(a)= x15(a)= x2(b)

Basic Theorems and PropertiesTheorem 2(a): x + 1 = 1 x + 1 = 1 (x + 1)= (x + x')(x +1)= x + x'1= x + x= 1Theorem 2(b): x 0 =0 By dualityTheorem 3: (x')'= x Postulate 5 defines the complement of x, x + x' = 1 and xx' = 0he complement of x' is x is also (x')'

Basic Theorems and PropertiesTheorem 6 (a): x + xy= x x + xy= x 1 + xy= x (1 +y) 1.x= x1= xTheorem 6 (b): x(x+y) = x By duality By means of truth table x y xy x + xy

Basic Theorems and Properties

Boolean FunctionsA Boolean functionbinary variablesbinary operators OR and ANDoperator NOTExamplesF1= x y zF2= x + y'zF3 = x' y' z + x' y z + x yF4= x y' + x' z

Boolean Functions

Implementation with logic gatesF4 is more economical

F3F2F4

Algebraic ManipulationTo minimize Boolean expressions literal: a primed or unprimed variable (an input to a gate) term: an implementation with a gateThe minimization of the number of literals and the number of terms => a circuit with less equipmentIt is a hard problem (no specific rules to follow)Ex1: x(x'+y) = xx' + xy= 0+ xy= xyEx2: x+x'y= (x+x')(x+y) = 1 (x+y) = x+yEx3: (x+y)(x+y') = x+xy+xy'+yy' = x(1+y+y') = xEx4: x'y'z+ x'yz+ xy' = x'z(y'+y) + xy'= x'z+ xyEx5: xy+ x'z+ yz= xy+ x'z+ yz(x+x')= xy+ x'z+ yzx+ yzx'= xy(1+z) + x'z(1+y) = xy+x'zEx6: (x+y)(x'+z)(y+z) = (x+y)(x'+z) by duality from the previous result

Complement of a Function

Complement of a Function

Canonical and Standard Forms

Canonical and Standard Forms

Canonical Forms

Canonical Forms

Canonical Forms

Canonical Forms

Conversion between Two Canonical Forms

Conversion between Two Canonical Forms

Standard Forms

Standard Forms

Other Logic Operations

Other Logic Operations

Digital Logic Gates

Digital Logic Gates

Digital Logic Gates

Digital Logic Gates

Digital Logic Gates

Digital Logic Gates

Digital Logic Gates

Positive and Negative Logic