13.07.2015 Views

Chapter 2 Boolean Algebra and Logic Gates - 國立高雄大學資訊工程 ...

Chapter 2 Boolean Algebra and Logic Gates - 國立高雄大學資訊工程 ...

Chapter 2 Boolean Algebra and Logic Gates - 國立高雄大學資訊工程 ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

EEA091 - Digital <strong>Logic</strong>數 位 邏 輯<strong>Chapter</strong> 2<strong>Boolean</strong> <strong>Algebra</strong> <strong>and</strong> <strong>Logic</strong> <strong>Gates</strong>吳 俊 興國 立 高 雄 大 學 資 訊 工 程 學 系2006


<strong>Chapter</strong> 2. <strong>Boolean</strong> <strong>Algebra</strong> <strong>and</strong><strong>Logic</strong> <strong>Gates</strong>2-1 Basic Definitions2-2 Axiomatic Definition of <strong>Boolean</strong> <strong>Algebra</strong>2-3 Basic Theorems <strong>and</strong> Properties2-4 <strong>Boolean</strong> Functions2-5 Canonical <strong>and</strong> St<strong>and</strong>ard Forms2-6 Other <strong>Logic</strong> Operations2-7 Digital <strong>Logic</strong> <strong>Gates</strong>2-8 Integrated Circuits2


2-1/2-2 Basic <strong>and</strong> Axiomatic Definitions• <strong>Boolean</strong> <strong>Algebra</strong> (formulated by E.V. Huntington, 1904)A set of elements B={0,1} <strong>and</strong> two binary operators + <strong>and</strong> •• Huntington postulates1. Closure w.r.t. the operator + (•)x, y ∈ B ⇒ x+y ∈B;x, y ∈ B ⇒ x•y ∈B2. Associative w.r.t. + (•)(x+y)+z = x + (y + z);3. Commutative w.r.t. + (•)x+y = y+x;x•y = y•x(x•y)•z = x • (y•z)4. An identity element w.r.t. + (•)0+x = x+0 = x; 1•x = x•1= x5. ∀ x ∈ B, ∃ x' ∈ B (complement of x)x+x'=1;x•x'=06. • is distributive over + : x•(y+z)=(x•y)+(x•z)+ is distributive over •: x+ (y•z)=(x+ y)•(x+ z)Duality principle: remains valid if the operators <strong>and</strong> identity elementsare interchanged3


Two-valued <strong>Boolean</strong> <strong>Algebra</strong>•= AND+ = OR‘ = NOTDistributive law: x•(y+z)=(x•y)+(x•z)4


2-3 Basic Theorems <strong>and</strong> PropertiesOperator Precedence1. parentheses2. NOT3. AND4. OR5


Basic Theorems6


Truth TableA table of all possible combinations of the variables showing therelation between the variable values <strong>and</strong> the result of the operationTheorem 6(a) AbsorptionTheorem 5. DeMorgan8


2-4 <strong>Boolean</strong> Functions<strong>Logic</strong> Circuit ⇔ <strong>Boolean</strong> Function<strong>Boolean</strong> FunctionsF 1 = x + (y’z)F 2 = x’y’z + x’yz + xy’9


<strong>Boolean</strong> Function F2F2 = x’y’z + x’yz + xy’10


<strong>Algebra</strong>ic Manipulation - Simplification11


DeMorgan’s Theorem2-variable DeMorgan’s Theorem(x + y)’ = x’y’ <strong>and</strong> (xy)’ = x’ + y’3-variable DeMorgan’s TheoremGeneralized DeMorgan’s Theorem12


Complement of a Function•Complement of a variable x is x’ (0 ⇒ 1 <strong>and</strong> 1 ⇒ 0)•The complement of a function F is F’ <strong>and</strong> is obtained from aninterchange of 0’s for 1’s <strong>and</strong> 1’s for 0’s in the value of F•The dual of a function is obtained from the interchange of AND<strong>and</strong> OR operators <strong>and</strong> 1’s <strong>and</strong> 0’s•Finding the complement of a function FApplying DeMorgan’s theorem as many times as necessarycomplementing each literal of the dual of F13


2-5 Canonical <strong>and</strong> St<strong>and</strong>ard Forms• Minterms <strong>and</strong> Maxterms– Expressing combinations of 0’s <strong>and</strong> 1’s with binary variables(normal form x or complement form x’)• <strong>Logic</strong> circuit ⇔ <strong>Boolean</strong> function ⇔ Truth table– Any <strong>Boolean</strong> function can be expressed as a sum of minterms– Any <strong>Boolean</strong> function can be expressed as a product ofmaxterms• Canonical <strong>and</strong> St<strong>and</strong>ard Forms15


Minterms <strong>and</strong> MaxtermsMinterm (or st<strong>and</strong>ard product):– = n variables combined with AND– n variables can be combined toform 2 n minterms• two variables: x’y’, x’y, xy’, <strong>and</strong> xy– A variable of a minterm is• primed if the corresponding bit ofthe binary number is a 0,• <strong>and</strong> unprimed if a 1Maxterm (or st<strong>and</strong>ard sum):– = n variables combined with OR– A variable of a maxterm is• unprimed if the correspondingbit is a 0• <strong>and</strong> primed if a 1 001 => x’y’zm j ’= M j100 => xy’z’111 => xyz16


