CHAPTER 3 Digital Logic Structures

Slides:



Advertisements
Similar presentations
Logic Gates.
Advertisements

컴퓨터구조론 교수 채수환. 교재 Computer Systems Organization & Architecture John D. Carpinelli, 2001, Addison Wesley.
Chapter 2 Logic Circuits.
Sequential Circuits1 DIGITAL LOGIC DESIGN by Dr. Fenghui Yao Tennessee State University Department of Computer Science Nashville, TN.
Multiplexors Sequential Circuits and Finite State Machines Prof. Sin-Min Lee Department of Computer Science.
Module 12.  In Module 9, 10, 11, you have been introduced to examples of combinational logic circuits whereby the outputs are entirely dependent on the.
Asynchronous Sequential Logic
The Map Method Boolean expressions may be simplified by algebraic means as discussed in Previous lecture However, this procedure of minimization is awkward.
Logic Gate Level Part 2. Constructing Boolean expression from truth table First method: write nonparenthesized OR of ANDs Each AND is a 1 in the result.
Gate-Level Minimization. Digital Circuits The Map Method The complexity of the digital logic gates the complexity of the algebraic expression.
Computer Engineering (Logic Circuits) (Karnaugh Map)
بهينه سازي با نقشة کارنو Karnaugh Map. 2  Method of graphically representing the truth table that helps visualize adjacencies 2-variable K-map 3-variable.
Chapter 2: Combinatorial Logic Circuits Illustration Pg. 32 Logic Circuit Diagrams - Circuit Optimization -2,3,4 level maps 48 elements Optimized to 25.
EECC341 - Shaaban #1 Lec # 7 Winter Combinational Circuit Minimization Canonical sum and product logic expressions do not provide a circuit.
Simplifying Boolean Expressions Using K-Map Method
Digital Logic Design CHAPTER 5 Sequential Logic. 2 Sequential Circuits Combinational circuits – The outputs are entirely dependent on the current inputs.
Chapter 2: Boolean Algebra and Logic Functions
Digital Computer Design Fundamental
Logical Circuit Design Week 5: Combinational Logic Circuits Mentor Hamiti, MSc Office ,
Boolean Algebra and Digital Logic
1 Fundamentals of Computer Science Propositional Logic (Boolean Algebra)
Chap 4. Sequential Circuits
Dept. of Computer Science Engineering Islamic Azad University of Mashhad 1 DIGITAL LOGIC CIRCUITS Dept. of Computer Science Engineering Islamic Azad University.
Boolean Algebra and Digital Circuits
B-1 Appendix B - Reduction of Digital Logic Principles of Computer Architecture by M. Murdocca and V. Heuring © 1999 M. Murdocca and V. Heuring Principles.
F = ∑m(1,4,5,6,7) F = A’B’C+ (AB’C’+AB’C) + (ABC’+ABC) Use X’ + X = 1.
Company LOGO DKT 122/3 DIGITAL SYSTEM 1 WEEK #7 COMBINATIONAL LOGIC ANALYSIS.
LOGIC GATES & TRUTH TABLE – Digital Circuit 1 Choopan Rattanapoka.
Chap 4. Sequential Circuits
D IGITAL L OGIC D ESIGN I G ATE -L EVEL M INIMIZATION.
Chapter 2Basic Digital Logic1 Chapter 2. Basic Digital Logic2 Outlines  Basic Digital Logic Gates  Two types of digital logic circuits Combinational.
Module 9.  Digital logic circuits can be categorized based on the nature of their inputs either: Combinational logic circuit It consists of logic gates.
Charles Kime & Thomas Kaminski © 2008 Pearson Education, Inc. Circuit Optimization Logic and Computer Design Fundamentals.
Sequential Circuits. Two primary differences between combinational circuits and sequential circuits –Sequential circuits are synchronous (use a clock)
Company LOGO DKT 122/3 DIGITAL SYSTEM 1 WEEK #12 LATCHES & FLIP-FLOPS.
Chapter 3: Digital Logic Dr Mohamed Menacer Taibah University
Sneha.  Gates Gates  Characteristics of gates Characteristics of gates  Basic Gates Basic Gates  AND Gate AND Gate  OR gate OR gate  NOT gate NOT.
LOGIC GATES AND CIRCUITS Digital systems are said to be constructed by using logic gates. These gates are the AND, OR, NOT, NAND, NOR, EXOR and EXNOR gates.
Circuit Minimization. It is often uneconomical to realize a logic directly from the first logic expression that pops into your head. Canonical sum and.
Gate-Level Minimization
Chapter 2 Two- Level Combinational Logic. Chapter Overview Logic Functions and Switches Not, AND, OR, NAND, NOR, XOR, XNOR Gate Logic Laws and Theorems.
LOGIC GATES & BOOLEAN ALGEBRA
CS 1110 Digital Logic Design
Logic Gates. The Inverter The inverter (NOT circuit) performs the operation called inversion or complementation. Standard logic symbols: 1 1 input output.
Hamming Code,Decoders and D,T-flip flops Prof. Sin-Min Lee Department of Computer Science.
Boolean Algebra & Logic Circuits Dr. Ahmed El-Bialy Dr. Sahar Fawzy.
1 Synchronous Sequential Logic Sequential Circuits Every digital system is likely to have combinational circuits, most systems encountered in practice.
Chapter-3: BOOLEAN ALGEBRA & LOGIC GATES Analysis and logical design.
Logic Gates. A logic gate is an elementary building block of a digital circuit. Most logic gates have two inputs and one output. At any given moment,
Karnaugh Map and Circuit Design.
Synchronous Sequential Logic A digital system has combinational logic as well as sequential logic. The latter includes storage elements. feedback path.
5 Chapter Synchronous Sequential Circuits 1. Logic Circuits- Review 2 Logic Circuits Sequential Circuits Combinational Circuits Consists of logic gates.
Karnaugh Map (K-Map) By Dr. M. Khamis Mrs. Dua’a Al Sinari.
1 Gate Level Minimization EE 208 – Logic Design Chapter 3 Sohaib Majzoub.
Digital Logic Design Basics Combinational Circuits Sequential Circuits Pu-Jen Cheng Adapted from the slides prepared by S. Dandamudi for the book, Fundamentals.
ECE DIGITAL LOGIC LECTURE 8: BOOLEAN FUNCTIONS Assistant Prof. Fareena Saqib Florida Institute of Technology Spring 2016, 02/11/2016.
Chapter 3 Simplification of Switching Functions. Simplification Goals Goal -- minimize the cost of realizing a switching function Cost measures and other.
4–1. BSCS 5 th Semester Introduction Logic diagram: a graphical representation of a circuit –Each type of gate is represented by a specific graphical.
Mu.com.lec 9. Overview Gates, latches, memories and other logic components are used to design computer systems and their subsystems Good understanding.
Mealy and Moore Machines Lecture 8 Overview Moore Machines Mealy Machines Sequential Circuits.
Assembly Lab1 - Review.
CHAPTER 3 Simplification of Boolean Functions
Chapter 2: Boolean Algebra and Logic Functions
Reading: Hambley Chapters
Boolean Algebra.
Lecture 4 Sums of Product Circuits Simplification
13 Digital Logic Circuits.
Chapter 10.3 and 10.4: Combinatorial Circuits
Circuit Simplification and
Computer Architecture
Presentation transcript:

CHAPTER 3 Digital Logic Structures Topics to be covered Logic gates Logic (Boolean) operations DeMorgan's Law Combinational logic circuits Truth tables and Boolean expressions Minimization of Boolean expressions Karnaugh maps Don’t care terms Sequential devices – Storage elements S. Barua – CPSC 240 sbarua@fullerton.edu http://sbarua.ecs.fullerton.edu

Logic Gates and Logic Operations Name Symbol Operation Input variable Output x y f(x,y) AND x 0 0 0 y f(x,y) = xy 0 1 0 1 0 0 1 1 1 The AND gate gives a logic 1 (high) output only when all the inputs are logic 1s. S. Barua – CPSC 240 sbarua@fullerton.edu http://sbarua.ecs.fullerton.edu

Logic Gates and Logic Operations Name Symbol Operation Input variable Output x y f(x,y) NAND x 0 0 1 f(x,y) = (xy)/ 0 1 1 y 1 0 1 1 1 0 The NAND gate is the complement of the AND gate. S. Barua – CPSC 240 sbarua@fullerton.edu http://sbarua.ecs.fullerton.edu

Logic Gates and Logic Operations Name Symbol Operation Input variable Output x y f(x,y) OR x 0 0 0 y f(x,y) = x+y 0 1 1 1 0 1 1 1 1 The OR gate gives a logic 0 (low) output only when all the inputs are logic 0. S. Barua – CPSC 240 sbarua@fullerton.edu http://sbarua.ecs.fullerton.edu

