Digital Logic Circuits

Similar documents
Number system: the system used to count discrete units is called number. Decimal system: the number system that contains 10 distinguished

Digital Electronics Course Objectives

Module -18 Flip flops

Chapter 1: Digital logic

Chapter 4: FLIP FLOPS. (Sequential Circuits) By: Siti Sabariah Hj. Salihin ELECTRICAL ENGINEERING DEPARTMENT EE 202 : DIGITAL ELECTRONICS 1

Electronic Instrumentation

B.E. SEMESTER III (ELECTRICAL) SUBJECT CODE: X30902 Subject Name: Analog & Digital Electronics

Name: Class: Date: 1. As more electronic systems have been designed using digital technology, devices have become smaller and less powerful.

DIGITAL ELECTRONICS: LOGIC AND CLOCKS

CS302 - Digital Logic Design Glossary By

Electronics. Digital Electronics

Asst. Prof. Thavatchai Tayjasanant, PhD. Power System Research Lab 12 th Floor, Building 4 Tel: (02)

Digital Electronic Concepts

COMPUTER ORGANIZATION & ARCHITECTURE DIGITAL LOGIC CSCD211- DEPARTMENT OF COMPUTER SCIENCE, UNIVERSITY OF GHANA

Course Outline Cover Page

Chapter 3 Digital Logic Structures

Chapter 3 Describing Logic Circuits Dr. Xu

Gates and Circuits 1

EEE 301 Digital Electronics

This Figure here illustrates the operation for a 2-input OR gate for all four possible input combinations.

2 Logic Gates THE INVERTER. A logic gate is an electronic circuit which makes logic decisions. It has one output and one or more inputs.

Objective Questions. (a) Light (b) Temperature (c) Sound (d) all of these

Computer Architecture: Part II. First Semester 2013 Department of Computer Science Faculty of Science Chiang Mai University

Logic diagram: a graphical representation of a circuit

DIGITAL LOGIC CIRCUITS

IES Digital Mock Test

COMBINATIONAL and SEQUENTIAL LOGIC CIRCUITS Hardware implementation and software design

1.) If a 3 input NOR gate has eight input possibilities, how many of those possibilities result in a HIGH output? (a.) 1 (b.) 2 (c.) 3 (d.) 7 (e.

Spec. Instructor: Center

Introduction (concepts and definitions)

DIGITAL ELECTRONICS QUESTION BANK

Lab 2 Revisited Exercise

hij Teacher Resource Bank GCE Electronics Exemplar Examination Questions ELEC2 Further Electronics

CHAPTER 6 DIGITAL INSTRUMENTS

Course Overview. Course Overview

Preface... iii. Chapter 1: Diodes and Circuits... 1

HIGH LOW Astable multivibrators HIGH LOW 1:1

Fan in: The number of inputs of a logic gate can handle.

Digital Electronics. A. I can list five basic safety rules for electronics. B. I can properly display large and small numbers in proper notation,

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION (Autonomous) (ISO/IEC Certified) SUMMER-16 EXAMINATION Model Answer

JEFFERSON COLLEGE COURSE SYLLABUS ETC255 INTRODUCTION TO DIGITAL CIRCUITS. 6 Credit Hours. Prepared by: Dennis Eimer

ENGR 210 Lab 12: Analog to Digital Conversion

Positive and Negative Logic

D i g i t a l D e v i c e s a n d B a s i c L o g i c ( 1 2 A )

Department of Electronics and Communication Engineering

Winter 14 EXAMINATION Subject Code: Model Answer P a g e 1/28

EE 42/100 Lecture 24: Latches and Flip Flops. Rev B 4/21/2010 (2:04 PM) Prof. Ali M. Niknejad

Unit level 4 Credit value 15. Introduction. Learning Outcomes

CHAPTER 3 BASIC & COMBINATIONAL LOGIC CIRCUIT

3.1 There are three basic logic functions from which all circuits can be designed: NOT (invert), OR, and

Lecture 02: Digital Logic Review

1. The decimal number 62 is represented in hexadecimal (base 16) and binary (base 2) respectively as

The Non Inverting Buffer

Chapter 5 Sequential Logic Circuits Part II Hiroaki Kobayashi 7/11/2011

Laboratory Manual CS (P) Digital Systems Lab

Linear Integrated Circuits

In this lecture: Lecture 3: Basic Logic Gates & Boolean Expressions

CONTENTS Sl. No. Experiment Page No

CMOS Digital Integrated Circuits Analysis and Design

GOVERNMENT OF KARNATAKA KARNATAKA STATE PRE-UNIVERSITY EDUCATION EXAMINATION BOARD II YEAR PUC EXAMINATION MARCH-2013 SCHEME OF VALUATION

Lecture 15 Analysis of Combinational Circuits

Digital Systems Principles and Applications TWELFTH EDITION. 3-3 OR Operation With OR Gates. 3-4 AND Operations with AND gates

Odd-Prime Number Detector The table of minterms is represented. Table 13.1

Logic Design I (17.341) Fall Lecture Outline

EECS 150 Homework 4 Solutions Fall 2008

First Optional Homework Problem Set for Engineering 1630, Fall 2014

). The THRESHOLD works in exactly the opposite way; whenever the THRESHOLD input is above 2/3V CC

