CS 226: Digital Logic Design

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

Logic Design. Chapter 2: Introduction to Logic Circuits

Chapter 2: Switching Algebra and Logic Circuits

Combinational Logic Design Principles

Digital Circuit And Logic Design I. Lecture 3

This form sometimes used in logic circuit, example:

EEE130 Digital Electronics I Lecture #4

Switches: basic element of physical implementations

Chapter 2 Combinational Logic Circuits

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

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

Combinational Logic. Review of Combinational Logic 1

WEEK 2.1 BOOLEAN ALGEBRA

Combinatorial Logic Design Principles

CHAPTER1: Digital Logic Circuits Combination Circuits

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

Chapter 2 Combinational Logic Circuits

Learning Objectives 10/7/2010. CE 411 Digital System Design. Fundamental of Logic Design. Review the basic concepts of logic circuits. Dr.

4 Switching Algebra 4.1 Axioms; Signals and Switching Algebra

Chapter 2 Boolean Algebra and Logic Gates

211: Computer Architecture Summer 2016

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

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

ELCT201: DIGITAL LOGIC DESIGN

Combinational Logic Fundamentals

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

CprE 281: Digital Logic

Administrative Notes. Chapter 2 <9>

Chapter-2 BOOLEAN ALGEBRA

Lecture 4: More Boolean Algebra

Contents. Chapter 2 Digital Circuits Page 1 of 30

Slides for Lecture 10

CprE 281: Digital Logic

CS61c: Representations of Combinational Logic Circuits

Chapter 2: Princess Sumaya Univ. Computer Engineering Dept.

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

Chapter 2 Boolean Algebra and Logic Gates

CHAPTER III BOOLEAN ALGEBRA

Chapter 2 Combinational Logic Circuits

Chapter 2: Boolean Algebra and Logic Gates

Boolean Algebra and Logic Simplification

Standard Expression Forms

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

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

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

EECS Variable Logic Functions

Lecture 2 Review on Digital Logic (Part 1)

CHAPTER III BOOLEAN ALGEBRA

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

Computer Organization: Boolean Logic

CSE 140, Lecture 2 Combinational Logic CK Cheng CSE Dept. UC San Diego

Chapter 2. Boolean Algebra and Logic Gates

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

Chapter 7 Logic Circuits

XI STANDARD [ COMPUTER SCIENCE ] 5 MARKS STUDY MATERIAL.

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

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

CprE 281: Digital Logic

Boolean Algebra and Logic Gates

Chapter 4 Optimized Implementation of Logic Functions

ENG2410 Digital Design Combinational Logic Circuits

Boolean algebra. Examples of these individual laws of Boolean, rules and theorems for Boolean algebra are given in the following table.

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

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

Number System conversions

Digital Logic. CS211 Computer Architecture. l Topics. l Transistors (Design & Types) l Logic Gates. l Combinational Circuits.

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

CPE100: Digital Logic Design I

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

Chapter 2 Boolean Algebra and Logic Gates

COSC 243. Introduction to Logic And Combinatorial Logic. Lecture 4 - Introduction to Logic and Combinatorial Logic. COSC 243 (Computer Architecture)

Fundamentals of Computer Systems

University of Technology

Chapter 2 Combinational Logic Circuits

Digital Logic: Boolean Algebra and Gates. Textbook Chapter 3

1 Boolean Algebra Simplification

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

Fundamentals of Computer Systems

Unit 8A Computer Organization. Boolean Logic and Gates

Lecture A: Logic Design and Gates

BOOLEAN ALGEBRA CLASS XII. Presented By : Dinesh Patel PGT CS KV IIT Powai

Possible logic functions of two variables

ELEC Digital Logic Circuits Fall 2014 Switching Algebra (Chapter 2)

DIGITAL CIRCUIT LOGIC BOOLEAN ALGEBRA

CprE 281: Digital Logic

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

Combinational Logic Circuits Part II -Theoretical Foundations

