EC-121 Digital Logic Design

Similar documents
Chapter 2 Boolean Algebra and Logic Gates

Chapter 2: Boolean Algebra and Logic Gates

Chap 2. Combinational Logic Circuits

Chapter 2 Boolean Algebra and Logic Gates

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

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

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

Boolean Algebra and Logic Gates

MC9211 Computer Organization

Logic Design. Chapter 2: Introduction to Logic Circuits

Boolean Algebra & Logic Gates. By : Ali Mustafa

Chapter 2 : Boolean Algebra and Logic Gates

Chapter 2 Boolean Algebra and Logic Gates

Chapter 2 Combinational Logic Circuits

Chapter 2: Switching Algebra and Logic Circuits

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

Standard & Canonical Forms

Chapter 2 Boolean Algebra and Logic Gates

Standard Expression Forms

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

CHAPTER III BOOLEAN ALGEBRA

Chapter-2 BOOLEAN ALGEBRA

Lecture 2 Review on Digital Logic (Part 1)

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

CHAPTER III BOOLEAN ALGEBRA

ELCT201: DIGITAL LOGIC DESIGN

CHAPTER1: Digital Logic Circuits Combination Circuits

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

Number System conversions

Week-I. Combinational Logic & Circuits

COE 202: Digital Logic Design Combinational Logic Part 2. Dr. Ahmad Almulhem ahmadsm AT kfupm Phone: Office:

DIGITAL CIRCUIT LOGIC BOOLEAN ALGEBRA

Digital Design. Digital Design

Chapter 2 Combinational Logic Circuits

Contents. Chapter 2 Digital Circuits Page 1 of 30

BOOLEAN ALGEBRA TRUTH TABLE

This form sometimes used in logic circuit, example:

Boolean Algebra. The Building Blocks of Digital Logic Design. Section. Section Overview. Binary Operations and Their Representation.

CHAPTER 2 BOOLEAN ALGEBRA

Chapter 2 Combinational Logic Circuits

WEEK 2.1 BOOLEAN ALGEBRA

ENG2410 Digital Design Combinational Logic Circuits

Digital Logic Design. Malik Najmus Siraj

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

Combinational Logic Design Principles

Cs302 Quiz for MID TERM Exam Solved

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

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

Boolean Algebra CHAPTER 15

Chapter 2 Combinational Logic Circuits

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

ELCT201: DIGITAL LOGIC DESIGN

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

Chapter 2 Combinational logic

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

UNIT 3 BOOLEAN ALGEBRA (CONT D)

Digital Circuit And Logic Design I. Lecture 3

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

DIGITAL LOGIC CIRCUITS

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

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

Binary Logic and Gates

Department of Electrical & Electronics EE-333 DIGITAL SYSTEMS

Chapter 2: Princess Sumaya Univ. Computer Engineering Dept.

Lecture 22 Chapters 3 Logic Circuits Part 1

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

Digital Logic Design. Combinational Logic

Chapter 2 Combinational

Chapter 3. Boolean Algebra. (continued)

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

DIGITAL CIRCUIT LOGIC BOOLEAN ALGEBRA

Systems I: Computer Organization and Architecture

Computer Organization I

Gate-Level Minimization

Boolean Algebra and logic gates

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

Combinational Logic. Review of Combinational Logic 1

CS 226: Digital Logic Design

School of Computer Science and Electrical Engineering 28/05/01. Digital Circuits. Lecture 14. ENG1030 Electrical Physics and Electronics

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

L2: Combinational Logic Design (Construction and Boolean Algebra)

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

EEE130 Digital Electronics I Lecture #4

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

Boolean Algebra and Logic Simplification

Combinational Logic Fundamentals

Digital electronics form a class of circuitry where the ability of the electronics to process data is the primary focus.

Boolean Algebra, Gates and Circuits

Chapter 7 Logic Circuits

Boolean Algebra and Digital Logic

ECE 238L Boolean Algebra - Part I

Section 3: Combinational Logic Design. Department of Electrical Engineering, University of Waterloo. Combinational Logic

Unit 2 Boolean Algebra

CHAPTER 3 BOOLEAN ALGEBRA

Boolean Algebra and Logic Gates

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

Logic and Computer Design Fundamentals. Chapter 2 Combinational Logic Circuits. Part 1 Gate Circuits and Boolean Equations

UNIT 4 MINTERM AND MAXTERM EXPANSIONS

Signals and Systems Digital Logic System

Transcription:

EC-121 Digital Logic Design Lecture 2 [Updated on 02-04-18] Boolean Algebra and Logic Gates Dr Hashim Ali Spring 2018 Department of Computer Science and Engineering HITEC University Taxila!1

