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

Similar documents
Chapter 2 Boolean Algebra and Logic Gates

EEA051 - Digital Logic 數位邏輯 吳俊興高雄大學資訊工程學系. September 2004

Chapter 2. Boolean Algebra and Logic Gates

Boolean Algebra and Logic Gates

MC9211 Computer Organization

Chapter 2 Boolean Algebra and Logic Gates

Chapter 2 Boolean Algebra and Logic Gates

Chapter 2: Princess Sumaya Univ. Computer Engineering Dept.

Chapter 2: Boolean Algebra and Logic Gates

Chapter 2 (Lect 2) Canonical and Standard Forms. Standard Form. Other Logic Operators Logic Gates. Sum of Minterms Product of Maxterms

Chapter 2 : Boolean Algebra and Logic Gates

Chapter 2: Switching Algebra and Logic Circuits

CHAPTER III BOOLEAN ALGEBRA

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

Digital Circuit And Logic Design I. Lecture 3

Week-I. Combinational Logic & Circuits

CHAPTER III BOOLEAN ALGEBRA

II. COMBINATIONAL LOGIC DESIGN. - algebra defined on a set of 2 elements, {0, 1}, with binary operators multiply (AND), add (OR), and invert (NOT):

Chapter 2 Combinational Logic Circuits

Digital Logic Design. Malik Najmus Siraj

Boolean Algebra & Logic Gates. By : Ali Mustafa

EC-121 Digital Logic Design

Logic Design. Chapter 2: Introduction to Logic Circuits

Chapter-2 BOOLEAN ALGEBRA

CHAPTER 2 BOOLEAN ALGEBRA

Chapter 2 Combinational Logic Circuits

Unit 2 Boolean Algebra

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

WEEK 2.1 BOOLEAN ALGEBRA

ENG2410 Digital Design Combinational Logic Circuits

Combinational Logic Design Principles

BOOLEAN ALGEBRA TRUTH TABLE

Contents. Chapter 2 Digital Circuits Page 1 of 30

Number System conversions

Chapter 2 Boolean Algebra and Logic Gates

CHAPTER1: Digital Logic Circuits Combination Circuits

Binary Logic and Gates

ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN. Week 2 Dr. Srinivas Shakkottai Dept. of Electrical and Computer Engineering

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

UNIVERSITI TENAGA NASIONAL. College of Information Technology

ECE380 Digital Logic. Axioms of Boolean algebra

Computer Organization I

Digital Logic. Lecture 5 - Chapter 2. Outline. Other Logic Gates and their uses. Other Logic Operations. CS 2420 Husain Gholoom - lecturer Page 1

Digital Logic Design. Combinational Logic

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

Chap 2. Combinational Logic Circuits

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

Combinational Logic. Review of Combinational Logic 1

Binary Logic and Gates. Our objective is to learn how to design digital circuits.

Chapter 2 Combinational Logic Circuits

Gate-Level Minimization

Digital Design. Digital Design

Boolean Algebra CHAPTER 15

Boolean Algebra and Logic Gates Chapter 2. Topics. Boolean Algebra 9/21/10. EECE 256 Dr. Sidney Fels Steven Oldridge

Functions. Computers take inputs and produce outputs, just like functions in math! Mathematical functions can be expressed in two ways:

ECE 20B, Winter 2003 Introduction to Electrical Engineering, II LECTURE NOTES #2

Lecture 2 Review on Digital Logic (Part 1)

Logic Gate Level. Part 2

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

DIGITAL CIRCUIT LOGIC BOOLEAN ALGEBRA

Unit 2 Session - 6 Combinational Logic Circuits

Boolean Algebra, Gates and Circuits

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

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

Gray Code. ASCII Character Code. To convert the number from binary to Gray code the relations must be known. 1 1 = = = = 0

Learning Objectives. Boolean Algebra. In this chapter you will learn about:

CSE20: Discrete Mathematics for Computer Science. Lecture Unit 2: Boolan Functions, Logic Circuits, and Implication

Lecture 5: NAND, NOR and XOR Gates, Simplification of Algebraic Expressions

Every time has a value associated with it, not just some times. A variable can take on any value within a range

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

BOOLEAN LOGIC. By- Neha Tyagi PGT CS KV 5 Jaipur II Shift, Jaipur Region. Based on CBSE curriculum Class 11. Neha Tyagi, KV 5 Jaipur II Shift

Lecture 6: Manipulation of Algebraic Functions, Boolean Algebra, Karnaugh Maps

ELCT201: DIGITAL LOGIC DESIGN

1. Name the person who developed Boolean algebra

Combinational logic. Possible logic functions of two variables. Minimal set of functions. Cost of different logic functions.

CHAPTER 12 Boolean Algebra

Circuits & Boolean algebra.

control in out in out Figure 1. Binary switch: (a) opened or off; (b) closed or on.