CSC9R6 Computer Design. Practical Digital Logic

Unit 2 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):

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

CMSC 313 Lecture 16 Postulates & Theorems of Boolean Algebra Semiconductors CMOS Logic Gates

ECE380 Digital Logic. Axioms of Boolean algebra

Boolean Algebra and logic gates

Boolean Algebra and Digital Logic

EC-121 Digital Logic Design

Chap 2. Combinational Logic Circuits

2. Associative Law: A binary operator * on a set S is said to be associated whenever (A*B)*C = A*(B*C) for all A,B,C S.

Week-I. Combinational Logic & Circuits

DIGITAL CIRCUIT LOGIC BOOLEAN ALGEBRA

Transcription:

CS 226: Digital Logic Design 0 1 1 I S 0 1 0 S Department of Computer Science and Engineering, Indian Institute of Technology Bombay. 1 of 29

Objectives In this lecture we will introduce: 1. Logic functions and circuits, 2. Boolean algebra for manipulating with logic functions, 3. Logic gates, and 4. Synthesis of simple logic circuits. 2 of 29

Objectives Logic functions and circuits Boolean Algebra Synthesis of Simple Circuits Introduction to CAD tools 3 of 29

Variables and Functions Logic circuits form the foundation of digital systems Binary logic circuits perform operations of binary signals 4 of 29

Variables and Functions Logic circuits form the foundation of digital systems Binary logic circuits perform operations of binary signals Let s consider the simplest element logic circuit: switch. A switch can be in two states: open and close. Graphical symbol for a switch A simple application using a switch : lightbulb 4 of 29

Variables and Functions Logic circuits form the foundation of digital systems Binary logic circuits perform operations of binary signals Let s consider the simplest element logic circuit: switch. A switch can be in two states: open and close. Graphical symbol for a switch A simple application using a switch : lightbulb State of the switch can be given as a binary variable x s.t.: x = 0 when switch is open, and x = 1 when switch is closed. The function of a switch: F = 0 when x = 0 and F = 1 when x = 1. In other words F(x) = x. 4 of 29

Variables and Functions Logic circuits form the foundation of digital systems Binary logic circuits perform operations of binary signals Let s consider the simplest element logic circuit: switch. A switch can be in two states: open and close. Graphical symbol for a switch A simple application using a switch : lightbulb State of the switch can be given as a binary variable x s.t.: x = 0 when switch is open, and x = 1 when switch is closed. The function of a switch: F = 0 when x = 0 and F = 1 when x = 1. In other words F(x) = x. Keywords: Logic expression defining output, logic function, and input variable. 4 of 29

Variables and Functions Logic circuits form the foundation of digital systems Binary logic circuits perform operations of binary signals Let s consider the simplest element logic circuit: switch. A switch can be in two states: open and close. Graphical symbol for a switch A simple application using a switch : lightbulb State of the switch can be given as a binary variable x s.t.: x = 0 when switch is open, and x = 1 when switch is closed. The function of a switch: F = 0 when x = 0 and F = 1 when x = 1. In other words F(x) = x. Keywords: Logic expression defining output, logic function, and input variable. Let s use two switches to control the lightbulb by connecting them in series and parallel. 4 of 29