Overview What to learn Basic Definitions Axiomatic Definition of Boolean Algebra Basic Theorems and Properties of Boolean Algebra Boolean Functions Canonical and Standard Forms Digital Logic Gates Digital Circuit Optimisation!2

Basic Definitions The most common postulates used to formulate various algebraic structures are:- Closure: N={1,2,3, }, for any a,b N we obtain a unique c N by the operation a+b=c. Ex: 2 + 3 = 5 and 2,3,5 N. Ex: 2-3 = -1 and 2,3 N, while (-1) N. 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 Commutative Law: (x * y) = y * x for all x,y S!3

Identity element: e [0 or 1] is identity element which belongs to S. e * x = x * e = x for every x S Ex: x + 0 = 0 + x = x for any x I={,-2,-1,0,1,2, } Ex: x + 1 = 1 + x = x Inverse: In the set of integers, I, with e = 0 x * y = e; a + (-a) = 0 where, -a and y are inverse elements Commutative Law: If * and. are two binary operators on a set S, * is said to be distributive over. whenever x *(y. z) = (x * y). (x * z)!4

The operators and postulates have the following meanings: The binary operator + defines addition. The additive identity is 0. The additive inverse defines subtraction. The binary operator. defines multiplication. The multiplicative identity is 1. The multiplicative inverse of a = 1/a defines division, i.e., a. 1/a = 1 The only distributive law applicable is that of. over +: a. (b + c) = (a. b) + (a. c)!5

Axiomatic Definitions of Boolean Algebra Boolean algebra is defined by a set of elements, B, provided following postulates with two binary operators, + and., are satisfied: 1. Closure with respect to the operators + and. 2. An identity element with respect to + and. is 0 and 1, respectively. 3. Commutative with respect to + and. Ex: x+y = y+x 4. + is distributive over. : x+(y.z) = (x+y).(x+z). is distributive over + : x.(y+z) = (x.y)+(x.z) 5. Complement elements: x+x =1 and x.x =0. 6. There exists at least two elements x,y B such that x y.!6

Comparing Boolean Algebra with Arithmetic and Ordinary Algebra Huntington postulates don t include the associative law, however, this holds for Boolean algebra. The distributive law of + over. is valid for Boolean algebra, but not for ordinary algebra. Boolean algebra doesn t have additive and multiplicative inverses; therefore, no subtraction or division operations. Postulate 5 defines an operator called complement that is not available in ordinary algebra. Ordinary algebra deals with the real numbers. Boolean algebra deals with the as yet undefined set of elements, B, in two-valued Boolean algebra, the B have two elements, 0 and 1.!7

Two-Valued Boolean Algebra With rules for the two binary operators + and. as shown in the following table, exactly the same as AND, OR, and NOT operations, respectively. From the tables as defined by postulate 2.!8

Distributive Law To emphasize the similarities between two-valued Boolean algebra and other binary systems, this algebra was called binary logic. We shall drop the adjective two-valued from Boolean algebra in subsequent discussions.!9

Basic Theorems and Properties of Boolean algebra If the binary operators and the identity elements are interchanged, it is called the duality principle. We simply interchange OR and AND operators and replace 1 s by 0 s and 0 s by 1 s. The theorem 1(b) is the dual of theorem 1(a) and that each step of the proof in part (b) is the dual of part (a). Show at the slice after next slice.!10

Postulates and Theorems of Boolean Algebra!11

Basic Theorem Basic Theorems: proven by the postulates of table shown in previous slide.!12

The theorems of Boolean algebra can be shown to hold true by means of truth tables. First Absorption Theorem!13

DeMorgan s Theorem (x + y) = x y!14

Operator Precedence The operator Precedence for evaluating Boolean expression is: Parentheses NOT AND OR!15

Boolean Functions Boolean algebra is an algebra that deals with binary variables and logic operations. A Boolean function described by an algebraic expression consists of binary variables (Literals), the constants 0 and 1, and the logic operation symbols. Consider the following Boolean Function: F1 = x + y z A Boolean function can be represented in a Truth Table. The binary combinations for the truth table obtained by counting from 0 through 2 n -1. Gate-Level Implementation!16

Simplification of the Algebraic Functions There is only one way to represent Boolean function in a truth table. In algebraic form, it can be expressed in a variety of ways. By simplifying Boolean algebra, we can reduce the number of gates in the circuit and the number of inputs to the gate.!17

Before Simplification of Boolean Function Consider the following Boolean Function: F2 = x y z + x yz + xy This function with logic gates is shown in figure. The function is equal to 1 when, xyz = 001 or xyz = 011 or xyz = 10x xyz = 100 xyz = 101 x!18

After Simplification of Boolean Function Simplify the following Boolean Function: F2 = x y z + x yz + xy = x z(y+y ) + xy = x z + xy Fig. (b) would be preferable because it requires less wires and components. Simplified!19