Logic Gates and Logic Operations Name Symbol Operation Input variable Output x y f(x,y) NOR x 0 0 1 y f(x,y) = (x+y)/ 0 1 0 1 0 0 1 1 0 The NOR gate is the complement of the OR gate. S. Barua – CPSC 240 sbarua@fullerton.edu http://sbarua.ecs.fullerton.edu

Logic Gates and Logic Operations Name Symbol Operation Input variable Output x f(x) Inverter x f(x) = x / 0 1 (NOT) 1 0 The inverter takes a single input and complements the input. S. Barua – CPSC 240 sbarua@fullerton.edu http://sbarua.ecs.fullerton.edu

Logic Gates and Logic Operations Name Symbol Operation Input variable Output x y f(x,y) XOR x 0 0 0 y f(x,y) = xy/ + x/y 0 1 1 1 0 1 1 1 0 The EXCLUSIVE-OR (XOR) gate gives a logic output of 1 when the input variables are different from each other. S. Barua – CPSC 240 sbarua@fullerton.edu http://sbarua.ecs.fullerton.edu

Logic Gates and Logic Operations Name Symbol Operation Input variable Output x y f(x,y) XNOR x 0 0 1 y 0 1 0 f(x,y) = xy + x/y/ 1 0 0 1 1 1 The EXCLUSIVE-NOR gate is the complement of the XOR gate. S. Barua – CPSC 240 sbarua@fullerton.edu http://sbarua.ecs.fullerton.edu

Truth Table Truth Table A tabular representation of the operations of logic gates or logic circuits Gives the relationship between the input and the output variables of a logic gate or a logic circuit S. Barua – CPSC 240 sbarua@fullerton.edu http://sbarua.ecs.fullerton.edu

DeMorgan's Law (A + B)/ = A/B/ (AB)/ = A/ + B/ S. Barua – CPSC 240 sbarua@fullerton.edu http://sbarua.ecs.fullerton.edu

Implementing a Boolean Expression Using Logic Gates Example: Implement the following Boolean function using appropriate logic gates f(A, B, C) = A/B + ABC/ + AB/C + A/C S. Barua – CPSC 240 sbarua@fullerton.edu http://sbarua.ecs.fullerton.edu

Definitions Product term: A series of Boolean variables that are related by the AND operator Example: xy, xyz Minterm: A product term that contains as many variables as there are in the function S. Barua – CPSC 240 sbarua@fullerton.edu http://sbarua.ecs.fullerton.edu

Characteristics of a Minterm (Product Term) In a minterm or a product term A regular variable has a value of logic 1 A complemented variable has a value of logic 0 Each minterm or a product term gives a value of 1 to the Boolean function. S. Barua – CPSC 240 sbarua@fullerton.edu http://sbarua.ecs.fullerton.edu