Introducing AND nd OR Logical AND operation (series connection) We write the expression L(x, y) = x y to say L(x, y) = x AND y when { 1 if x = 1 and y = 1. L = 0 otherwise. 5 of 29

Introducing AND nd OR Logical AND operation (series connection) We write the expression L(x, y) = x y to say L(x, y) = x AND y when { 1 if x = 1 and y = 1. L = 0 otherwise. Logical OR operation (parallel connection) We write the expression L(x, y) = x + y to say L(x, y) = x OR y when { 0 if x = 0 and y = 0. L = 0 otherwise. 5 of 29

Introducing AND nd OR Logical AND operation (series connection) We write the expression L(x, y) = x y to say L(x, y) = x AND y when { 1 if x = 1 and y = 1. L = 0 otherwise. Logical OR operation (parallel connection) We write the expression L(x, y) = x + y to say L(x, y) = x OR y when { 0 if x = 0 and y = 0. L = 0 otherwise. A series-parallel connection 5 of 29

Inversion Can we use a switch to implement an inverted switch? We would like to implement the following function: L(x) = x to say L(x) = NOT x or complement of x when { 0 if x = 1. L = 1 if x = 0 6 of 29

Inversion Can we use a switch to implement an inverted switch? We would like to implement the following function: L(x) = x to say L(x) = NOT x or complement of x when { 0 if x = 1. L = 1 if x = 0 The inverting circuit 6 of 29

Inversion Can we use a switch to implement an inverted switch? We would like to implement the following function: L(x) = x to say L(x) = NOT x or complement of x when { 0 if x = 1. L = 1 if x = 0 The inverting circuit We can complement not only variables but also expressions, s.t. f (x, y) = x + y. 6 of 29

Specification of a logical function: Truth tables The specification of a logical function can be enumerate as a truth-table Since input variables are finite, there are only finitely many possible combinations for a finite set of inputs. Example of truth table for x y, x + y and x. Truth-table for n-input AND, OR, or NOT operations 7 of 29

Logic Gates A switch can be implemented using a transistor. Also other Boolean operations can be implemented using various combinations of switches. AND gate, OR gate, NOT gate represent encapsulation of transistor circuits implementing Boolean function x y x y x y x + y x x 8 of 29

Logic Gates A switch can be implemented using a transistor. Also other Boolean operations can be implemented using various combinations of switches. AND gate, OR gate, NOT gate represent encapsulation of transistor circuits implementing Boolean function x y x y x y x + y x x x y z x y z x y y x + y 8 of 29

Analysis and Synthesis of a Logic Network Tasks of a designer of a digital system: analysis and synthesis 9 of 29

Analysis and Synthesis of a Logic Network Tasks of a designer of a digital system: analysis and synthesis Let s analyze the logic network f (x 1, x 2, x 3 ) = x 1 + x 2 x 3. Construct its Truth-Table 9 of 29

Analysis and Synthesis of a Logic Network Tasks of a designer of a digital system: analysis and synthesis Let s analyze the logic network f (x 1, x 2, x 3 ) = x 1 + x 2 x 3. Construct its Truth-Table Timing diagram of a circuit Functionally equivalent circuits: consider the network that implement Boolean function g(x 1, x 2 ) = x 1 + x 2. and compare with the function f (x 1, x 2 ). 9 of 29

Analysis and Synthesis of a Logic Network Tasks of a designer of a digital system: analysis and synthesis Let s analyze the logic network f (x 1, x 2, x 3 ) = x 1 + x 2 x 3. Construct its Truth-Table Timing diagram of a circuit Functionally equivalent circuits: consider the network that implement Boolean function g(x 1, x 2 ) = x 1 + x 2. and compare with the function f (x 1, x 2 ). How do we know if two functions are logically equivalent? 9 of 29

Analysis and Synthesis of a Logic Network Tasks of a designer of a digital system: analysis and synthesis Let s analyze the logic network f (x 1, x 2, x 3 ) = x 1 + x 2 x 3. Construct its Truth-Table Timing diagram of a circuit Functionally equivalent circuits: consider the network that implement Boolean function g(x 1, x 2 ) = x 1 + x 2. and compare with the function f (x 1, x 2 ). How do we know if two functions are logically equivalent? How many different logically equivalent functions over n-variables? 9 of 29

Analysis and Synthesis of a Logic Network Tasks of a designer of a digital system: analysis and synthesis Let s analyze the logic network f (x 1, x 2, x 3 ) = x 1 + x 2 x 3. Construct its Truth-Table Timing diagram of a circuit Functionally equivalent circuits: consider the network that implement Boolean function g(x 1, x 2 ) = x 1 + x 2. and compare with the function f (x 1, x 2 ). How do we know if two functions are logically equivalent? How many different logically equivalent functions over n-variables? How to minimize circuit complexity (and cost)? 9 of 29

Objectives Logic functions and circuits Boolean Algebra Synthesis of Simple Circuits Introduction to CAD tools 10 of 29

Boolean Algebra In 1849 George Boole introduced algebra for manipulating processes involving logical thoughts and reasoning This scheme, with some refinements, is not know as Boolean algebra. Claude Shannon in 1930 showed that Boolean algebra is awesome for describing circuits with switches! It is, then, of course awesome to describe logical circuits. Let s see how it is a powerful tool to design and analyze logical circuits. 11 of 29

Boolean Algebra: Axioms 1. 0 0 = 0 (1) 1 + 1 = 1 (2) 2. 1 1 = 1 (3) 0 + 0 = 0 (4) 3. 0 1 = 1 0 = 0 (5) 0 + 1 = 1 + 0 = 1 (6) 4. If x = 0 then x = 1 (7) If x = 1 then x = 0 (8) 12 of 29

Boolean Algebra: Single variable Theorems 1. x 0 = 0 (9) x + 1 = 1 (10) 2. x 1 = x (11) x + 0 = x (12) 3. x x = x (13) x + x = x (14) 4. x x = 0 (15) x + x = 1 (16) 5. x = x (17) 13 of 29

Boolean Algebra: 2- and 3- Variable Properties 1. Commutativity: x y = y x (18) x + y = y + x (19) 2. Associativity: x (y z) = (x y) z (20) x + (y + z) = (x + y) + z (21) 3. Distributivity: x (y z) = (x y) z (22) x + (y + z) = (x + y) + z (23) 4. Absorption: x + x y = x (24) x (x + y) = x (25) 14 of 29

Boolean Algebra: 2- and 3- Variable Properties 1. Combining: x y + x y = x (26) (x + y) (x + y) = x (27) 2. Consensus: x y + y z + x z = x y + x z (28) (x + y) (y + z) (x + z) = (x + y) (x + z) (29) 15 of 29

Boolean Algebra: DeMorgan s theorem Augustus De Morgan (27 June 1806 18 March 1871) 16 of 29

Boolean Algebra: DeMorgan s theorem Augustus De Morgan (27 June 1806 18 March 1871) Proof by Perfect Induction (Truth-tables) x y = x + y (30) x + y = x y (31) 16 of 29

Other Remarks Venn diagram are quite useful proving theorems in Boolean algebra 17 of 29

Other Remarks Venn diagram are quite useful proving theorems in Boolean algebra Common symbols to represent OR: x y and x + y Common symbols to represent AND: x y and x y Common symbols to represent NOT: x and x 17 of 29

Other Remarks Venn diagram are quite useful proving theorems in Boolean algebra Common symbols to represent OR: x y and x + y Common symbols to represent AND: x y and x y Common symbols to represent NOT: x and x Precedence of Operations: NOT > AND > OR Example x 1 x 2 + x 1 x 2 (x 1 x 2) + ((x 1 ) (x 2)) x 1 (x 2 + x 1 ) x 2 17 of 29

Objectives Logic functions and circuits Boolean Algebra Synthesis of Simple Circuits Introduction to CAD tools 18 of 29

Synthesis of simple circuits Definition (Synthesis) Given a description of the desired functional behavior, the synthesis is the process to generate a circuit that realizes this behavior. Commonly Used logic Gates: x y x y x y x + y x x x y x y x y x + y x y x y 19 of 29

Synthesis of simple circuits Theorem Any Boolean function can be synthesized using only AND, OR, and NOT gates. x y x y x y x + y x x 20 of 29

Synthesis of simple circuits Theorem Any Boolean function can be synthesized using only AND, OR, and NOT gates. x y x y x y x + y x x Theorem Any Boolean function can be synthesized using only NAND gates. x y x y 20 of 29

Synthesis of simple circuits Theorem Any Boolean function can be synthesized using only AND, OR, and NOT gates. x y x y x y x + y x x Theorem Any Boolean function can be synthesized using only NAND gates. x y x y Theorem Any Boolean function can be synthesized using only NOR gates. x y x + y 20 of 29

Synthesis using AND, OR, and NOT gates Given a Boolean function f given in the form of a truth table, the expression that realizes f can be obtained: (SUM-OF-PRODUCTS) by considering rows for which f = 1, or (PRODUCTS-OF-SUMS) by considering rows for which f = 0. 21 of 29

Synthesis using AND, OR, and NOT gates Given a Boolean function f given in the form of a truth table, the expression that realizes f can be obtained: (SUM-OF-PRODUCTS) by considering rows for which f = 1, or (PRODUCTS-OF-SUMS) by considering rows for which f = 0. Example: x 1 x 2 f (x 1, x 2 ) 0 0 0 0 1 1 1 0 0 1 1 1 f (x 1, x 2 ) = x 1 x 2 + x 1 x 2 = m 1 + m 3 f (x 1, x 2 ) = (x 1 x 2 + x 1 x 2 ) = (x 1 x 2 ) (x 1 x 2 ) = (x 1 + x 2 ) (x 1 + x 2 ) = M 0 M 2 21 of 29

Sum-of-Product Canonical Form For a function of n variables a minterm is a product term in which each of the variable occur exactly once. For example: x 0 x 1 x 2 and x 0 x 1 x 2. A function f can be represented by an expression that is sum of minterms. A logical expression that consists of product terms that are summed (ORed) together is called a sum-of-product form. If each of the product term is a minterm, then the expression is called canonical sum-of-product expression. Notice that two logically equivalent functions will have the same canonical representation. For a truth-table of n variables, we represent the minterm corresponding to the i-th row as m i where i {0, 2 n 1}. A unique representation of a function can be given as an explicit sum of minterms for rows for which function is true. For example f (x 1, x 2 ) = x 1 x 2 + x 1 x 2 = m 1 + m 3 = (m 1, m 3 ) = m(1, 3). 22 of 29

Sum-of-Product Canonical Form For a function of n variables a maxterm is a sum term in which each of the variable occur exactly once. For example (x 0 + x 1 + x 2 ) and (x 0 + x 1 + x 2 ). A function f can be represented by an expression that is product of maxterms. A logical expression that consists of sum terms that are factors of logical product (AND) is called a product-of-sum form. If each of the sum term is a maxterm, then the expression is called canonical product-of-sum expression. Notice that two logically equivalent functions will have the same canonical product-of-sum representation. For a truth-table of n variables, we represent the maxterm corresponding to complement of the minterm of the i-th row as M i where i {0, 2 n 1}. A unique representation of a function can be given as an explicit product of maxterms for rows for which function is false. For example f (x 1, x 2 ) = (x 1 x 2 + x 1 x 2 ) = (M 0, M 2 ) = M(0, 2). 23 of 29

Questions Give SOP form of the function f (x 1, x 2, x 3 ) = m(2, 3, 4, 6, 7) and simplify it. Give POS for of the function f (x 1, x 2, x 3 ) = M(0, 1, 5) and simplify it. 24 of 29

NAND and NOR logic networks De Morgan s theorem in terms of logic gates Using NAND gates to implement a sum-of-products Using NOR gates to implement a product-of-sums 25 of 29

Examples Design the logic circuits for the following problems: Three-way light control Multiplexer circuit 26 of 29

Objectives Logic functions and circuits Boolean Algebra Synthesis of Simple Circuits Introduction to CAD tools 27 of 29

Steps in Design process 1. Design Entry Schematic capture Hardware description language 2. Synthesis (or translating/ compiling) 3. Functional Simulation 4. Physical Design 5. Timing Simulation 6. Chip configuration (programming) 28 of 29

Introduction to VHDL 29 of 29