Check Equivalency F2 = x y z + x yz + xy F2=1 when, xyz=001 or 011 or when xy=10x F2 = x z + xy F2=1 when, xz=0x1 or xy=10x Primitive Simplified Since both expression produce the same truth table, they are said to be equivalent.!20

Real-world Scenario Alarm system for a dorm room The alarm should go on when the door opens OR when the door is closed AND the motion detector goes on. Inputs: A door; A=1 (door open) and A=0 (door closed) B motion detector; B=1 (motion detected) and B=0 (no motion) Output: F = A + A B!21

Algebraic Manipulation Example: ( x + y )( x + y ) = xx + xy + xy + yy = x + xy +xy = x ( 1 + y + y ) = x (1 + 1 ) = x Example: x y + x z + y z = xy + x z + (x + x )yz = xy + x z + xyz + x yz = xy(1 + z) + x z(1 + y) = xy + x z Consensus Theorem: It is the conjunction of all the unique literals of the terms, excluding the literal that appears unnegated in one term and negated in the other.!22

Complement of the Function Find the complement of the function by applying DeMorgan s theorem. F = x yz + x y z F = (x yz + x y z) = (x yz ) (x y z) = (x+y +z)(x+y+z ) (x + y) = x y Find the complement of the function by taking their dual and complementing each literal. F = x yz + x y z Dual of F = (x +y+z ) (x +y +z) Complement of each literal of F F = (x+y +z) (x+y+z )!23

Canonical and Standard Forms n variables can form 2 n (0~2 n-1 ) Minterms, so does Maxterms (as shown in next slide). Minterms and Maxterms Minterms: obtain from an AND term of the n variables, or called standard product. Maxterms: n variables form an OR term, or called standard sum. Each Maxterm is the complement of its corresponding Minterm, and vice versa. A sum of minterms or product of maxterms are said to be in canonical form.!24

Sum of Minterms From a truth table can express a minterm for each combination of the variables that produces a 1 in a Boolean function, and then taking the OR of all those terms. Example: The function F in the truth table is determined by expressing the combinations where F=1: F = x y z + xy z + xyz F = m1 + m4 + m7 Sum of Minterms!25

Sum of Minterms From a truth table can express a minterm for each combination of the variables that produces a 0 in a Boolean function, and then taking the OR of all those terms. Example: The function F in the truth table is determined by expressing the combinations where F=0: F = x y z + x yz + x yz + xy z + xyz Take complement of F, we obtain F F = (x+y+z).(x+y +z).(x+y +z ).(x +y+z ). (x +y +z) F = M0. M2. M3. M5. M6 Product of Maxterms!26

Example Express the Boolean function F = A + B C in a sum of minterms. A lost two variables A = A(B+B ) = AB + AB still missing one variable A = AB(C + C ) + AB (C + C ) A = ABC + ABC + AB C + AB C B C lost one variable B C = B C(A + A ) = AB C + A B C Combining all terms F = A B C+ AB C +AB C+ABC +ABC = m1+m4+m5+m6+m7 Convenient expression F(A, B, C) = (1, 4, 5, 6, 7)!27

Product of Maxterms Express the Boolean function F= xy + x z in a product of maxterm form. Using distributive law F = xy + x z = (xy + x )(xy + z) F = (x + x )(y + x )(x + z)(y + z) F = (x + y)(x + z)(y + z) Each OR term missing one variable x + y = x + y + zz = (x + y + z)(x + y + z ) x + z = x + z + yy = (x + y + z)(x + y + z) y + z = y + z + xx = (x + y + z)(x + y + z) Combining all the terms F = (x + y + z)(x + y + z)(x + y + z)(x + y + z ) F = M0.M2.M4.M5 A convenient way to express this function F(x, y, z) = (0, 2, 4, 5)!28

Conversion between Canonical Forms Ex: Boolean expression: F = xy + x z First step is to generate truth table:- xy = 11 or xz = 01 Sum of minterms is, F(A, B, C) = (1, 3, 6, 7) Since have a total of eight minterms or maxterms in a function off three variables. Product of maxterms is, F(x, y, z) = (0, 2, 4, 5) To convert from one canonical form to another, interchange the symbols and and list those numbers missing from the original form.!29

Standard Forms Another way to express Boolean functions is in standard form. Sum of Products (SOP): F1 = y + xy + x yz Product of Sums (POS): F2 = x(y + z)(x + y + z )!30

Is AB+C(D+E) in standard form? F3 is a non-standard form, neither in SOP nor in POS. F3 can change to a standard form by using distributive law and implement in a SOP type.!31

Other Logic Operations!32

Digital Logic Gates The graphic symbols and truth tables of the gates of the eight different operations are shown in figure.!33