Example Consider a function with 3 input variables. All the possible input combinations and the corresponding minterms are as follows: Input combinations Minterms x y z   0 0 0 x/y/z/ 0 0 1 x/y/z 0 1 0 x/yz/ 0 1 1 x/yz 1 0 0 xy/z/ 1 0 1 xy/z 1 1 0 xyz/ 1 1 1 xyz S. Barua – CPSC 240 sbarua@fullerton.edu http://sbarua.ecs.fullerton.edu

Truth Table of a Boolean Function Truth table for a function with “n” input variables will contain: All the possible 2n combinations of the n input variables The corresponding values of the function for each input combination S. Barua – CPSC 240 sbarua@fullerton.edu http://sbarua.ecs.fullerton.edu

Truth Tables Example: For the logic function f(x,y,z) = x/y/z/ + xy/z + xyz (a) Derive the truth table x y z f(x,y,z) 0 0 0 0 0 1 0 1 0 0 1 1 1 0 0 1 0 1 1 1 0 1 1 1 S. Barua – CPSC 240 sbarua@fullerton.edu http://sbarua.ecs.fullerton.edu

Minimization of Boolean Functions Karnaugh Maps (K- Maps) Graphical representation of a logic function For an n-variable function, the K- Map consists of 2n cells The binary combination of each adjacent pair of cells in the K-Map differ from each other in only one bit position S. Barua – CPSC 240 sbarua@fullerton.edu http://sbarua.ecs.fullerton.edu

Karnaugh Maps (K- Maps) K-Map for a 2-variable K-Map for a 3-variable function function K-Map for a 4-variable function S. Barua – CPSC 240 sbarua@fullerton.edu http://sbarua.ecs.fullerton.edu

Minimizing Boolean Functions Minimization steps using K-Maps: Enter all the product terms (sum terms) of the given function on the K-Map Combine the adjacent cells on the map such that the cells are grouped in powers of 2 Try to maximize the number of cells combined because larger the number of cells grouped the fewer the number of variables in each term Get the reduced Boolean function by eliminating the variables that have changed their values inside a single block of grouped cells from the corresponding product (sum term) S. Barua – CPSC 240 sbarua@fullerton.edu http://sbarua.ecs.fullerton.edu

Example: Minimizing Boolean Functions Example: Minimize the Boolean function F(x,y,z) =  (2,3,4,5) S. Barua – CPSC 240 sbarua@fullerton.edu http://sbarua.ecs.fullerton.edu

Example: Minimizing Boolean Functions Example: Minimize the function F(w,x,y,z) =  (0,1,2,4,5,6,8,9,12,13,14) S. Barua – CPSC 240 sbarua@fullerton.edu http://sbarua.ecs.fullerton.edu

Don’t Care Conditions Sometimes a circuit is designed to respond to only some specific combinations of the input. The other combinations are not expected to be present in the circuit. The combinations of the input that are not expected in the circuit are called “don’t care terms” or “don’t care conditions.” Don’t care terms can be used to improve the minimization of a Boolean expression. S. Barua – CPSC 240 sbarua@fullerton.edu http://sbarua.ecs.fullerton.edu

Example: Don’t Care Conditions Example 1: Minimize F(A, B, C) = ABC + ABC +ABC Example 2: Minimize Example 1 by adding the “don’t care term” ABC to the function S. Barua – CPSC 240 sbarua@fullerton.edu http://sbarua.ecs.fullerton.edu

Combinational Circuit Versus Sequential Circuit The output of the circuit at any given time depends only on the inputs to the circuit at that time. Sequential Circuit Stores information The output of the circuit at any given time depends on both the inputs to the circuit at that time and the stored information. A sequential circuit has memory. S. Barua – CPSC 240 sbarua@fullerton.edu http://sbarua.ecs.fullerton.edu

Synchronous Circuits & Clock A sequential circuit whose operations are controlled by a clock is known as a synchronous circuit CLOCK Clock pulse Positive Negative width going edge going edge (Leading edge) (Trailing edge) Logic 1 Logic 0 Clock period Clock period (Clock cycle length or clock cycle time) S. Barua – CPSC 240 sbarua@fullerton.edu http://sbarua.ecs.fullerton.edu