Number of Lessons:155 #14B (P) Electronics Technology with Digital and Microprocessor Laboratory Completion Time: 42 months

Introduction to IC-555. Compiled By: Chanakya Bhatt EE, IT-NU

Electronic Circuits EE359A

Syllabus: Digital Electronics (DE) (Project Lead The Way)

CS/ECE 252: INTRODUCTION TO COMPUTER ENGINEERING UNIVERSITY OF WISCONSIN MADISON

EMT1250 LABORATORY EXPERIMENT. EXPERIMENT # 4: Combinational Logic Circuits. Name: Date:

ANALOG TO DIGITAL (ADC) and DIGITAL TO ANALOG CONVERTERS (DAC)

University of Technology

UNIT-IV Combinational Logic

Chapter # 1: Introduction

LOGIC DIAGRAM: HALF ADDER TRUTH TABLE: A B CARRY SUM. 2012/ODD/III/ECE/DE/LM Page No. 1

LIST OF EXPERIMENTS. KCTCET/ /Odd/3rd/ETE/CSE/LM

Associate In Applied Science In Electronics Engineering Technology Expiration Date:

EC O4 403 DIGITAL ELECTRONICS

Digital Applications (CETT 1415) Credit: 4 semester credit hours (3 hours lecture, 4 hours lab) Prerequisite: CETT 1403 & CETT 1405

ELG3331: Digital Tachometer Introduction to Mechatronics by DG Alciatore and M B Histand

Classification of Digital Circuits

GCE AS. WJEC Eduqas GCE AS in ELECTRONICS ACCREDITED BY OFQUAL DESIGNATED BY QUALIFICATIONS WALES SAMPLE ASSESSMENT MATERIALS

GATE Online Free Material

UC Berkeley CS61C : Machine Structures

Written exam IE1204/5 Digital Design Friday 13/

R & D Electronics DIGITAL IC TRAINER. Model : DE-150. Feature: Object: Specification:

ELECTROVATE. Electromania Problem Statement Discussion

logic system Outputs The addition of feedback means that the state of the circuit may change with time; it is sequential. logic system Outputs

B.C.A 2017 DIGITAL ELECTRONICS BCA104T MODULE SPECIFICATION SHEET. Course Outline

6.111 Lecture # 19. Controlling Position. Some General Features of Servos: Servomechanisms are of this form:

INTRODUCTION TO DIGITAL CONCEPT

1 Signals and systems, A. V. Oppenhaim, A. S. Willsky, Prentice Hall, 2 nd edition, FUNDAMENTALS. Electrical Engineering. 2.

Adder Comparator 7 segment display Decoder for 7 segment display D flip flop Analysis of sequential circuits. Sequence detector

Chapter 5 Sequential Logic Circuits Part II Hiroaki Kobayashi 6/30/2008

UC Berkeley CS61C : Machine Structures

(B) The simplest way to measure the light intensity is using a photodiode in the photoconductive mode:

Lecture #1. Course Overview

Transcription:

Digital Logic Circuits Let s look at the essential features of digital logic circuits, which are at the heart of digital computers. Learning Objectives Understand the concepts of analog and digital signals and quantization Know the differences between combinational and sequential logic Write truth tables and realize logic functions from truth tables by using logic gates Digital Logic Circuits K. Craig 1

Be able to design logic circuits Be able to find a Boolean expression given a truth table Be able to use a variety of flip-flops Digital Logic Circuits K. Craig 2

Analog and Digital Signals An analog signal is an electric signal whose value varies in analogy with a physical quantity, e.g., temperature, force, acceleration, etc. For example, a voltage, v(t), proportional to a measured variable pressure, p(t), naturally varies in an analog fashion. For each value of t, v(t) can take one value among any of the values in a given range. Digital Logic Circuits K. Craig 3

A digital signal can take only a finite number of values. An example is a signal that allows display of a temperature measurement on a digital readout. Suppose that the digital readout is three digits long and can display numbers from 0 to 100. Assume that the temperature sensor is calibrated to measure temperatures from 0 to 100ºC and that the output of the sensor ranges from 0 to 5V, i.e., 20ºC per volt. The sensor output is an analog signal, but the digital display can take a value from a discrete set of states, the integers from 0 to 100. Each digit on the display represents 1/100 of the 5V range, or 0.05V = 50 mv. Note the staircase function relationship between the analog voltage and the digital readout the quantization of the sensor output voltage. Digital Logic Circuits K. Craig 4

Digital Representation on an Analog Signal Digital Logic Circuits K. Craig 5

A binary signal, the most common digital signal, is a signal that can take only one of two discrete values and is therefore characterized by transitions between two states. In binary arithmetic, the two discrete values f 1 and f 0 are represented by the numbers 1 and 0, respectively. Digital Logic Circuits K. Craig 6

In binary voltage waveforms, these values are represented by two voltage levels. In TTL convention, these values are nominally 5V and 0V, respectively. Note that in a binary waveform, knowledge of the transition between one state and another is equivalent to knowledge of the state. Thus, digital logic circuits can operate by detecting transitions between voltage levels. The transitions are called edges and can be positive (f 0 to f 1 ) or negative (f 1 to f 0 ). Digital Logic Circuits K. Craig 7

Combinational and Sequential Logic Sequential Logic Devices The timing, or sequencing history, of the input signals plays a role in determining the output. Combinational Logic Devices The outputs depend only on the instantaneous values of the inputs. These devices convert binary inputs into binary outputs based on the rules of mathematical logic. Digital Logic Circuits K. Craig 8

Boolean Algebra The mathematics associated with the binary number system (and with the more general field of logic) is called boolean (George Boole, English Mathematician, circa 1850). The variables in a boolean, or logic, expression can take only one of two values, 0 (false) and 1 (true). Analysis of logic functions (functions of boolean variables) can be carried out in terms of truth tables. A truth table is a listing of all possible values that each of the boolean variables can take, and of the corresponding value of the desired function. Logic gates are physical devices that can be used to implement logic functions. They control the flow of signals from the inputs to the single output. Digital Logic Circuits K. Craig 9

The basis of boolean algebra lies in the operations of logical addition, or the OR operation, and logical multiplication, or the AND operation. OR Gate If either X or Y is true (1), then Z is true (1) AND Gate If both X and Y are true (1), then Z is true (1) Logic gates can have an arbitrary number of inputs. Digital Logic Circuits K. Craig 10

The rules that define a logic function are often represented in tabular form by means of a truth table, i.e., a tabular summary of all possible outputs of a logic gate, given all possible input values. Truth tables are very useful in defining logic functions. Digital Logic Circuits K. Craig 11

Logic Design Example Determine the combination of logic gates that exactly implements the required logic function. Statement: The output Z shall be logic 1 only when condition (X =1 AND Y =1) OR (W = 1) occurs and shall be logic 0 otherwise. Digital Logic Circuits K. Craig 12

NOT Gate (inverter) X NOT X X X 1 0 0 1 Truth Table Note: small circle and overbar denotes signal inversion We make frequent use of truth tables to evaluate logic expressions. A set of rules will facilitate this task. The following set of rules and identities can be used to simplify logic expressions. 0 X X 1 X 1 X X X X X 1 0 X 0 X X 1 X X X Y Y X X X X X Y Y X X X 0 X Y Z X Y Z Digital Logic Circuits K. Craig 13