Expressing Truth Table in <strong>Boolean</strong> Function• Any <strong>Boolean</strong> functioncan be expressed asa sum of minterms ora product of maxterms(either 0 or 1 for each term)• said to be in a canonicalform• n variables⇒ 2 n minterms⇒ 2 2n possible functions(x+y’+z’)17


Expressing <strong>Boolean</strong> Function in Sum ofMinterms (Method 1 - Supplementing)18


Expressing <strong>Boolean</strong> Function in Sum ofMinterms (Method 2 – Truth Table)F(A, B, C) = Σ(1, 4, 5, 6, 7) = Π(0, 2, 3)F’(A, B, C) = Σ(0, 2, 3) = Π(1, 4, 5, 6, 7)19


Expressing <strong>Boolean</strong> Function in Product ofMaxterms20


Conversion between Canonical Forms‣Canonical conversion procedureConsider: F(A, B, C) = Σ(1, 4, 5, 6, 7)F’: Complement of F = F’(A, B, C) = Σ(0, 2, 3) = m 0 + m 2 + m 3Compute complement of F’ by DeMorgan’s TheoremF = (F’)’ = (m 0 + m 2 + m 3 )’ = (m 0 ’ ⋅ m 2 ’ ⋅ m 3 ’)= m 0 ’⋅ m 2 ’⋅ m 3 ’= M 0 M 2 M 3 = Π(0, 2, 3)‣Summary• m j ’= M j• Conversion between product of maxterms <strong>and</strong> sum of mintermsΣ(1, 4, 5, 6, 7) = Π(0, 2, 3)• Shown by truth table (Table 2-5)21


Example – Two Canonical Forms of <strong>Boolean</strong><strong>Algebra</strong> from Truth Table‣<strong>Boolean</strong> expression: F(x, y, z) = xy + x’z‣Deriving the truth table‣Expressing in canonical formsF(x, y, z) = Σ(1, 3, 6, 7) = Π(0, 2, 4, 5)22


St<strong>and</strong>ard Forms• Canonical forms: each minterm or maxterm mustcontain all the variables• St<strong>and</strong>ard forms: the terms that form the functionmay contain one, two, or any number of literals(variables)• Two types of st<strong>and</strong>ard forms (2-level)– sum of productsF 1 = y’ + xy + x’yz’– product of sumsF 2 = x(y’ + z)(x’ + y + z’)• Canonical forms ⇔ St<strong>and</strong>ard forms– Sum of minterms, Product of maxterms– Sum of products, Product of sums23


St<strong>and</strong>ard Form <strong>and</strong> <strong>Logic</strong> CircuitF 1 = y’ + xy + x’yz’F 2 = x(y’ + z)(x’ + y + z’)24


Nonst<strong>and</strong>ard Form <strong>and</strong> <strong>Logic</strong> CircuitNonst<strong>and</strong>ard form:F 3 = AB + C(D+E)St<strong>and</strong>ard form:F 3 = AB + CD + CEA two-level implementation is preferred: produces the least amount of delaythrough the gates when the signal propagates from the inputs to the output25


2-6 Other <strong>Logic</strong> Operations• There are 2 2^n functions for n binaryvariables• For n=2– there are 16 possible functions– AND <strong>and</strong> OR operators are two of them: x⋅y <strong>and</strong> x+y• Subdivided into three categories:26


Truth Tables <strong>and</strong> <strong>Boolean</strong> Expressions forthe 16 Functions of Two Variables27


2-7 Digital <strong>Logic</strong><strong>Gates</strong>Figure 2-5 Digital <strong>Logic</strong> <strong>Gates</strong>1. Two are equal to a constant2. Four are repeated twice3. Two, Inhibition <strong>and</strong> implication, areimpracticalThe gates can be extended to havemore than two inputs except for theinverter <strong>and</strong> buffer28


Multiple-Inputs• NAND <strong>and</strong> NOR functions arecommunicative but not associative– Define multiple NOR (or NAND) gate as acomplemented OR (or AND) gate (Section 3-6)XOR <strong>and</strong> equivalence gates are bothcommunicative <strong>and</strong> associative– uncommon, usually constructed with other gates– XOR is an odd function (Section 3-8)29


2-8 Integrated CircuitsDigital ICs are often categorized according to their circuitcomplexity as measured by the number of logic gates in asingle package– Small-scale integration (SSI)• the inputs <strong>and</strong> outputs of the gates are connected directly to the pinsin the package• usually fewer than 10 gates, limited by the number of pins available– Medium-scale integration (MSI)• 10 to 1,000 gates in a package• usually perform specific elementary digital operations– Large-scale integration (LSI)• Thous<strong>and</strong>s of gates• Include digital systems such as processors, memory chips, <strong>and</strong>programmable logic devices– Very large-scale integration (VLSI)• Hundred of thous<strong>and</strong>s of gates31


Summary<strong>Chapter</strong> 2 <strong>Boolean</strong> <strong>Algebra</strong> <strong>and</strong> <strong>Logic</strong> <strong>Gates</strong>2-1 Basic Definitions2-2 Axiomatic Definition of <strong>Boolean</strong> <strong>Algebra</strong>2-3 Basic Theorems <strong>and</strong> Properties2-4 <strong>Boolean</strong> Functions2-5 Canonical <strong>and</strong> St<strong>and</strong>ard Forms2-6 Other <strong>Logic</strong> Operations2-7 Digital <strong>Logic</strong> <strong>Gates</strong>2-8 Integrated Circuits32

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!