CS 105 Digital Logic Design

Slides:



Advertisements
Similar presentations
Boolean Algebra and Logic Gates
Advertisements

Boolean Algebra and Logic Gates
Logical Systems Synthesis.
Chapter 2 Logic Circuits.
Boolean Algebra and Logic Gates 1 Computer Engineering (Logic Circuits) Lec. # 4 Dr. Tamer Samy Gaafar Dept. of Computer & Systems Engineering Faculty.
Module 8.  In Module 3, we have learned about Exclusive OR (XOR) gate.  Boolean Expression AB’ + A’B = Y also A  B = Y  Logic Gate  Truth table ABY.
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.
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
1 Chapter 2 Boolean Algebra and Logic Gates The most common postulates ( 假設 ; 基本條件 ) used to formulate various algebraic structures are: 1. Closure ( 封閉性.
28/06/041 CSE-221 Digital Logic Design (DLD) Lecture-5: Canonical and Standard forms and Integrated Circuites.
Chapter Two Boolean Algebra and Logic Gate
Chapter 2: Boolean Algebra and Logic Functions
Chapter 2 Boolean Algebra and Logic Gates
Boolean Algebra Boolean algebra Boolean algebra, like any other deductive mathematical system, may be defined with –a set of elements, –a set of operators,
Logic Design CS221 1 st Term Boolean Algebra Cairo University Faculty of Computers and Information.
1 Why study Boolean Algebra? 4 It is highly desirable to find the simplest circuit implementation (logic) with the smallest number of gates or wires. We.
BOOLEAN ALGEBRA Saras M. Srivastava PGT (Computer Science)
Boolean Algebra and Digital Circuits
Combinational Logic 1.
Chapter 2. Outlines 2.1 Introduction 2.2 Basic Definitions 2.3 Axiomatic Definition of Boolean Algebra 2.4 Basic thermos and proprieties of Boolean Algebra.
Module 4.  Boolean Algebra is used to simplify the design of digital logic circuits.  The design simplification are based on: Postulates of Boolean.
Logic Design Dr. Yosry A. Azzam.
Gate-Level Minimization
LOGIC GATES & BOOLEAN ALGEBRA
Boolean Algebra and Logic Gates
ece Parity Used to check for errors Can be either ODD or EVEN Left most bit used as the indicator For EVEN, insert a 0 or a 1 so as to make the.
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.
Logic Circuits Lecture 3 By Amr Al-Awamry. Basic Definitions Binary Operators  AND z = x y = x yz=1 if x=1 AND y=1  OR z = x + y z=1 if x=1 OR y=1 
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.
Module 5.  In Module 3, you have learned the concept of Boolean Algebra which consists of binary variables and binary operator.  A binary variable x,
Chapter 2: Basic Definitions BB inary Operators ●A●AND z = x y = x yz=1 if x=1 AND y=1 ●O●OR z = x + yz=1 if x=1 OR y=1 ●N●NOT z = x = x’ z=1 if x=0.
ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN Lecture 4 Dr. Shi Dept. of Electrical and Computer Engineering.
ECE DIGITAL LOGIC LECTURE 8: BOOLEAN FUNCTIONS Assistant Prof. Fareena Saqib Florida Institute of Technology Spring 2016, 02/11/2016.
Logic Design (CE1111 ) Lecture 2 (Chapter 2) Prepared by Dr. Lamiaa Elshenawy 1.
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.
Fuw-Yi Yang1 數位系統 Digital Systems Department of Computer Science and Information Engineering, Chaoyang University of Technology 朝陽科技大學資工系 Speaker: Fuw-Yi.
CHAPTER 2 Boolean algebra and Logic gates
Digital Logic Circuits, Digital Component and Data Representation Course: BCA-2 nd Sem Subject: Computer Organization And Architecture Unit-1 1.
Boolean Algebra and Logic Gates COE 202 Digital Logic Design Dr. Muhamed Mudawar King Fahd University of Petroleum and Minerals.
CS2100 Computer Organisation
Chapter 3 Notes – Part II Review Questions
Chapter 2: Boolean Algebra and Logic Functions
14:332:231 DIGITAL LOGIC DESIGN Boolean Algebra
Unit 2 Boolean Algebra.
ECE 20B, Winter 2003 Introduction to Electrical Engineering, II LECTURE NOTES #2 Instructor: Andrew B. Kahng (lecture)
Princess Sumaya University
ECE 331 – Digital System Design
Speaker: Fuw-Yi Yang 楊伏夷 伏夷非征番, 道德經 察政章(Chapter 58) 伏者潛藏也
Lecture 3: Boolean Algebra
Boolean Algebra Why study Boolean Algebra?
Boolean Algebra.
17-Nov-18 Logic Algebra 1 Combinational logic.
Boolean Algebra.
INTRODUCTION TO LOGIC DESIGN Chapter 2 Boolean Algebra and Logic Gates
Boolean Algebra.
Boolean Algebra & Logic Circuits
Chapter 2 Boolean Algebra and Logic Gate
CSE 370 – Winter Combinational Logic - 1
2. Boolean Algebra and Logic Gates
January 19 W’05 Yutao He 4532B Boelter Hall CSM51A/EEM16-Sec.1 W’05
MINTERMS and MAXTERMS Week 3
COMS 361 Computer Organization
Digital Logic Chapter-2
Digital Logic Chapter-2
Circuit Simplification and
Presentation transcript:

CS 105 Digital Logic Design Chapter 2 Boolean algebra and logic gates

Outline 2.2 Basic Definitions 2.3 Axiomatic Definition of Boolean Algebra. 2.4 Basic Theorems and Properties 2.5 Boolean Functions 2.6 Canonical and Standard Forms 2.7 Other Logic Operations 2.8 Digital Logic Gates

2.2 Basic Definitions (1-2) Boolean Algebra: Closure Associative Formulated by E.V. Huntington, 1904. A set of elements B={0,1} and two binary operators + and • Closure Associative x, y  B  x+y  B x, y  B x•y B (x+y)+z = x + (y + z) (x•y)•z = x•(y•z) Commutative Identity element x + y = y + x x•y = y•x 0+x = x+0 = x 1•x = x•1=x

2.2 Basic Definitions (2-2) Complement (inverse) Distributive Law  x  B,  x'‚  B (complement of x) x+x'=1; x•x'=0 Distributive Law Over +: x•(y+z)=(x•y)+(x•z). Over •: x+ (y.z)=(x+ y)•(x+z).

2.3 Axiomatic Definition of Boolean Algebra (1-2) Two- Valued Boolean Algebra: x y x•y 1 x y x+y 1 •= AND + = OR ‘ = NOT x x’ 1

2.3 Axiomatic Definition of Boolean Algebra (2-2) Two- Valued Boolean Algebra: Distributive law: x•(y+z)=(x•y)+(x•z)

2.4 Basic Theorems and Properties (1-7) Duality Principle Using Huntington rules, one part may be obtained from the other if the binary operators and the identity elements are interchanged. Duality done by: 1- Interchange OR and AND Operations. 2- Replace the identity elements 1’s by 0’s and 0’s by 1’s.

2.4 Basic Theorems and Properties (2-7) Table 2.1 Postulates and Theorems of Boolean algebra Postulates 2 (a) X + 0 = + 1 X + X (X ‘)’= X (b) X . 1 = . 0 X . X X . X’ Postulates 5 X + X’ = 1 Theorem 1 Theorem 2 Theorem 3 , involution Postulate 3,commutative Theorem 4 , associative Postulate 4 , distributive Theorem 5 , deMorgan’s (a) X + Y Y + X = (X + Y) Z + X + (Y Z) X(Y + XY XZ (X + Y)’ X . Y (b) XY YX = (XY) Z X(Y Z) X + YZ (X + Y) (X + Z) (X . Y)’ X’ + Y’ Theorem 6 ,absorption (a) X + XY = X (b) X(X+Y) = X Parentheses. NOT. AND. OR. Operator Precedence

2.4 Basic Theorems and Properties (3-7)

2.4 Basic Theorems and Properties (4-7)

2.4 Basic Theorems and Properties (5-7)

Theorem 6(a) Absorption 2.4 Basic Theorems and Properties (6-7) Truth Table A table of all possible combinations of x and y variables showing the relation between the variable values and the result of the operation. Theorem 6(a) Absorption The theorems of Boolean algebra can be proven by means of truth table.

Theorem 5: DeMorgan theorem, (x + y)’ = x’y’ 2.4 Basic Theorems and Properties (7-7) Truth Table Theorem 5: DeMorgan theorem, (x + y)’ = x’y’

Logic Circuit  Boolean Function 2.5 Boolean Functions (1-11) Logic Circuit  Boolean Function Example List the truth table for the follwoing functions and draw their implementation gates. F1= x + (y’z). F2= x‘y’z + x’yz + xy‘

2.5 Boolean Functions (1-11) F1= x + (y’z) X Y Z Y’ Y’*Z X + (y’ z) 1

2.5 Boolean Functions (1-11) Truth table

Gate Implementation of F1 2.5 Boolean Functions (2-11) Gate Implementation of F1 F1= x + (y’z).

Gate Implementation of F2 2.5 Boolean Functions (3-11) Gate Implementation of F2 F2= x‘y’z + x’yz + xy‘

Gate Implementation F2 after simplifying it 2.5 Boolean Functions (4-11) Gate Implementation F2 after simplifying it F2= x‘y’z + x’yz + xy’. F2= x‘(y’z + yz) + xy’. F2= x‘(z (y’+ y)) + xy’. F2= x‘(z (1)) + xy’. F2= x‘z + xy’.

Algebraic Manipulation - Simplification 2.5 Boolean Functions (5-11) Algebraic Manipulation - Simplification Example Simplify the following Boolean functions to a minimum number of literals: x(x’+y) =xx’ + xy =0+xy = xy x+x’y =(x+x’)(x+y) =1(x+y) = x+y

2.5 Boolean Functions (6-11) DeMorgan‘s Theorem xy + x’z + yz (x+y)(x+y’) =x+ xy + xy’+yy’ =x (1+ y + y’) =x (x+y)(x’+z)(y+z) =(x+y)(x’+z) by duality function 4 xy + x’z + yz = xy + x’z + yz(x+x’) = xy + x’z + xyz + x’yz =xy(1+z) + x’z (1+y) = xy + x’z

Complement of a Function Finding the complement of a funtion F 2.5 Boolean Functions (7-11) Complement of a Function Complement of a variable x is x’ (0  1 and 1 0). The complement of a function F is x’ and is obtained from an interchange of 0’s for 1’s and 1’s for 0’s in the value of F The dual of a function is obtained from the interchange of AND and OR operators and 1’s and 0’s. Finding the complement of a funtion F Applying DeMorgan’s theorem as many times as necessary. Complementing each literal of the dual of F

2-variable DeMorgan’s Theorem 3-variable DeMorgan’s Theorem 2.5 Boolean Functions (8-11) DeMorgan‘s Theorem 2-variable DeMorgan’s Theorem (x + y)’ = x’y’. (xy)’ = x’ + y’. 3-variable DeMorgan’s Theorem

Generalized DeMorgan’s Theorem 2.5 Boolean Functions (9-11) DeMorgan‘s Theorem Generalized DeMorgan’s Theorem

2.5 Boolean Functions (10-11) Example A simpler procedure for deriving the complement of a function is to take the dual of the function and complement each literal. This method follows from the Generalized DeMorgan’s Theorem

2.5 Boolean Functions (11-11) Example

Logic circuit  Boolean function  Truth table 2.6 Canonical and Standard Forms (1-23) Logic circuit  Boolean function  Truth table Any Boolean function can be expressed as a sum of minterms. Any Boolean function can be expressed as a product of maxterms

Minterm (or standard products): 2.6 Canonical and Standard Forms (2-23) Minterms and Maxterms Minterm (or standard products): Any binary variable may appear either in its normal form (x) or in its complement form (x'). n variables combined with AND. n variables can be combined to form 2n minterms. two Variables: x’y’, x’y, xy’, and xy A variable of a minterm is: Prime: if the corresponding bit of the binary number is a 0. Unprime: if the corresponding bit of the binary number is a 1. 001 => x’y’z (m1) 100 => xy’z’ (m4) 111 => xyz (m7)

Maxterm (or standard sums): 2.6 Canonical and Standard Forms (3-23) Minterms and Maxterms Maxterm (or standard sums): n variables combined with OR. A variable of a maxterm is: Prime: if the corresponding bit of the binary number is a 1. Unprime: if the corresponding bit of the binary number is a 0. Each maxterm is the complement of its corresponding minterm and vice versa. 001 => x + y + z’ (M1) 100 => x’ + y + z (M4) 111 => x’ + y’ + z’ (M7)

2.6 Canonical and Standard Forms (4-23) Minterms and Maxterms

2.6 Canonical and Standard Forms (5-23) Expressing Truth Table in Boolean Function Any Boolean function can be expressed as: Sum of minterms. Product of maxterms. (either 0 or 1 for each term) Said to be in a canonical form. Expressing Truth Table in Boolean Function Forming a minterm for each combination of the variables that produces a one in the function. Taking the OR of all those terms. n variables: 22n possible functions.

Expressing Truth Table in Boolean Function 2.6 Canonical and Standard Forms (6-23) Expressing Truth Table in Boolean Function Example: Minterms

Expressing Truth Table in Boolean Function 2.6 Canonical and Standard Forms (7-23) Expressing Truth Table in Boolean Function Maxterms 1 2

2.6 Canonical and Standard Forms (8-23) Expressing Boolean Function in Sum of Minterms (Method 1 - Supplementing) Rule If the function is not in Minterm form Expanding the expression into a sum of AND terms. Each term is then inspected to see if it contains all the variables. If it misses one or more variables, it is ANDed with an expression such as x + x', where x is one of the missing variables.

Express the Boolean function F = A + B'C as a sum of minterm. 2.6 Canonical and Standard Forms (9-23) Expressing Boolean Function in Sum of Minterms (Method 1 - Supplementing) Example Express the Boolean function F = A + B'C as a sum of minterm.

2.6 Canonical and Standard Forms (10-23) Expressing Boolean Function in Sum of Minterms (Method 1 - Supplementing) Example Short Notation: F(A, B, C ) = ∑(1,4,5,6,7)

2.6 Canonical and Standard Forms (11-23) Expressing Boolean Function in Sum of Minterms (Method 1 - Supplementing) Short Notation: F(A, B, C ) = ∑(1,4,5,6,7) Stands for the ORing of terms The minterms of the function List of the variables in the order taken when the minterm is converted to an AND term

2.6 Canonical and Standard Forms (12-23) Expressing Boolean Function in Sum of Minterms (Method 2 – Truth Table) Example Express the Boolean function F = A + B'C as a sum of minterm, using the 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)

Expressing Boolean Function in Product of Maxterms 2.6 Canonical and Standard Forms (13-23) Expressing Boolean Function in Product of Maxterms Rule If the function is not in Maxterm form Use distributive law e.g. x + yz = (x + y)(x + z) Each term is then inspected to see if it contains all the variables. If it misses one or more variables, it is ORed with an expression such as xx', where x is one of the missing variables.

Expressing Boolean Function in Product of Maxterms 2.6 Canonical and Standard Forms (14-23) Expressing Boolean Function in Product of Maxterms Example Express the Boolean function F = xy + x‘z as a product of maxterms.

Expressing Boolean Function in Product of Maxterms 2.6 Canonical and Standard Forms (15-23) Expressing Boolean Function in Product of Maxterms Example Short Notation: F(A, B, C ) = (0,2,4,5) The minterms of the function Stands for the ANDing of terms List of the variables in the order taken when the maxterm is converted to an OR term

Conversion Between Canonical Forms Canonical conversion procedure 2.6 Canonical and Standard Forms (16-23) Conversion Between Canonical Forms Canonical conversion procedure Consider: F(A, B, C) = ∑(1, 4, 5, 6, 7). F‘: complement of F = F’(A, B, C) = ∑(0, 2, 3) =m0 +m2 + m3 (Missing minterms) Compute complement of F’ by DeMorgan’s Theorem: F = (F‘)‘ = (m0 +m2 + m3)‘ = (m0‘. m2‘. m3‘) = M0 . M2 . M3 = (0, 2,3). (Obtain F in different form) mj‘=Mj. Summary Interchange the symbols ∑ and . List numbers missing from the original form. E.g. ∑(1, 4, 5, 6, 7) = (0, 2,3). Shown by truth table (Table 2-5)

Two Canonical Forms of Boolean Algebra from Truth Table 2.6 Canonical and Standard Forms (17-23) Two Canonical Forms of Boolean Algebra from Truth Table Example: Boolean exprexsion: F(x, y, z) = xy + x’z Truth Table Canonical Forms F(x, y, z) =(1, 3, 6, 7) =(0, 2, 4, 5)

Canonical forms  Standard forms 2.6 Canonical and Standard Forms (18-23) Standard Forms Canonical Forms: each minterm or maxterm must contain all the variables. Can be obtained from the truth table. Standard Forms: the terms that form the function may contain one, two, or any number of literals (variables). Canonical forms  Standard forms Sum of Minterms, Product of Maxterms. Sum of Products, Product of Sums.

Two types of standard forms (2-level) 2.6 Canonical and Standard Forms (19-23) Two types of standard forms (2-level) Sum of Products Boolean expression containing AND terms, called product terms with one or more literals each. Sum denotes ORing of these term. E.g. F1 = y‘ + xy + x‘yz‘. Product of Sums Boolean expression containing OR terms, called sum terms with one or more literals each. Product denotes ANDing of these term. E.g. F2 = x (y‘ + z)(x‘ + y + z‘)

Standard Form and Logic Circuit Two – level Implementation 2.6 Canonical and Standard Forms (20-23) Standard Form and Logic Circuit Two – level Implementation F1 = y‘ + xy + x‘yz‘

Standard Form and Logic Circuit Two– level Implementation 2.6 Canonical and Standard Forms (21-23) Standard Form and Logic Circuit Two– level Implementation F2 = x (y‘ + z)(x‘ + y + z‘)

2.6 Canonical and Standard Forms (22-23) NonStandard Form and Logic Circuit Can be changed to a standard form by using distributive law Three – level Implementation NonStandard Form: F3 = AB + C(D + E)

2.6 Canonical and Standard Forms (23-23) NonStandard Form and Logic Circuit A two-level implementation is preferred: produces the least amount of delay through the gates when the signal propagates from the inputs to the output Two – level Implementation Standard Form: F4 = AB + CD + CE

Subdivided into Three Categories 2.7 Other Logic Operations (1-3) There are 22n functions for n binary variables. For n =2: Where are 16 possible functions. AND and OR operators are two of them: x . y and x + y. Subdivided into Three Categories Two functions that produce a constant 0 or I. Four functions with unary operation: complement and transfer. Ten functions with binary operators that define eight different operations: AND, OR NAND, NOR, exclusive-OR, equivalence (XNOR), inhibition, and implication.

Possible functions for the two n variables = 22n 2.7 Other Logic Operations (2-3) Possible functions for the two n variables = 22n

2.7 Other Logic Operations (3-3)

2.8 Digital Logic Gates (1-9) Standard Gates Eight gates are: AND. OR. Complement (NOT) (Inverter = Buffer + Bubble) Transfer (Buffer) NAND. NOR. XOR. Equivelance. Each gate has one or two binary input variables, designated by x and y, and one binary output variable designated by F.

2.8 Digital Logic Gates (2-9)

2.8 Digital Logic Gates (3-9)

2.8 Digital Logic Gates (4-9) Mulitple Inputs Inverter and buffere accepts ONLY one variable. AND and OR functions are Communicative and Associative.

2.8 Digital Logic Gates (5-9) Mulitple Inputs NAND and NOR functions are Communicative but not Associative. Solution Define multiple NOR (or NAND) gate as a complemented OR (or AND) gate (Section 3-6)

2.8 Digital Logic Gates (6-9) Mulitple Inputs

2.8 Digital Logic Gates (7-9)

2.8 Digital Logic Gates (8-9) Mulitple Inputs XOR and equivalence gates are both Communicative and Associative. Uncommon, usually constructed with other types of gates. XOR is an odd function (Section 3.9).

2.8 Digital Logic Gates (9-9) Mulitple Inputs