X Y Z X Y Z X Y Z X Y X Z X Y Z X Y X Z X X Z X X X Y X DeMorgan s Theorems X Y X Z X Y Z X X Y X Y X Y Y Z X Z X Y X Z Digital Logic Circuits K. Craig 14

DeMorgan s Theorems state a very important property of logic functions: Any logic function can be implemented by using only OR and NOT gates, or only AND and NOT gates. The importance of DeMorgan s Laws lies in the statement of the duality that exists between AND and OR operations: Any function can be realized by just one of the two basic operations, plus the compliment operation. This gives rise to two families of logic functions: Sums of Products Products of Sums Digital Logic Circuits K. Craig 15

Any logical expression can be reduced to one of these two forms. Although the two forms are equivalent, it may well be true that one of the two forms has a simpler implementation (fewer gates). Digital Logic Circuits K. Craig 16

NAND and NOR Gates In addition to the AND and OR gates, the complimentary forms of the gates, called NAND and NOR, are commonly used in practice. It is important to note that, by DeMorgan s Laws, the NAND gate performs a logical addition on the compliments of the inputs, while the NOR gate performs a logical multiplication on the compliments of the inputs. Functionally, then, any logic function could be implemented with either NOR or NAND gates only. Digital Logic Circuits K. Craig 17

Equivalence of NAND and NOR gates with AND and OR gates Digital Logic Circuits K. Craig 18

XOR (exclusive OR) Gate Common combinations of logic circuits are often provided in a single integrated-circuit package. The XOR gate is an example. Realization of an XOR Gate Digital Logic Circuits K. Craig 19

Design of Logic Networks How do you apply combinational logic to a real engineering problem? Here is a sequence of steps one might follow. Define the problem in words. Write quasi-logic statements in English that can be translated into Boolean expressions. Write the Boolean expressions. Simplify and optimize the Boolean expressions, if possible. Write an all-and, all-nand, all-or, or all-nor realization of the circuit to minimize the number of required logic IC gates. Draw the logic schematic for the electronic realization. Digital Logic Circuits K. Craig 20

Finding a Boolean Expression Given a Truth Table Rather than defining a logic problem in words and then writing quasi-logic statements, sometimes it is more convenient to express the complete input/output combinations with a truth table. In these situations, there are two methods for directly obtaining the Boolean expression that performs the logic specific in the truth table. Sum-of-Products Method We can represent an output as a sum of products containing combinations of the inputs. If we have 3 inputs and 1 output X, the sum of the products would be the following Boolean expression: X A B C A B C A B C Digital Logic Circuits K. Craig 21

If we form a product for every row in the truth table that results in an output of 1 and take the sum of the products, we can represent the complete logic of the table. For rows whose output values are 1, we must ensure that the product representing that row is 1. In order to do this, any input whose value is 0 in the row must be inverted in the product. By expressing a product for every input combination whose value is 1, we have completely modeled the logic of the truth table since every other combination will result in a 0. Example: A B X 0 0 0 0 1 1 1 0 1 1 1 0 X A B A B Digital Logic Circuits K. Craig 22

Product-of-Sums Method This is based on the fact that we can represent an output as a product of sums containing combinations of the inputs. If we have 3 inputs and 1 output X, the product of the sums would be the following Boolean expression: X A B C A B C A B C If we form a sum for every row in the truth table that results in an output of 0 and take the product of the sums, we can represent the complete logic of the table. For rows whose output values are 0, we must ensure that the sum representing that row is 0. In order to do this, any input whose value is 1 in the row must be inverted in the sum. By expressing a sum for every input combination (row) whose value is 0, we have completely modeled the logic of the truth table since every other combination will result in a 1. Example: For the previous truth table X A B A B Digital Logic Circuits K. Craig 23