Clock (Continued) Clock frequency: The number of times per second the clock makes the transition from logic low (0) to logic high (1). Measured in “Hz” (Hertz) which corresponds to “cycles per second”. If “f” is the clock frequency and “T” is the clock period, then f = 1/T The clock period is also called as the Clock cycle length or clock cycle time. Duty cycle: Percentage of time the clock remains on compared to the logic low region in clock period. If the clock remains on for 33% and remains off for 67% in a clock period, we say the clock has a duty cycle of 33%. S. Barua – CPSC 240 sbarua@fullerton.edu http://sbarua.ecs.fullerton.edu

Sequential Devices - Flip-flops The basic device used in the design of a sequential circuit is a flip-flop. We will look at the following four flip-flops: RS (Reset-set) flip-flop JK flip-flop D flip-flop T flip-flop S. Barua – CPSC 240 sbarua@fullerton.edu http://sbarua.ecs.fullerton.edu

RS flip-flop Symbol of a RS flip-flop Inputs: S & R S Q/ R Q Outputs: Q & Q/ S Q/ R Q Clock S. Barua – CPSC 240 sbarua@fullerton.edu http://sbarua.ecs.fullerton.edu

State Transition Table for an RS Flip-Flop Input Present State Next State S R Q Q/ Q Q/ 0 0 0 1 0 1 0 0 1 0 1 0 0 1 0 1 0 1 0 1 1 0 0 1 1 0 0 1 1 0 1 0 1 0 1 0 1 1 0 1 d d 1 1 1 0 d d S. Barua – CPSC 240 sbarua@fullerton.edu http://sbarua.ecs.fullerton.edu

Switching Time & Propagation Delay The time for an individual element to change its state Propagation Delay: The time taken for the change to make its way through the whole circuit. S. Barua – CPSC 240 sbarua@fullerton.edu http://sbarua.ecs.fullerton.edu

Timing Diagram Example of a timing diagram for a RS flip-flop Assumptions: The flip-flop is triggered by the positive going edge of the clock The propagation delay is equal to the pulse width The initial value of Q is 1 S. Barua – CPSC 240 sbarua@fullerton.edu http://sbarua.ecs.fullerton.edu

JK Flip-flop Symbol of a JK flip-flop J Q/ K Q Inputs: J & K Outputs: Q & Q/ J Q/ K Q Clock S. Barua – CPSC 240 sbarua@fullerton.edu http://sbarua.ecs.fullerton.edu

State Transition Table for a JK Flip-Flop Input Present State Next State J K Q Q/ Q Q/ 0 0 0 1 0 1 0 0 1 0 1 0 0 1 0 1 0 1 0 1 1 0 0 1 1 0 0 1 1 0 1 0 1 0 1 0 1 1 0 1 1 0 1 1 1 0 0 1 S. Barua – CPSC 240 sbarua@fullerton.edu http://sbarua.ecs.fullerton.edu

D flip-flop Symbol of a D flip-flop D Q/ Q Input: D Outputs: Q & Q/ Clock S. Barua – CPSC 240 sbarua@fullerton.edu http://sbarua.ecs.fullerton.edu

State Transition Table for a D flip-flop Input Present State Next State D Q Q/ Q Q/ 0 0 1 0 1 0 1 0 0 1 1 0 1 1 0 1 1 0 1 0 S. Barua – CPSC 240 sbarua@fullerton.edu http://sbarua.ecs.fullerton.edu

T Flip-flop Symbol of a T flip-flop T Q/ Q Input: T Outputs: Q & Q/ Clock S. Barua – CPSC 240 sbarua@fullerton.edu http://sbarua.ecs.fullerton.edu

State Transition Table for a T Flip-Flop Input Present State Next State T Q Q/ Q Q/ 0 0 1 0 1 0 1 0 1 0 1 0 1 1 0 1 1 0 0 1 S. Barua – CPSC 240 sbarua@fullerton.edu http://sbarua.ecs.fullerton.edu