XOR Gate Property The XOR and equivalence (XNOR) gates are both commutative and associative and can be extended to more than two inputs. The XOR is an odd function. The three inputs XOR is normally implemented by cascading 2-input gates.!34

Digital Circuit Optimisation Goal: To obtain the simplest implementation for a given function. Optimisation is a more formal approach to simplification that is performed using a specific procedure or algorithm. Optimisation requires a cost criterion to measure the simplicity of a circuit. Two distinct cost criteria we will use:- Literal cost (L) Gate input cost (G) Gate input cost with NOTs (GN)!35

Literal Cost (L) Literal a variable or it complement. Literal cost the number of literal appearances in a Boolean expression corresponding to the logic circuit diagram. Examples: Which solution (F) is the best? F = BD + AB C + AC D F = BD + AB C + AB D + ABC F = (A + B)(A + D)(B + C + D )(B + C + D) L = 8 L = 11 L = 10!36

Gate Input Cost (G) or with Inverters (GN) Gate input costs - the number of inputs to the gates in the implementation corresponding exactly to the given equation or equations. (G - inverters not counted, GN - inverters counted) For SOP and POS equations, it can be found from the equation(s) by finding the sum of: all literal appearances the number of terms excluding terms consisting only of a single literal (G) and optionally, the number of distinct complemented single literals (GN). Examples: F = BD + AB C + AC D F = BD + AB C + AB D + ABC F = (A + B)(A + D)(B + C + D )(B + C + D) Which solution (F) is the best? G = 11 G = 15 G = 14 GN = 14 GN = 19 GN = 17!37

Example: Cost Criteria!38

!39

Boolean function Optimisation Minimizing the gate input (or literal) cost of a (a set of) Boolean equation(s) reduces circuit cost. We choose gate input cost. Boolean Algebra and graphical techniques are tools to minimize cost criteria values. Some important questions: When do we stop trying to reduce the cost? Do we know when we have a minimum cost? Treat optimum or near-optimum cost functions for two-level (SOP and POS) circuits first. Introduce a graphical technique using Karnaugh maps (K-maps, for short)!40

Positive and Negative Logic We assign to the relative amplitudes of the two signal levels as the high-level and low-level as shown in future. High-level (H): represent logic-1 as a positive logic system. Low-level (L): represent logic-0 as a negative logic system. It is up to the user to decide on a positive or negative logic polarity between some certain potential. The figures (on right) specifies the physical behavior of the gate when H is 3 volts and L is 0 volts.!41

Demonstration of Positive and Negative Logic The truth table of Fig. (c) assumes positive logic assignment, with H=1 and L=0. It is the same as the one for the AND operation. The table of Fig. (e) represents the OR operation even though the entries are reversed. The conversion from positive logic to negative logic, and vice versa, is essentially an operation that changes 1 s to 0 s and 0 s to 1 s (dual) in both the inputs and the outputs of a gate.!42

Integrated Circuits An Integrated Circuit (IC) is a silicon semiconductor crystal, called chip, containing the electronic components for constructing digital gates.!43

Levels of Integration Small-scale integration( SSI): the number of gates is usually fewer than 10 and is limited by the number of pins available in the IC. Medium-scale integration (MSI): have a complexity of approximately 10 to 1000 gates in a single package, and usually perform specific elementary digital operations. Ex. Adders, multiplexers (chapter 4), registers, counters (chapter6). Large-scale integration (LSI): contain thousands of gates in a single package. Ex. Memory chips, processors. Very large-scale integration (VLSI): contain hundred of thousands of gates within a single package. Ex. Large memory arrays and complex microcomputer chips.!44

Digital Logic Families The circuit technology is referred to as a digital logic family. The most popular circuit technology: TTL Transister-transister Logic: has been used for a long time and is considered as standard; but is declining in use. ECL Emitter-coupled Logic: has high-speed operation in system; but is declining in use. MOS Metal-oxide Semiconductor: has high component density. CMOS Complementary Metal-oxide Semiconductor: has low power consumption, essential for VLSI design, and has become the dominant logic family.!45

Logic Families Characteristics Parameters Fan out specifies the number of standard loads that the output of a typical gate can drive without impairing its normal operation. Fan in is the number of inputs available in a gate. Power dissipation is the power consumed by the gate that must be available from the power supply. Propagation delay is the average transition delay time for the signal to propagate from input to output. Noise margin is the maximum external noise voltage added to an input signal that does not cause an undesirable change in the circuit output.!46

Computer-Aided Design (CAD) The design of digital systems with VLSI circuits are very complexity to develop and verify with using CAD tools. We can choose between an application specific integrated circuit (ASIC), a field-programmable gate array (FPGA), a programmable logic device (PLD), or a full-custom IC. HDL is an important development tool in the design of digital systems.!47