Sequential Logic Combinational logic devices generate an output based on the input values, independent of the input timing. With sequential logic devices, the timing or sequencing of the input signals is important. Devices in this class include flip-flops, counters, monostables, latches, and more complex devices such as microprocessors. Sequential logic devices usually respond to inputs when a separate trigger signal transitions from one level to another. The trigger signal is usually refereed to as the clock (CK) signal and can be a periodic square wave or an aperiodic collection of pulses. Digital Logic Circuits K. Craig 24

Positive edge-triggered devices respond to a low-tohigh (0 to 1) transition, and negative edge-triggered devices respond to a high-to-low (1 to 0) transition. 1 0 positive edge negative edges positive edge Digital Logic Circuits K. Craig 25

Flip-Flops A flip-flop is a sequential device that can store and switch between the two binary states. It is called a bistable device since it has two and only two possible output states: 1 (high) and 0 (low). It has the capability of remaining in a particular state (i.e., storing a bit) until input signals cause it to change state. Let s consider a fundamental flip-flop: the RS Flip- Flop S is the set input R is the rest input Q and Q are the complimentary outputs. Digital Logic Circuits K. Craig 26

RS Flip-Flop: Symbol, Truth Table, and Timing Diagram Q = 0 Q = 1 Digital Logic Circuits K. Craig 27

Triggering of Flip-Flops Flip-flops are usually clocked, i.e., a master signal in the circuit coordinates or synchronizes the changes of the output states of the device. This is called synchronous operation since changes in state are coordinated by the clock pulses. The outputs of different types of clocked flip-flops can change on either a positive edge or negative edge of a clock pulse. These flip-flops are called edge-triggered flip flops. 1 0 positive edge negative edges positive edge Digital Logic Circuits K. Craig 28

Rules: If S and R are both 0 when the clock edge is encountered, the output state remains unchanged. If S = 1 and R = 0 when the clock signal is encountered, the output is set to 1. If the output is 1 already, there is no change. If S = 0 and R = 1 when the clock signal is encountered, the output is reset to 0. If the output is 0 already, there is no change. Digital Logic Circuits K. Craig 29

Asynchronous Inputs Flip-flops may have preset and clear functions that instantaneously override any other inputs. These are called asynchronous inputs, because their effect may be asserted at any time. They are not triggered by a clock signal. The preset input is used to set or initialize the output Q of the flip-flop to 1 or high. The clear input is used to clear or reset the output Q of the flip-flop to 0 or low. Digital Logic Circuits K. Craig 30

The small inversion symbol (open circle) shown at an asynchronous input implies that the function is asserted when the asynchronous input signal is low. This is referred to as an active low input. Both the preset and clear should not be asserted simultaneously. Either of these inputs can be used to define the state of a flip-flop after power-up; otherwise, at power-up the output of a flip-flop is uncertain. Digital Logic Circuits K. Craig 31

RS flip-flop with enable, preset, and clear lines: logic diagram and timing diagram Digital Logic Circuits K. Craig 32

Application of RS Flip-Flop: 555 Timer 8 V cc 4 Reset Control Threshold 5 6 R R Threshold Comparator +V - + -V R Q Output 3 Trigger 2 - + +V -V S Q Trigger Comparator Control Flip-Flop Discharge 7 R 1 555 Timer Digital Logic Circuits K. Craig 33

Astable Pulse-train Generator V cc 8 4 R Threshold Comparator R 1 R 2 6 R - + +V -V R Q Output 3 2 - + +V -V S Q Trigger Comparator Control Flip-Flop C 7 R 1 Astable Pulse-Train Generator Digital Logic Circuits K. Craig 34

Digital Logic Circuits K. Craig 35

Karnaugh Maps and Logic Design More than one solution is usually available for the implementation of a given logic expression. Some combinations of gates can implement a given function more efficiently than others. How can we be assured of having chosen the most efficient realization? A Karnaugh Map describes all possible combinations of the variables present in the logic function of interest. A Karnaugh Map consists of 2 N cells, where N is the number of logic variables. Row and column assignments are arranged so that all adjacent terms change by only one bit. Digital Logic Circuits K. Craig 36

For example: The Karnaugh Map provides an immediate view of the values of the function in graphical form. Digital Logic Circuits K. Craig 37

Let s use a four-variable logic function to explain how Karnaugh Maps can be used directly to implement a logic function. Digital Logic Circuits K. Craig 38