Digital Logic Design (3)

Similar documents
Points Addressed in this Lecture. Standard form of Boolean Expressions. Lecture 4: Logic Simplication & Karnaugh Map

Lecture 7 Logic Simplification

Lecture 6: Signed Numbers & Arithmetic Circuits. BCD (Binary Coded Decimal) Points Addressed in this Lecture

Bawar Abid Abdalla. Assistant Lecturer Software Engineering Department Koya University

A graphical method of simplifying logic

ENGIN 112 Intro to Electrical and Computer Engineering

Summary. Boolean Addition

Chapter 2. Boolean Expressions:

2/8/2017. SOP Form Gives Good Performance. ECE 120: Introduction to Computing. K-Maps Can Identify Single-Gate Functions

Boolean Analysis of Logic Circuits

Digital Circuits ECS 371

Digital Fundamentals

Chapter 3. Boolean Algebra and Digital Logic

IT 201 Digital System Design Module II Notes

MODULE 5 - COMBINATIONAL LOGIC

ELCT201: DIGITAL LOGIC DESIGN

Experiment 4 Boolean Functions Implementation

ELCT201: DIGITAL LOGIC DESIGN

EEE130 Digital Electronics I Lecture #4_1

DKT 122/3 DIGITAL SYSTEM 1

Philadelphia University Student Name: Student Number:

LSN 4 Boolean Algebra & Logic Simplification. ECT 224 Digital Computer Fundamentals. Department of Engineering Technology

Binary Adders: Half Adders and Full Adders

Learning Objectives: Topic Karnaugh Maps. At the end of this topic you will be able to;

Module -7. Karnaugh Maps

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

1. Mark the correct statement(s)

Logic Design (Part 2) Combinational Logic Circuits (Chapter 3)

Gate-Level Minimization. BME208 Logic Circuits Yalçın İŞLER

Combinational Logic Circuits

Unit-IV Boolean Algebra

University of Technology

2.6 BOOLEAN FUNCTIONS

CHAPTER-2 STRUCTURE OF BOOLEAN FUNCTION USING GATES, K-Map and Quine-McCluskey

Chapter 2 Combinational Logic Circuits

Section 001. Read this before starting! You may use one sheet of scrap paper that you will turn in with your test.


Review: Standard forms of expressions

Assignment (3-6) Boolean Algebra and Logic Simplification - General Questions

Combinational Logic Circuits Part III -Theoretical Foundations

Ch. 5 : Boolean Algebra &

A B AB CD Objectives:

(Refer Slide Time 3:31)

Simplification of Boolean Functions

(Refer Slide Time 6:48)

4 KARNAUGH MAP MINIMIZATION

R10. II B. Tech I Semester, Supplementary Examinations, May

There are only 16 possible 2-input gates Let s examine all of them. Some we already know, others are just silly.

S1 Teknik Telekomunikasi Fakultas Teknik Elektro FEH2H3 2016/2017

Bawar Abid Abdalla. Assistant Lecturer Software Engineering Department Koya University

CprE 281: Digital Logic

Experiment 3: Logic Simplification

Digital Logic Design (CEN-120) (3+1)

CS8803: Advanced Digital Design for Embedded Hardware

