CT455: Computer Organization Boolean Algebra

Slides:



Advertisements
Similar presentations
Boolean Algebra and Logic Gates
Advertisements

CS2100 Computer Organisation
Logical Systems Synthesis.
Chapter 2 Logic Circuits.
1 CK Cheng CSE Dept. UC San Diego CS 140, Lecture 2 Combinational Logic.
ECE 331 – Digital System Design Boolean Algebra (Lecture #3) The slides included herein were taken from the materials accompanying Fundamentals of Logic.
ECE 301 – Digital Electronics Minterm and Maxterm Expansions and Incompletely Specified Functions (Lecture #6) The slides included herein were taken from.
Chapter 2 – Combinational Logic Circuits Part 1 – Gate Circuits and Boolean Equations Logic and Computer Design Fundamentals.
CS 151 Digital Systems Design Lecture 6 More Boolean Algebra A B.
EECC341 - Shaaban #1 Lec # 5 Winter Switching Algebra: Principle of Duality Any theorem or identity in switching algebra remains true if.
Boolean Algebra and Logic Gates
Chapter 21 Chapter 2 Algebraic Methods for the Analysis and Synthesis of Logic Circuits.
MOHD. YAMANI IDRIS/ NOORZAILY MOHAMED NOOR
Contemporary Logic Design Two-Level Logic © R.H. Katz Transparency No. 3-1 Chapter #2: Two-Level Combinational Logic Section 2.1, Logic Functions.
CS1104: Computer Organisation Lecture 3: Boolean Algebra
CSCE 211: Digital Logic Design
Chapter 2: Boolean Algebra and Logic Functions
Boolean Algebra Boolean algebra Boolean algebra, like any other deductive mathematical system, may be defined with –a set of elements, –a set of operators,
CS1104: Computer Organisation School of Computing National University of Singapore.
Boolean Algebra – I. Outline  Introduction  Digital circuits  Boolean Algebra  Two-Valued Boolean Algebra  Boolean Algebra Postulates  Precedence.
1 COMBINATIONAL LOGIC One or more digital signal inputs One or more digital signal outputs Outputs are only functions of current input values (ideal) plus.
BOOLEAN ALGEBRA Saras M. Srivastava PGT (Computer Science)
Boolean Algebra and Digital Circuits
Switching functions The postulates and sets of Boolean logic are presented in generic terms without the elements of K being specified In EE we need to.
ECE 331 – Digital System Design
 Seattle Pacific University EE Logic System DesignSOP-POS-1 The Connection: Truth Tables to Functions abcF abcF
1 Representation of Logic Circuits EE 208 – Logic Design Chapter 2 Sohaib Majzoub.
Chapter 4 Combinational Logic Design Principles. Overview Objectives -Define combinational logic circuit -Analysis of logic circuits (to describe what.
Chapter 2 Two- Level Combinational Logic. Chapter Overview Logic Functions and Switches Not, AND, OR, NAND, NOR, XOR, XNOR Gate Logic Laws and Theorems.
CHAPTER 3: PRINCIPLES OF COMBINATIONAL LOGIC
LOGIC GATES & BOOLEAN ALGEBRA
Unit 1 Minimization Techniques and Logic Gates. Introduction to Digital Systems Analog devices and systems process time-varying signals that can take.
ECE 301 – Digital Electronics Basic Logic Operations, Boolean Expressions, and Boolean Algebra (Lecture #3)
Based on slides by:Charles Kime & Thomas Kaminski © 2004 Pearson Education, Inc. ECE/CS 352: Digital System Fundamentals Lecture 6 – Canonical Forms.
1 Boolean Algebra  Digital circuits Digital circuits  Boolean Algebra Boolean Algebra  Two-Valued Boolean Algebra Two-Valued Boolean Algebra  Boolean.
KFUPM COE 202: Digital Logic Design Combinational Logic Part 1 Courtesy of Dr. Ahmad Almulhem.
ENGIN112 L6: More Boolean Algebra September 15, 2003 ENGIN 112 Intro to Electrical and Computer Engineering Lecture 6 More Boolean Algebra A B.
LOGIC CIRCUITLOGIC CIRCUIT. Goal To understand how digital a computer can work, at the lowest level. To understand what is possible and the limitations.
Boolean Algebra – II. Outline  Basic Theorems of Boolean Algebra  Boolean Functions  Complement of Functions  Standard Forms.
A. Abhari CPS2131 Chapter 2: Boolean Algebra and Logic Gates Topics in this Chapter: Boolean Algebra Boolean Functions Boolean Function Simplification.
1 Lect # 2 Boolean Algebra and Logic Gates Boolean algebra defines rules for manipulating symbolic binary logic expressions. –a symbolic binary logic expression.
© BYU 03 BA1 Page 1 ECEn 224 Boolean Algebra – Part 1.
Binary Logic and Gates Boolean Algebra Canonical and Standard Forms Chapter 2: Boolean Algebra and Logic Gates.
Module –I Boolean Algebra Digital Design Amit Kumar Assistant Professor SCSE, Galgotias University, Greater Noida.
Ahmad Almulhem, KFUPM 2009 COE 202: Digital Logic Design Combinational Logic Part 1 Dr. Ahmad Almulhem ahmadsm AT kfupm Phone: Office:
Dale Roberts Department of Computer and Information Science, School of Science, IUPUI Dale Roberts, Lecturer Computer Science, IUPUI
Review. Boolean Algebra.
1 Digital Design Debdeep Mukhopadhyay Associate Professor Dept of Computer Science and Engineering NYU Shanghai and IIT Kharagpur.
ECE DIGITAL LOGIC LECTURE 8: BOOLEAN FUNCTIONS Assistant Prof. Fareena Saqib Florida Institute of Technology Spring 2016, 02/11/2016.
Boolean Algebra. BOOLEAN ALGEBRA Formal logic: In formal logic, a statement (proposition) is a declarative sentence that is either true(1) or false (0).
Lecture 5 More Boolean Algebra A B. Overview °Expressing Boolean functions °Relationships between algebraic equations, symbols, and truth tables °Simplification.
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.
1 CS 352 Introduction to Logic Design Lecture 2 Ahmed Ezzat Boolean Algebra and Its Applications Ch-3 + Ch-4.
CHAPTER 2 Boolean algebra and Logic gates
ECE 301 – Digital Electronics
CS2100 Computer Organisation
De Morgan’s Theorem,.
Chapter 2: Boolean Algebra and Logic Functions
ECE 20B, Winter 2003 Introduction to Electrical Engineering, II LECTURE NOTES #2 Instructor: Andrew B. Kahng (lecture)
CS 105 Digital Logic Design
CHAPTER 2 Boolean Algebra This chapter in the book includes:
ECE 331 – Digital System Design
CSE 311 Foundations of Computing I
Boolean Algebra.
Boolean Algebra.
Chapter 2 Boolean Algebra and Logic Gate
CSE 370 – Winter Combinational Logic - 1
January 19 W’05 Yutao He 4532B Boelter Hall CSM51A/EEM16-Sec.1 W’05
COMS 361 Computer Organization
Chapter 4 Combinational Logic Design Principles. Overview Objectives -Define combinational logic circuit -Analysis of logic circuits (to describe what.
Presentation transcript:

CT455: Computer Organization Boolean Algebra

Lecture 3: Boolean Algebra Digital circuits Boolean Algebra Two-Valued Boolean Algebra Boolean Algebra Postulates Precedence of Operators Truth Table & Proofs Duality

Lecture 3: Boolean Algebra Basic Theorems of Boolean Algebra Boolean Functions Complement of Functions Standard Forms Minterm & Maxterm Canonical Forms Conversion of Canonical Forms Binary Functions

Digital Circuits Digital circuit can be represented by a black-box with inputs on one side, and outputs on the other. Digital circuit inputs outputs : The input/output signals are discrete/digital in nature, typically with two distinct voltages (a high voltage and a low voltage). High Low In contrast, analog circuits use continuous signals.

Digital Circuits Advantages of Digital Circuits over Analog Circuits: more reliable (simpler circuits, less noise-prone) specified accuracy (determinable) but slower response time (sampling rate) Important advantages for two-valued Digital Circuit: Mathematical Model – Boolean Algebra Can help design, analyse, simplify Digital Circuits.

Boolean Algebra What is an Algebra? (e.g. algebra of integers) set of elements (e.g. 0,1,2,..) set of operations (e.g. +, -, *,..) postulates/axioms (e.g. 0+x=x,..) Boolean Algebra named after George Boole who used it to study human logical reasoning – calculus of proposition. Events : true or false Connectives : a OR b; a AND b, NOT a Example: Either “it has rained” OR “someone splashed water”, “must be tall” AND “good vision”.

Boolean Algebra Later, Shannon introduced switching algebra (two-valued Boolean algebra) to represent bi-stable switching circuit.

Two-valued Boolean Algebra Set of Elements: {0,1} Set of Operations: { ., + , ¬ } Sometimes denoted by ’, for example a’ x y x y x+y x x' x.y Signals: High = 5V = 1; Low = 0V = 0

Boolean Algebra Postulates A Boolean algebra consists of a set of elements B, with two binary operations {+} and {.} and a unary operation {'}, such that the following axioms hold: Commutative laws: A + B = B + A A . B = B . A

Boolean Algebra Postulates Associative laws: (A + B) + C = A + (B + C) = A + B + C (A . B) . C = A .( B . C) = A . B . C Distributive laws: A . (B + C) = (A . B) + (A . C) A + (B . C) = (A + B) . (A + C)

Boolean Algebra Postulates Complement: For every x in B, there exists an element x' in B such that x + x' = 1 x . x' = 0

Precedence of Operators To lessen the brackets used in writing Boolean expressions, operator precedence can be used. Precedence (highest to lowest): ' . + Examples: a . b + c = (a . b) + c b' + c = (b') + c a + b' . c = a + ((b') . c)

Precedence of Operators Use brackets to overwrite precedence. Examples: a . (b + c) (a + b)' . c

Rules for Boolean Algebra 1. A + 0 = A 9. (A’)’ = A 2. A + 1 = 1 10. A + AB = A 3. A . 0 = 0 11. A + A’B = A + B 4. A . 1 = A 12. (A + B)(A + C) = A+BC 5. A + A = A 6. A + A’ = 1 7. A . A = A 8. A . A’ = 0

10. A + AB = A A + AB = A(1 + B) DISTRIBUTIVE LAW = A . 1 RULE 2 = A RULE 4 A B AB A+AB 1

Theorem 10 (Absorption) (a) a + ab = a (b) a(a + b) = a Examples: (X + Y) + (X + Y)Z = X + Y [T4(a)] AB'(AB' + B'C) = AB' [T4(b)]

A B A’B A+A’B A+B 1 11. A + A’B = A + B A + A’B = (A + AB) + A’B = (AA + AB) + A’B = AA + AB + AA’ + A’B = (A + A’)(A + B) = 1. (A + B) = ( A + B) A B A’B A+A’B A+B 1

Theorem 11 (a) a + a'b = a + b (b) a(a' + b) = ab Examples: B + AB'C'D = B + AC'D [T11(a)] (X + Y)((X + Y)' + Z) = (X + Y)Z [T11(b)]

11. A + A’B = A + B เปลี่ยนเป็นรูปอื่นๆได้ A + A’B’ = A + B’ A’ + AB = A + B A + A’BC = A + BC (AB)’ + ABCD = (AB)’ + CD

12. (A + B)(B + C) = AA + AC + AB + BC = A.1 + AB + BC = A(1+B) +BC = A.1 +BC = A . BC A B C A+B A+C (A+B)(A+C) BC A+BC 0 0 0 0 0 1 0 1 0 0 1 1 1 0 0 1 0 1 1 1 0 1 1 1 1 0 0 1 1 0 1

(a) ab + ab' = a (b) (a + b)(a + b') = a Examples: Theorem (a) ab + ab' = a (b) (a + b)(a + b') = a Examples: ABC + AB'C = AC [T6(a)] (W' + X' + Y' + Z')(W' + X' + Y' + Z)(W' + X' + Y + Z')(W' + X' + Y + Z) = (W' + X' + Y')(W' + X' + Y + Z')(W' + X' + Y + Z) = (W' + X' + Y')(W' + X' + Y) = (W' + X')

Theorem 7 (a) ab + ab'c = ab + ac (b) (a + b)(a + b' + c) = (a + b)(a + c) Examples: wy' + wx'y + wxyz + wxz' = wy' + wx'y + wxy + wxz' [T7(a)] = wy' + wy + wxz' [T7(a)] = w + wxz' [T7(a)] = w [T7(a)] (x'y' + z)(w + x'y' + z') = (x'y' + z)(w + x'y') [T7(b)]

Basic Theorems of Boolean Algebra 6. DeMorgan. (a) (x + y)' = x'.y' (b) (x.y)' = x' + y' 7. Consensus. (a) x.y + x'.z + y.z = x.y + x'.z (b) (x+y).(x'+z).(y+z) = (x+y).(x'+z)

Laws of Boolean Algebra DeMorgan's Law X 1 Y 1 X 1 Y 1 X + Y 1 X•Y 1 (X + Y)' = X'  Y' NOR is equivalent to AND with inputs complemented X 1 Y 1 X 1 Y 1 X•Y 1 X + Y 1 (X  Y)' = X' + Y' NAND is equivalent to OR with inputs complemented DeMorgan's Law can be used to convert AND/OR expressions to OR/AND expressions or NAND/NAND expression Example: Z = A' B' C + A' B C + A B' C + A B C’ AND - OR = {(A’B’C)’  (A’BC)’  (AB’C)’  (ABC’)’ } ‘ NAND - NAND Z' = (A + B + C')  (A + B' + C')  (A' + B + C')  (A' + B' + C)

Theorem 8 (DeMorgan's Theorem) (a) (a + b)' = a'b' (b) (ab)' = a' + b' Generalized DeMorgan's Theorem (a) (a + b + … z)' = a'b' … z' (b) (ab … z)' = a' + b' + … z' Examples: (a + bc)' = (a + (bc))' = a'(bc)' [T8(a)] = a'(b' + c') [T8(b)] = a'b' + a'c' [P5(b)] Note: (a + bc)' ¹ a'b' + c'

More Examples for DeMorgan's Theorem (a(b + z(x + a')))' = a' + (b + z(x + a'))' [T8(b)] = a' + b' (z(x + a'))' [T8(a)] = a' + b' (z' + (x + a')') [T8(b)] = a' + b' (z' + x'(a')') [T8(a)] = a' + b' (z' + x'a) [T3] = a' + b' (z' + x') [T5(a)] (a(b + c) + a'b)' = (ab + ac + a'b)' [P5(b)] = (b + ac)' [T6(a)] = b'(ac)' [T8(a)] = b'(a' + c') [T8(b)]

Truth Table Provides a listing of every possible combination of inputs and its corresponding outputs. Example (2 inputs, 2 outputs):

Switching Functions Switching algebra: Boolean algebra with the set of elements K = {0, 1} If there are n variables, we can define switching functions. Sixteen functions of two variables (Table 2.3): A switching function can be represented by a table as above, or by a switching expression as follows: f0(A,B)= 0, f6(A,B) = AB' + A'B, f11(A,B) = AB + A'B + A'B' = A' + B, ... Value of a function can be obtained by plugging in the values of all variables: The value of f6 when A = 1 and B = 0 is: = 0 + 1 = 1.

Truth Tables (1) Shows the value of a function for all possible input combinations. Truth tables for OR, AND, and NOT (Table 2.4):

Truth Tables (2) Truth tables for f(A,B,C) = AB + A'C + AC' (Table 2.5)

Truth Table Example (3 inputs, 2 outputs):

Proof using Truth Table Can use truth table to prove by perfect induction. Prove that: x . (y + z) = (x . y) + (x . z) (i) Construct truth table for LHS & RHS of above equality. (ii) Check that LHS = RHS Postulate is SATISFIED because output column 2 & 5 (for LHS & RHS expressions) are equal for all cases.

Basic Theorems of Boolean Algebra Apart from the axioms/postulates, there are other useful theorems. 1. Idempotency. (a) x + x = x (b) x . x = x Proof of (a): x + x = (x + x).1 (identity) = (x + x).(x + x') (complementarity) = x + x.x' (distributivity) = x + 0 (complementarity) = x (identity)

Basic Theorems of Boolean Algebra 2. Null elements for + and . operators. (a) x + 1 = 1 (b) x . 0 = 0 3. Involution. (x')' = x 4. Absorption. (a) x + x.y = x (b) x.(x + y) = x 5. Absorption (variant). (a) x + x'.y = x+y (b) x.(x' + y) = x.y

Basic Theorems of Boolean Algebra Theorem 4a (absorption) can be proved by: x + x.y = x.1 + x.y (identity) = x.(1 + y) (distributivity) = x.(y + 1) (commutativity) = x.1 (Theorem 2a) = x (identity) By duality, theorem 4b: x.(x+y) = x Try prove this by algebraic manipulation.

Boolean Functions Boolean function is an expression formed with binary variables, the two binary operators, OR and AND, and the unary operator, NOT, parenthesis and the equal sign. Its result is also a binary value. We usually use . for AND, + for OR, and ' or ¬ for NOT. Sometimes, we may omit the . if there is no ambiguity.

Boolean Functions Examples: F1= x.y.z' F2= x + y'.z F3=(x'.y'.z)+(x'.y.z)+(x.y') F4=x.y'+x'.z From the truth table, F3=F4. Can you also prove by algebraic manipulation that F3=F4?

Simplifying logic expressions CS1103 Chapter 3: Boolean Algebra/Logic Gates

EXAMPLE A(A+B) = AA + AB = A + AB = A(1 + B) = A A(A’ + B) = AA’ + AB = AB ( AB + A’B’)’ = (A’ + B’)(A + B) = A’A + A’B + AB’ + BB’ = AB’ + A’B

Chapter 3: Boolean Algebra/Logic Gates X = ABC + ABC’ = AB ( C + C’) = AB.1 = AB A = X(X’YZ + X’YZ’) = XX’YZ + XX’YZ’ = 0.YZ + 0.YZ’ = 0 CS1103 Chapter 3: Boolean Algebra/Logic Gates

A B AB’ A’B (AB)’ A+B 0 0 0 1 1 0 1 1 1 AB’+A’B (AB)’(A+B) 1 EXAMPLE AB’ + A’B = AB’+AA’+A’B+BB’ = A(B’+A’) + B(A’+B’) = (A’+B’)(A+B) = (AB)’(A+B) A B AB’ A’B (AB)’ A+B 0 0 0 1 1 0 1 1 1 AB’+A’B (AB)’(A+B) 1

EXAMPLE Y = AB + A’B +A’B’ Y = B(A + A’) +A’B’ Y = B.1 +A’B’ Y = B +A’B’ Y = B +A’

Chapter 3: Boolean Algebra/Logic Gates W = AB(A’C + B) = ABA’C + ABB = 0.BC + AB = 0 + AB = AB CS1103 Chapter 3: Boolean Algebra/Logic Gates

Z = ( X.Y) + [( X’ . ( Y + X )] Z = ( X.Y) + [( X’.Y) + (X.X’)] Z = ( X.Y) + [( X’.Y) + (0)] Z = ( X.Y) + ( X’.Y) Z = Y. ( X + X’) Z = Y. 1 Z = Y

Z = ( X.Y’) + [( X . Y ) + Y’ )] Z = [( X . Y’ ).(X . Y )] + [( X . Y’ ) + Y’ )] Z = [( X . X ).(Y . Y’ )] + [ X . (Y’ + Y’ )] Z = [( X . X ).( 0 )] + [ X . (Y’ + Y’ )] Z = 0 + [ X . Y’] Z = X . Y’

Z = X + X’.Y + Y’.X’ Z = X + X’. (Y + Y’) Z = X + X’. (1) Z = 1

Z = X( X’ + Y )(Y’ + X’) Z = (X.X’ + XY )( Y’ + X’ ) Z = ( 0 + XY)( Y’ + X’ Z = XY( Y’ + X’) Z = XYY’ + XYX’ Z = 0 + 0

Chapter 3: Boolean Algebra/Logic Gates Z = w( y + w )( x + y + w ) = (wy + ww)( x + y + w ) = (wy + w)( x + y + w ) = (w + wy)( x + y + w ) = w( x + y + w ) = wx + wy + ww = wx + ( wy + w ) = wx + ( w + wy) = wx + w = w + wx = w CS1103 Chapter 3: Boolean Algebra/Logic Gates

Simplify AB + BC(B + C) AB + BBC + BCC AB + BC + BC AB + BC B( A + C) AB(A + B’C +C) ABA + ABB’C + ABC AB + ABB’C + ABC AB + ABC AB(1 + C) AB

EXAMPLE SIMPLIFY THE EXPRESSION AB + A(B +C) + B(B + C) USING BOOLEAN ALGEBRA AB + AB + AC +BB + BC AB + AB + AC + B + BC AB + AC + B + BC AB + AC + B(1 + C) AB + AC + B.1 AB + AC + B B(A + 1) +AC B.1 + AC B + AC

SIMPLIFY THE EXPRESSION [AB’(C + BD)+ A’B’]C USING BOOLEAN ALGEBRA [AB’(C + BD)+ A’B’]C (AB’C + AB’BD + A’B’)C (AB’C + A.0.D + A’B’)C (AB’C + 0 + A’B’)C (AB’C + A’B’)C AB’CC + A’B’C AB’C + A’B’C B’C(A + A’) B’C.1 B’C

SIMPLIFY THE EXPRESSION A’BC + AB’C’ + A’B’C’ + AB’C + ABC USING BOOLEAN ALGEBRA A’BC + AB’C’ + A’B’C’ + AB’C + ABC BC(A’ + A) + AB’C’ + A’B’C’ + AB’C BC.1 + AB’(C’ + C) + A’B’C’ BC + AB’.1 + A’B’C’ BC + B’(A + A’C’) BC + B’(A + C’) BC + AB’ + B’C’

Gate Logic: Laws of Boolean Algebra Apply the laws and theorems to simplify Boolean equations Example: full adder's carry out function identity Cout = A' B Cin + A B' Cin + A B Cin' + A B Cin = A' B Cin + A B' Cin + A B Cin' + A B Cin + A B Cin = A' B Cin + A B Cin + A B' Cin + A B Cin' + A B Cin = (A' + A) B Cin + A B' Cin + A B Cin' + A B Cin = (1) B Cin + A B' Cin + A B Cin' + A B Cin = B Cin + A B' Cin + A B Cin' + A B Cin + A B Cin = B Cin + A B' Cin + A B Cin + A B Cin' + A B Cin = B Cin + A (B' + B) Cin + A B Cin' + A B Cin = B Cin + A (1) Cin + A B Cin' + A B Cin = B Cin + A Cin + A B (Cin' + Cin) = B Cin + A Cin + A B (1) = B Cin + A Cin + A B associative

Chapter 3: Boolean Algebra/Logic Gates Z = (x’ + y’) w’ + (xy)’ = ( x’ + y’ ) w’ + ( x’ + y’ ) = ( x’ + y’ ) w’ + ( x’ + y’ ) . 1 = ( x’ + y’ ) ( w’ + 1) = ( x’ + y’ ) (1) = x’ + y’ CS1103 Chapter 3: Boolean Algebra/Logic Gates

Chapter 3: Boolean Algebra/Logic Gates M = (A’ + B’C’)’ = (A’)’ (B’)’(C’)’ = ABC S = (A’B’(C’ + D’))’ = (A’B’)’ + (C’ + D’)’ = (A’)’ + (B’)’ + (C’)’ (D’)’ = A + B + CD CS1103 Chapter 3: Boolean Algebra/Logic Gates

Complement of Functions Given a function, F, the complement of this function, F', is obtained by interchanging 1 with 0 in the function’s output values. Example: F1 = xyz' Complement: F1' = (x.y.z')' = x' + y' + (z')' DeMorgan = x' + y' + z Involution

Complement of Functions More general DeMorgan’s theorems useful for obtaining complement functions: (A + B + C + ... + Z)' = A' . B' . C' … . Z' (A . B . C ... . Z)' = A' + B' + C' + … + Z'

Algebraic Forms of Switching Functions (1) Literal: A variable, complemented or uncomplemented. Product term: A literal or literals ANDed together. Sum term: A literal or literals ORed together. SOP (Sum of Products): ORing product terms f(A, B, C) = ABC + A'C + B'C POS (Product of Sums) ANDing sum terms f (A, B, C) = (A' + B' + C')(A + C')(B + C')

Algebraic Forms of Switching Functions (2) A minterm is a product term in which all the variables appear exactly once either complemented or uncomplemented. Canonical Sum of Products (canonical SOP): Represented as a sum of minterms only. Example: f1(A,B,C) = A'BC' + ABC' + A'BC + ABC (2.1) Minterms of three variables:

Algebraic Forms of Switching Functions (3) Compact form of canonical SOP form: f1(A,B,C) = m2 + m3 + m6 + m7 (2.2) A further simplified form: f1(A,B,C) = S m (2,3,6,7) (minterm list form) (2.3) The order of variables in the functional notation is important. Deriving truth table of f1(A,B,C) from minterm list:

Algebraic Forms of Switching Functions (4) Example: Given f(A,B,Q,Z) = A'B'Q'Z' + A'B'Q'Z + A'BQZ' + A'BQZ, express f(A,B,Q,Z) and f '(A,B,Q,Z) in minterm list form. f(A,B,Q,Z) = A'B'Q'Z' + A'B'Q'Z + A'BQZ' + A'BQZ = m0 + m1 + m6 + m7 = S m(0, 1, 6, 7) f '(A,B,Q,Z) = m2 + m3 + m4 + m5 + m8 + m9 + m10 + m11 + m12 + m13 + m14 + m15 = S m(2, 3, 4, 5, 8, 9, 10, 11, 12, 13, 14, 15) (2.6) AB + (AB)' = 1 and AB + A' + B' = 1, but AB + A'B' ¹ 1.

Algebraic Forms of Switching Functions (5) A maxterm is a sum term in which all the variables appear exactly once either complemented or uncomplemented. Canonical Product of Sums (canonical POS): Represented as a product of maxterms only. Example: f2(A,B,C) = (A+B+C)(A+B+C')(A'+B+C)(A'+B+C') (2.7) Maxterms of three variables:

Algebraic Forms of Switching Functions (6) f2(A,B,C) = M0M1M4M5 (2.8) = PM(0,1,4,5) (maxterm list form) (2.9) The truth table for f2(A,B,C):

Algebraic Forms of Switching Functions (7) Truth tables of f1(A,B,C) of Eq. (2.3) and f2(A,B,C) of Eq. (2.7) are identical. Hence, f1(A,B,C) = S m (2,3,6,7) = f2(A,B,C) = PM(0,1,4,5) (2.10) Example: Given f(A,B,C) = ( A+B+C')(A+B'+C')(A'+B+C')(A'+B'+C'), construct the truth table and express in both maxterm and minterm form. f(A,B,C) = M1M3M5M7 = PM(1,3,5,7) = S m (0,2,4,6)

Algebraic Forms of Switching Functions (8) Relationship between minterm mi and maxterm Mi: For f(A,B,C), (m1)' = (A'B'C)' = A + B + C' = M1 In general, (mi)' = Mi (2.11) (Mi)' = ((mi)')' = mi (2.12)

Algebraic Forms of Switching Functions (9) Example: Relationship between the maxterms for a function and its complement. For f(A,B,C) = ( A+B+C')(A+B'+C')(A'+B+C')(A'+B'+C') The truth table is:

Algebraic Forms of Switching Functions (10) From the truth table f '(A,B,C) = PM(0,2,4,6) and f(A,B,C) = PM(1,3,5,7) Since f(A,B,C) × f '(A,B,C) = 0, (M0M2M4M6)(M1M3M5M7) = 0 or In general, (2.13) Another observation from the truth table: f(A,B,C) = S m (0,2,4,6) = PM(1,3,5,7) f '(A,B,C) = S m (1,3,5,7) = PM(0,2,4,6)

Derivation of Canonical Forms (1) Derive canonical POS or SOP using switching algebra. Theorem 10. Shannon's expansion theorem (a). f(x1, x2, …, xn) = x1 f(1, x2, …, xn) + (x1)' f(0, x2, …, xn) (b). f(x1, x2, …, xn) = [x1 + f(0, x2, …, xn)] [(x1)' + f(1, x2, …, xn)] Example: f(A,B,C) = AB + AC' + A'C f(A,B,C) = AB + AC' + A'C = A f(1,B,C) + A' f(0,B,C) = A(1×B + 1×C' + 1'×C) + A'(0×B + 0×C' + 0'×C) = A(B + C') + A'C f(A,B,C) = A(B + C') + A'C = B[A(1+C') + A'C] + B'[A(0 + C') + A'C] = B[A + A'C] + B'[AC' + A'C] = AB + A'BC + AB'C' + A'B'C f(A,B,C) = AB + A'BC + AB'C' + A'B'C = C[AB + A'B×1 + AB'×1' + A'B'×1] + C'[AB + A'B×0 + AB'×0' + A'B'×0] = ABC + A'BC + A'B'C + ABC' + AB'C'

Derivation of Canonical Forms (2) Alternative: Use Theorem 6 to add missing literals. Example: f(A,B,C) = AB + AC' + A'C to canonical SOP form. AB = ABC' + ABC = m6 + m7 AC' = AB'C' + ABC' = m4 + m6 A'C = A'B'C + A'BC = m1 + m3 Therefore, f(A,B,C) = (m6 + m7) + (m4 + m6) + (m1 + m3) = m(1, 3, 4, 6, 7) Example: f(A,B,C) = A(A + C') to canonical POS form. A = (A+B')(A+B) = (A+B'+C')(A+B'+C)(A+B+C')(A+B+C) = M3M2M1M0 (A+C')= (A+B'+C')(A+B+C') = M3M1 f(A,B,C) = (M3M2M1M0)(M3M1) = M(0, 1, 2, 3)

Incompletely Specified Functions A switching function may be incompletely specified. Some minterms are omitted, which are called don't-care minterms. Don't cares arise in two ways: Certain input combinations never occur. Output is required to be 1 or 0 only for certain combinations. Don't care minterms: di Don't care maxterms: Di Example: f(A,B,C) has minterms m0, m3, and m7 and don't-cares d4 and d5. Minterm list is: f(A,B,C) = m(0,3,7) + d(4,5) Maxterm list is: f(A,B,C) = M(1,2,6)·D(4,5) f '(A,B,C) = m(1,2,6) + d(4,5) = M(0,3,7)·D(4,5) f (A,B,C)= A'B'C' + A'BC + ABC + d(AB'C' + AB'C) = B'C' + BC (use d4 and omit d5)

Standard Forms Exampes: x, x.(y+z'), (x+y').(x'+y+z), (A+B).(A'+B') Sum Term: a single literal or a logical sum (OR) of several literals. Examples: x, x+y+z', A'+B, A+B Sum-of-Products (SOP) Expression: a product term or a logical sum (OR) of several product terms. Examples: x, x+y.z', x.y'+x‘.y.z, A.B+A'.B' Product-of-Sums (POS) Expression: a sum term or a logical product (AND) of several sum terms. Exampes: x, x.(y+z'), (x+y').(x'+y+z), (A+B).(A'+B')

Standard Forms POS: (x + y).(x + y).(x + z) Every Boolean expression can either be expressed as sum-of-products or product-of-sums expression. Examples: SOP: x.y + x.y + x.y.z POS: (x + y).(x + y).(x + z) both: x + y + z or x.y.z neither: x.(w + y.z) or z + w.x.y + v.(x.z + w)

Shorthand Notation for Two Level Canonical Forms Sum of Products product term / minterm: A 1 B 1 C 1 Minterms ANDed product of literals in which each variable appears exactly once, in true or complemented form (but not both!) A B C = m A B C = m 1 A B C = m 2 A B C = m 3 F in canonical form: A B C = m 4 F(A,B,C) = m(3,4,5,6,7) A B C = m 5 = m3 + m4 + m5 + m6 + m7 = A' B C + A B' C' + A B' C + A B C' + A B C A B C = m 6 A B C = m 7 Shorthand Notation for Minterms of 3 Variables canonical form/minimal form F = A B' (C + C') + A' B C + A B (C' + C) = A B' + A' B C + A B = A (B' + B) + A' B C = A + A' B C = A + B C B C F A F’ = (A + B C)' = A' (B' + C') = A' B' + A' C' 2-Level AND/OR Realization

2 Level Canonical Forms Maxterm: Maxterm form: Product of Sums / Conjunctive Normal Form / Maxterm Expansion Maxterm: ORed sum of literals in which each variable appears exactly once in either true or complemented form, but not both! Maxterm form: Find truth table rows where F is 0 0 in input column implies true literal 1 in input column implies complemented literal Maxterm Shorthand Notation for a Function of Three Variables F(A,B,C) = M(0,1,2) = (m(0,1,2))’ = (A’B’C’ + A’B’C + A’BC’)’ = (A + B + C) (A + B + C') (A + B' + C) F’(A,B,C) = M(3,4,5,6,7) = (A + B' + C') (A' + B + C) (A' + B + C') (A' + B' + C) (A' + B' + C')

Two Level Canonical Forms F' = A' B' C' + A' B' C + A' B C' Apply DeMorgan's Law to obtain F: (F')' = (A' B' C' + A' B' C + A' B C')' F = (A + B + C) (A + B + C') (A + B' + C) F' = (A + B' + C') (A' + B + C) (A' + B + C') (A' + B' + C) (A' + B' + C') Apply DeMorgan's Law to obtain F: (F')' = {(A + B' + C') (A' + B + C) (A' + B + C') (A' + B' + C) (A' + B' + C')}' F = A' B C + A B' C' + A B' C + A B C' + A B C