Unit 2 Boolean Algebra

EECS Variable Logic Functions

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

Combinational Logic Fundamentals

7.1. Unit 7. Minterm and Canonical Sums 2- and 3-Variable Boolean Algebra Theorems DeMorgan's Theorem Simplification using Boolean Algebra

XOR - XNOR Gates. The graphic symbol and truth table of XOR gate is shown in the figure.

Administrative Notes. Chapter 2 <9>

Chapter 2 Combinational Logic Circuits

Combinatorial Logic Design Principles

EEE130 Digital Electronics I Lecture #4

Slide Set 3. for ENEL 353 Fall Steve Norman, PhD, PEng. Electrical & Computer Engineering Schulich School of Engineering University of Calgary

Total Time = 90 Minutes, Total Marks = 50. Total /50 /10 /18

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

This form sometimes used in logic circuit, example:

211: Computer Architecture Summer 2016

UC Berkeley College of Engineering, EECS Department CS61C: Representations of Combinational Logic Circuits

Chapter 2. Digital Logic Basics

Binary logic consists of binary variables and logical operations. The variables are

Signals and Systems Digital Logic System

Boolean Algebra and Logic Simplification

Chapter 3. Boolean Algebra. (continued)

Boolean Algebra. Examples: (B=set of all propositions, or, and, not, T, F) (B=2 A, U,, c, Φ,A)

Transcription:

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

2 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

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

4 2.2 Basic Definitions (2-2) Complement 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: 5 x y x y x y x+y = AND + = OR = NOT 0 0 0 0 1 0 1 0 0 1 1 1 0 0 0 0 1 1 1 0 1 1 1 1 x x 0 1 1 0

2.3 Axiomatic Definition of Boolean Algebra (2-2) Two- Valued Boolean Algebra: 6 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. 7

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

2.4 Basic Theorems and Properties (3-7) Basic Theorems 9

2.4 Basic Theorems and Properties (4-7) Basic Theorems 10

2.4 Basic Theorems and Properties (5-7) Basic Theorems 11

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. 12 Theorem 6(a) Absorption The theorems of Boolean algebra can be proven by means of truth table.

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

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

2.5 Boolean Functions (1-11) F 1 = x + (y z) X Y Z Y Y *Z X + (y z) 0 0 0 1 0 0 0 0 1 1 1 1 0 1 0 0 0 0 0 1 1 0 0 0 1 0 0 1 0 1 1 0 1 1 1 1 1 1 0 0 0 1 1 1 1 0 0 1 15

2.5 Boolean Functions (1-11) Truth table 16

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

2.5 Boolean Functions (3-11) 18 Gate Implementation of F 2 F2= x y z + x yz + xy

19 2.5 Boolean Functions (4-11) Gate Implementation F 2 after simplifying it F 2 = x y z + x yz + xy. F 2 = x (y z + yz) + xy. F 2 = x (z (y + y)) + xy. F 2 = x (z (1)) + xy. F 2 = x z + xy.

20 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

21 2.5 Boolean Functions (6-11) DeMorgan s Theorem (x+y)(x+y ) =x+ xy + xy +yy =x (1+ y + y ) =x 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 (x+y)(x +z)(y+z) =(x+y)(x +z) by duality function 4

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 22

23 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

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

25 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 26

27 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

28 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 2 n 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 (m 1 ) 100 => xy z (m 4 ) 111 => xyz (m 7 )

29 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 (M 1 ) 100 => x + y + z (M 4 ) 111 => x + y + z (M 7 )

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

31 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: 2 2n possible functions.

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

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

34 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.

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. 35

36 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)

37 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

38 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)

39 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.

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. 40

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

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) =m 0 +m 2 + m 3 (Missing minterms) Compute complement of F by DeMorgan s Theorem: m j =M j. Summary 42 F = (F ) = (m 0 +m 2 + m 3 ) = (m 0. m 2. m 3 ) = M 0. M 2. M 3 = (0, 2,3). (Obtain F in different form) 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)

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

2.6 Canonical and Standard Forms (18-23) 44 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.

45 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. F 1 = 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. F 2 = x (y + z)(x + y + z )

2.6 Canonical and Standard Forms (20-23) Standard Form and Logic Circuit 46 Two level Implementation F 1 = y + xy + x yz

2.6 Canonical and Standard Forms (21-23) Standard Form and Logic Circuit 47 Two level Implementation F 2 = x (y + z)(x + y + z )

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

49 2.6 Canonical and Standard Forms (23-23) NonStandard Form and Logic Circuit Two level Implementation Standard Form: F 4 = AB + CD + CE 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

50 2.7 Other Logic Operations (1-3) There are 2 2n 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.

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

2.7 Other Logic Operations (3-3) 52

53 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) 54

2.8 Digital Logic Gates (3-9) 55

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

57 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 58

2.8 Digital Logic Gates (7-9) 59

60 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 61