Combinational Circuits Digital Logic (Materials taken primarily from:

QUESTION BANK FOR TEST

Simplification of Boolean Functions

60-265: Winter ANSWERS Exercise 4 Combinational Circuit Design

CARLETON UNIVERSITY. Laboratory 2.0

X Y Z F=X+Y+Z

DIGITAL CIRCUIT LOGIC UNIT 7: MULTI-LEVEL GATE CIRCUITS NAND AND NOR GATES

Digital Fundamentals. Lab 6 2 s Complement / Digital Calculator

Digital Logic Lecture 7 Gate Level Minimization

Gate Level Minimization Map Method

Chapter 6. Logic Design Optimization Chapter 6

At this point in our study of digital circuits, we have two methods for representing combinational logic: schematics and truth tables.

Objectives: 1. Design procedure. 2. Fundamental circuits. 1. Design procedure

Arithmetic-logic units

Gate-Level Minimization. section instructor: Ufuk Çelikcan

Parallel logic circuits

Lecture 5. Chapter 2: Sections 4-7

Gate Level Minimization

Digital logic fundamentals. Question Bank. Unit I

Digital Techniques. Lecture 1. 1 st Class

Optimized Implementation of Logic Functions

ENGIN 112. Intro to Electrical and Computer Engineering

Revision: August 31, E Main Suite D Pullman, WA (509) Voice and Fax

LECTURE 4. Logic Design

UNIT-4 BOOLEAN LOGIC. NOT Operator Operates on single variable. It gives the complement value of variable.

9/10/2016. ECE 120: Introduction to Computing. The Domain of a Boolean Function is a Hypercube. List All Implicants for One Variable A

Chapter 2: Combinational Systems

Menu. Algebraic Simplification - Boolean Algebra EEL3701 EEL3701. MSOP, MPOS, Simplification

Dr. S. Shirani COE2DI4 Midterm Test #1 Oct. 14, 2010

BOOLEAN ALGEBRA. Logic circuit: 1. From logic circuit to Boolean expression. Derive the Boolean expression for the following circuits.

Dr. Chuck Cartledge. 10 June 2015

Chapter 3. Gate-Level Minimization. Outlines

Section 001. Read this before starting!

Combinational Logic Worksheet

Simplification of two-level combinational logic

PART 1. Simplification Using Boolean Algebra

Switching Circuits & Logic Design

Fundamentals of Computer Systems

Lecture 7. Summary of two-level combinational-logic. Ways of specifying circuits. Solving combinational design problems. Verilog versus VHDL

Boolean logic. Boolean Algebra. Introduction to Computer Yung-Yu Chuang NOT AND NOT

Specifying logic functions

Lecture #21 March 31, 2004 Introduction to Gates and Circuits

LOGIC CIRCUITS. Kirti P_Didital Design 1

DIGITAL ARITHMETIC: OPERATIONS AND CIRCUITS

Real Digital Problem Set #6

Chapter 2 Combinational

Transcription:

Digital Logic Design (3) ENGG1015 1 st Semester, 2010 Dr. Kenneth Wong Dr. Hayden So Department of Electrical and Electronic Engineering Last lecture ll logic functions can be represented as (1) truth table (2) schematics (3) oolean expressions, interchangeably Laws of oolean algebra helps to simplify the oolean expression DeMorgan s theorems NND/NOR gates are universal gates Non-standard representation is equivalent to DeMorgan s theorems Canonical SOP/POS Today Conversion through 3 representations Simplification of oolean expressions oolean algebra Karnaugh map Representing Logic Operations Each function can be represented equivalently in 3 ways: Truth table oolean logic expression Schematics Truth Table rithmetic rcuit Half adder Full adder Subtractor Schematics oolean Expression Example: This example illustrate the complete procedure for designing a logic circuit. Suppose the logic circuit having 3 inputs,,, C will have its output HIGH only when a majority of the inputs are HIGH. Step 1 Set up the truth table Step 2 Write the ND term for each case where the output is a 1. Step 3 Write the SOP form the output x = C + C + C + C Step 4 Simplify the output expression x = C + C + C + C + C + C = C( + ) + C( + ) + ( C + C) = C + C + Step 5 Implement the circuit C x 0 0 1 0 0 1 0 0 0 1 1 1 1 0 0 0 1 0 1 1 1 1 1 1 Example: Conversion through the opposite direction: Step 1 Start from the circuit Step 2 Obtain oolean expression from the circuit (in SOP form) y = C + C + C Step 3 Write the truth table y Schematics C C Truth Table C y 0 0 1 0 0 1 0 1 0 1 1 1 1 0 0 0 1 0 1 1 1 1 1 1 oolean Expression

Forms of oolean Expressions There are two general forms of logic expression: SOP, POS Sum-of-products form (SOP) first the product (ND) terms are formed then these are summed (OR) eg: C + DEF + GHI Product-of-sum form (POS) first the sum (OR) terms are formed then the products are taken (ND) eg: (++C)(D+E+F)(G+H+I) It is possible to convert between these two forms using oolean algebra Simplifying Logic rcuits Once the expression for a logic circuit is obtained, we may try to simplify it, so that the implementation requires fewer gates Example: below two circuits are the same, but the second one is much more simpler Two methods for simplifying lgebraic method (use oolean algebra theorems) Karnaugh mapping method (systematic, step-by-step approach) Minimization by oolean lgebra Make use of relationships and theorems of oolean algebra to simplify the expressions this method relies on your algebraic skill Mainly consists of two steps: The original expression is put into SOP form by repeated application of DeMorgan s theorems and multiplication of terms Once the original expression is in SOP form, the product terms are checked for common factors, and factoring is performed wherever possible Example: Simplify z = C + ( C) z = C + ( + C) [by DeMorgan thm] = C + ( + C) [cancel double inverions] = C + + C = C + + C [ = ] = C( + ) + = C + [ + = 1] Example: Simplify z = C + C + C The expression is already in SOP form z = ( C + C) + C = (1) + C = + C = ( + C) = ( + C) [by rule 11 in previous chapter] Example: Simplify x = ( + )( + + D) D x = D + D + DD + D + D + DD = D + D + D [ = 0 and DD = 0] = D( + + 1) [factoring] = D [ + = 1 and 1+1=1] = ( C + ) Example: Simplify z = C( D) + CD + C First expand it into SOP form z = C( + + D) + CD + C [DeMorgan thm] = C + C + CD + CD + C = C + CD + CD + C [ = 0] Then look for the largest common factor between any two or more product terms: first and last terms have C, while the second and third terms share D Grouping the terms gives z = C( + ) + D( C + C) = C + D( C + ) [by + = 1, C + C = C + ] We might think that the above expression is the simplest since it cannot be simplified further However, in fact, the simplest form of this equation is z = D + C It turns out that we missed an operation earlier that could have led to the simpler form Question: How could we have known that we missed a step?? ns: There is no way we can know. This illustrate the frustration often encountered in oolean simplification Minimization by Karnaugh Maps What is a Karnaugh map? Karnaugh map (K map) is a graphical tool used to simplify a logic equation or to convert a truth table to its corresponding logic circuit With a simple and orderly process, the resulting logic expression will be in its simplest SOP form!!! K map format: 3 Variable K map: 0 1 grid of squares Each square represents one product term eg: top-left represents C, bottom-right represents C The variables are ordered according to Gray code only one variable changes between adjacent squares Squares on edges are considered adjacent to squares on opposite edges

4 Variable K map \CD 00 01 11 10 00 01??? 11 10 The square marked? represents C D The square marked?? represents C D Note that they differ in only the C variable. Karnaugh maps become clumsier to use with more than 4 variables General procedure for using K map: 1. Fill out the K map for a given oolean expression 2. Simplify the expression by properly combining those squares in the K map that contains 1s. This process is called looping Filling out a Karnaugh Map Given an initial (unsimplified) logic oolean expression Write the expression in SOP form For each product term, write a 1 in all the squares which are included in the term, 0 elsewhere ll variables present in the product term: one square One variable missing: two adjacent squares Two terms missing: 4 adjacent squares Example 1: X = C + C + C + C Example 2: X = C + C + C Example 3: X = + C + 0 0 0 1 0 1 0 1 1 1 0 1 0 0 0 0 Looping Minimization is done by spotting patterns of 1's and 0's Pairs of adjacent 1's (Looping groups of two) remember that adjacent squares differ by only one variable hence the combination of 2 adjacent squares has the form this can be simplified (from before) to just P Example 1 (continue) X = C + C + C + C 0 0 0 1 0 1 0 1 1 1 P + ( ) -- the adjacent squares C and C differ only in -- hence they can be combined into just C, indicated by the blue loop -- looping can also be done by grouping C and C to give C, as indicated by the red loop -- furthermore, looping can also be done by grouping C and C to give, as indicated by the yellow loop -- The simplified oolean equation is one that sums all the terms corresponding to each of the group: X = C + C + More examples on looping of two Looping group of four (quads) K map may contain a group of four 1s that are adjacent to each other. This group is called quad Looping a quad of adjacent 1s eliminates the two variables that appear in both complemented and uncomplemented form Looping group of eight (Octets) group of eight 1s that are adjacent to one another is called an octet Looping an octet of adjacent 1s eliminates the three variables that appear in both complemented and uncomplemented form

Complete Simplification Process 1. Construct the K map and place 1s and 0s in the squares according to the truth table. 2. Group the isolated 1s which are not adjacent to any other 1s. (single loops) 3. Group any pair which contains a 1 adjacent to only one other 1. (double loops) 4. Group any octet even if it contains one or more 1s that have already been grouped. 5. Group any quad that contains one or more 1s that have not already been grouped, making sure to use the minimum number of groups. 6. Group any pairs necessary to include any 1s that have not yet been grouped, making sure to use the minimum number of groups. 7. Form the OR sum of all the terms generated by each group. \CD 00 01 11 10 00 0 1 0 0 01 0 1 0 0 1 10 0 1 0 0 Step2. Isolated 1: None Step3. djacent to only one 1: None Step4. Octet: None Step5. Quad: lue and red loops Step6. ll 1s have been looped => skip this step \CD 00 01 11 10 0 0 01 1 0 0 1 1 1 1 0 Step2. Isolated 1: None Step3. djacent to only one 1: red loop Step4. Octet: None Step5. Quad: Green loops Step6. ll 1s have been looped => skip this step + CD D + C More examples S2. Isolated 1: loop 4 S3. djacent to only one 1: loop 11,15 S4. Octet: None S5. Quad: loop 6,7,10,11 S6. ll 1s have been looped => skip S2. Isolated 1: None S3. djacent to only one 1: loop 3,7 S4. Octet: None S5. Quad: loop 5,6,9,10 and loop 5,6,7,8 S6. ll 1s have been looped => skip S2. Isolated 1: None S3. djacent to only one 1: loop 2,6, loop 7,8, loop 11,15 and loop 9,10 S4-S6. ll 1s have been looped => skip rithmetic circuit Recall the binary addition process 1 0 0 1 + 0 0 1 1 S 1 1 0 0 LS Column has 2 inputs 2 outputs Inputs: Outputs: 0 S 0 0 C 1 Other Columns have 3 inputs, 2 outputs Inputs: n n C n Outputs: S n C n+1 We use a "half adder" to implement the LS column We use a "full adder" to implement the other columns Each column feeds the next-most-significant column. Half dder Truth Table oolean Equations Implementation S C 0 1 1 0 1 0 1 0 S = + = C = Note also XOR implementation possible for S 1 S C Full dder Truth Table oolean Equations S =. +. +. +. = Co = + + + = + + = + ( + ) S Co 0 0 0 1 1 0 0 1 0 1 0 0 1 0 0 1 0 1 0 1 0 1 1 1 0 0 1 Complete circuitry for a F

Parallel dder The full adder obtained in the previous slide can only add two single bit (plus a carry bit) In order to add two multi-bit numbers, we use 1 full adder per bit of the numbers The carry is propagated from one stage to the next most significant stage takes some time to work because of the carry propagation delay which is n times the propagation delay of one stage 4-bit Parallel inary dders (74LS283) 2-bit Parallel inary dders Parallel Subtraction using Parallel dder Subtraction can be achieve by adding the complement E.g.: 6-3 = 6 + (-3) = 3 2's complement :- invert all bits and then add 1 Invert all the inputs bits of Use Carry-in of first stage for the "add 1" In conclusion Conversion through 3 representations Simplification of oolean expressions oolean algebra Karnaugh map rithmetic rcuit Half adder Full adder Subtractor