Chapter Contents. Appendix A: Digital Logic. Some Definitions

Similar documents
Principles of Computer Architecture. Appendix A: Digital Logic

Computer Architecture and Organization

Microprocessor Design

DIGITAL CIRCUIT LOGIC UNIT 9: MULTIPLEXERS, DECODERS, AND PROGRAMMABLE LOGIC DEVICES

1. Convert the decimal number to binary, octal, and hexadecimal.

R13. II B. Tech I Semester Regular Examinations, Jan DIGITAL LOGIC DESIGN (Com. to CSE, IT) PART-A

R13 SET - 1 '' ''' '' ' '''' Code No: RT21053

1.b. Realize a 5-input NOR function using 2-input NOR gates only.

Chapter 4. Logic Design

Solution to Digital Logic )What is the magnitude comparator? Design a logic circuit for 4 bit magnitude comparator and explain it,

MODULE 3. Combinational & Sequential logic

Bachelor Level/ First Year/ Second Semester/ Science Full Marks: 60 Computer Science and Information Technology (CSc. 151) Pass Marks: 24

MODU LE DAY. Class-A, B, AB and C amplifiers - basic concepts, power, efficiency Basic concepts of Feedback and Oscillation. Day 1

Chapter 3. Boolean Algebra and Digital Logic

Tribhuvan University Institute of Science and Technology Bachelor of Science in Computer Science and Information Technology

Page 1. Some Definitions. Chapter 3: Sequential Logic. Sequential Logic. The Combinational Logic Unit. A NOR Gate with a Lumped Delay

DIGITAL SYSTEM DESIGN UNIT I (2 MARKS)

problem maximum score 1 28pts 2 10pts 3 10pts 4 15pts 5 14pts 6 12pts 7 11pts total 100pts

Find the equivalent decimal value for the given value Other number system to decimal ( Sample)

WINTER 15 EXAMINATION Model Answer

ENGG 1203 Tutorial. D Flip Flop. D Flip Flop. Q changes when CLK is in Rising edge PGT NGT

CHAPTER 4: Logic Circuits

TIME SCHEDULE. MODULE TOPICS PERIODS 1 Number system & Boolean algebra 17 Test I 1 2 Logic families &Combinational logic

PHYSICS 5620 LAB 9 Basic Digital Circuits and Flip-Flops

Introduction to Digital Logic Missouri S&T University CPE 2210 Exam 3 Logistics

LESSON PLAN. Sub Code: EE2255 Sub Name: DIGITAL LOGIC CIRCUITS Unit: I Branch: EEE Semester: IV

Department of Computer Science and Engineering Question Bank- Even Semester:

Using minterms, m-notation / decimal notation Sum = Cout = Using maxterms, M-notation Sum = Cout =

Advanced Devices. Registers Counters Multiplexers Decoders Adders. CSC258 Lecture Slides Steve Engels, 2006 Slide 1 of 20

CHAPTER 4: Logic Circuits

UNIVERSITI TEKNOLOGI MALAYSIA


Chapter 5: Synchronous Sequential Logic

DIGITAL CIRCUIT COMBINATORIAL LOGIC

Laboratory Objectives and outcomes for Digital Design Lab

Objectives. Combinational logics Sequential logics Finite state machine Arithmetic circuits Datapath

CS302 Digital Logic Design Solved Objective Midterm Papers For Preparation of Midterm Exam

AIM: To study and verify the truth table of logic gates

Chapter 2. Digital Circuits

Asynchronous (Ripple) Counters

MODEL QUESTIONS WITH ANSWERS THIRD SEMESTER B.TECH DEGREE EXAMINATION DECEMBER CS 203: Switching Theory and Logic Design. Time: 3 Hrs Marks: 100

NH 67, Karur Trichy Highways, Puliyur C.F, Karur District UNIT-III SEQUENTIAL CIRCUITS

The basic logic gates are the inverter (or NOT gate), the AND gate, the OR gate and the exclusive-or gate (XOR). If you put an inverter in front of

Digital Principles and Design

(Refer Slide Time: 1:45)

MODULAR DIGITAL ELECTRONICS TRAINING SYSTEM

1 Hour Sample Test Papers: Sample Test Paper 1. Roll No.

Logic Design II (17.342) Spring Lecture Outline

Question Bank. Unit 1. Digital Principles, Digital Logic

CS6201 UNIT I PART-A. Develop or build the following Boolean function with NAND gate F(x,y,z)=(1,2,3,5,7).

Where Are We Now? e.g., ADD $S0 $S1 $S2?? Computed by digital circuit. CSCI 402: Computer Architectures. Some basics of Logic Design (Appendix B)

Computer Systems Architecture

Logic Design. Flip Flops, Registers and Counters

Physics 323. Experiment # 10 - Digital Circuits

Logic and Computer Design Fundamentals. Chapter 7. Registers and Counters

Course Administration

Combinational vs Sequential

ECE 263 Digital Systems, Fall 2015

Lecture 8: Sequential Logic

CSE 352 Laboratory Assignment 3

UNIVERSITY OF MASSACHUSSETS LOWELL Department of Electrical & Computer Engineering Course Syllabus for Logic Design Fall 2013

Sequential Logic. Analysis and Synthesis. Joseph Cavahagh Santa Clara University. r & Francis. TaylonSi Francis Group. , Boca.Raton London New York \

Vignana Bharathi Institute of Technology UNIT 4 DLD

Electrical and Telecommunications Engineering Technology_TCET3122/TC520. NEW YORK CITY COLLEGE OF TECHNOLOGY The City University of New York

CS 151 Final. Instructions: Student ID. (Last Name) (First Name) Signature

Final Exam review: chapter 4 and 5. Supplement 3 and 4

SEQUENTIAL LOGIC. Satish Chandra Assistant Professor Department of Physics P P N College, Kanpur

Registers and Counters

Digital Design, Kyung Hee Univ. Chapter 5. Synchronous Sequential Logic

Logic Design ( Part 3) Sequential Logic- Finite State Machines (Chapter 3)

Chapter 6. Flip-Flops and Simple Flip-Flop Applications

1. a) For the circuit shown in figure 1.1, draw a truth table showing the output Q for all combinations of inputs A, B and C. [4] Figure 1.

Counter dan Register

UNIT 1: DIGITAL LOGICAL CIRCUITS What is Digital Computer? OR Explain the block diagram of digital computers.

St. MARTIN S ENGINEERING COLLEGE

Introduction to Digital Logic Missouri S&T University CPE 2210 Exam 2 Logistics

VU Mobile Powered by S NO Group

Flip-Flops and Sequential Circuit Design

TYPICAL QUESTIONS & ANSWERS

CprE 281: Digital Logic


Digital Fundamentals: A Systems Approach

ROEVER COLLEGE OF ENGINEERING & TECHNOLOGY ELAMBALUR, PERAMBALUR DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING

Counters

CS T34-DIGITAL SYSTEM DESIGN Y2/S3


Chapter 5 Sequential Circuits

Switching Circuits & Logic Design, Fall Final Examination (1/13/2012, 3:30pm~5:20pm)

YEDITEPE UNIVERSITY DEPARTMENT OF COMPUTER ENGINEERING. EXPERIMENT VIII: FLIP-FLOPS, COUNTERS 2014 Fall

Subject : EE6301 DIGITAL LOGIC CIRCUITS

The word digital implies information in computers is represented by variables that take a limited number of discrete values.

Department of Electrical and Computer Engineering Mid-Term Examination Winter 2012

RS flip-flop using NOR gate

IT T35 Digital system desigm y - ii /s - iii

UNIT III. Combinational Circuit- Block Diagram. Sequential Circuit- Block Diagram

0 0/1 0/1 0/1 0/1 0/1 0/1 0/1 0/1 1 1 Stop bits. 11-bit Serial Data format

WINTER 14 EXAMINATION

CPS311 Lecture: Sequential Circuits

EXPERIMENT: 1. Graphic Symbol: OR: The output of OR gate is true when one of the inputs A and B or both the inputs are true.

Combinational Logic Design

Transcription:

A- Appendix A - Digital Logic A-2 Appendix A - Digital Logic Chapter Contents Principles of Computer Architecture Miles Murdocca and Vincent Heuring Appendix A: Digital Logic A. Introduction A.2 Combinational Logic A.3 Truth Tables A.4 Logic Gates A.5 Properties of Boolean Algebra A.6 The Sum-of-Products Form, and Logic Diagrams A.7 The Product-of-Sumsof Form A.8 Positive vs. Negative Logic A.9 The Data Sheet A. Digital Components A. Sequential Logic A.2 Design of Finite State Machines A.3 Mealy vs. Moore Machines A.4 Registers A.5 Counters A-3 Appendix A - Digital Logic Some Definitions Combinational logic: a digital logic circuit in which logical decisions are made based only on combinations of the inputs. e.g. an adder. Sequential logic: a circuit in which decisions are made based on combinations of the current inputs as well as the past history of inputs. e.g. a memory unit. Finite state machine: a circuit which has an internal state, and whose outputs are functions of both current inputs and its internal state. e.g. a vending machine controller. A-4 Appendix A - Digital Logic The Combinational Logic Unit Translates a set of inputs into a set of outputs according to one or more mapping functions. Inputs and outputs for a CLU normally have two distinct (binary) values: high and low, and, and, or 5 v. and v. for example. The outputs of a CLU are strictly functions of the inputs, and the outputs are updated immediately after the inputs change. A set of inputs i in are presented to the CLU, which produces a set of outputs according to mapping functions f fm Page

A-5 Appendix A - Digital Logic Truth Tables Developed in 854 by George Boole further developed by Claude Shannon (Bell Labs) Outputs are computed for all possible input combinations (how many input combinations are there? Consider a room with two light switches. How must they work? A-6 Appendix A - Digital Logic Alternate Assignments of Outputs to Switch Settings Logically identical truth table to the original (see previous slide), if the switches are configured up-side down. Don't show this to your electrician, or wire your house this way. This circuit definitely violates the electric code. The practical circuit never leaves the lines to the light "hot" when the light is turned off. Can you figure how? A-7 Appendix A - Digital Logic Truth Tables Showing All Possible Functions of Two Binary Variables A-8 Appendix A - Digital Logic Logic Gates and Their Symbols Logic symbols for AND, OR, buffer, and NOT Boolean functions The more frequently used functions have names: AND, XOR, OR, NOR, XOR, and NAND. (Always use upper case spelling.) Note the use of the inversion bubble. (Be careful about the nose of the gate when drawing AND vs. OR.) Page 2

A-9 Appendix A - Digital Logic Logic symbols for NAND, NOR, XOR, and XNOR Boolean functions A- Appendix A - Digital Logic Variations of Basic Logic Gate Symbols A- Appendix A - Digital Logic The Inverter at the Transistor Level A-2 Appendix A - Digital Logic Transistor-Level Circuits For 2-Input a) NAND and b)nor Gates Power Terminals Transistor Symbol A Transistor Used as an Inverter Inverter Transfer Function Page 3

A-3 Appendix A - Digital Logic Tri-State Buffers Outputs can be,, or electrically disconnected. A-4 Appendix A - Digital Logic The Basic Properties of Boolean Algebra Principle of duality: The dual of a Boolean function is gotten by replacing AND with OR and OR with AND, constant s by s, and s by s Postulates Postulat Theorems A, B, etc. are Literals; and are constants. A-5 Appendix A - Digital Logic DeMorgan s Theorem A-6 Appendix A - Digital Logic The Sum-of-Products (SOP) Form Fig. A.5 Truth Table for The Majority Function Minterm Index A B C F 2 3 4 5 6 7 -side -side A balance tips to the left or right depending on whether there are more s or s. Discuss: Applying DeMorgan s theorem by pushing the bubbles, and bubble tricks. Transform the function into a two-level AND-OR equation Implement the function with an arrangement of logic gates from the set {AND, OR, NOT} M is true when A=, B=, and C=, or when A=, B=, and C=, and so on for the remaining cases. Represent logic equations by using the sum-of-products (SOP) form Page 4

A-7 Appendix A - Digital Logic The SOP Form of the Majority Gate A-8 Appendix A - Digital Logic A 2-Level AND-OR Circuit that Implements the Majority Function The SOP form for the 3-input majority gate is: M = ABC + ABC + ABC + ABC = m3 + m5 +m6 +m7 = Σ (3, 5, 6, 7) Each of the 2 n terms are called minterms, running from to 2 n - Note the relationship between minterm number and boolean value. Discuss: common-sense interpretation of equation. Discuss: What is the Gate Count? A-9 Appendix A - Digital Logic Notation Used at Circuit Intersections A-2 Appendix A - Digital Logic A 2-Level OR-AND Circuit that Implements the Majority Function Page 5

A-2 Appendix A - Digital Logic Digital Components A-22 Appendix A - Digital Logic High level digital circuit designs are normally made using collections of logic gates referred to as components, rather than using individual id logic gates. The majority function can be viewed as a component. Levels of integration (numbers of gates) in an integrated circuit (IC): Small scale integration (SSI): - gates. Medium scale integration (MSI): to gates. Large scale integration (LSI): -, logic gates. Very large scale integration (VLSI):,-upward. These levels are approximate, but the distinctions are useful in comparing the relative complexity of circuits. Let us consider several useful MSI components: The Data Sheet A-23 Appendix A - Digital Logic The Multiplexer A-24 Appendix A - Digital Logic Implementing the Majority Function with an 8- Mux Principle: Use the mux select to pick out the selected minterms of the function. Page 6

A-25 Appendix A - Digital Logic More Efficiency: Using a 4- Mux to Implement the Majority Function A-26 Appendix A - Digital Logic The Demultiplexer (DEMUX) Principle: Use the A and B inputs to select a pair of minterms. The value applied to the MUX input is selected from {,, C, C} to pick the desired behavior of the minterm pair. A-27 Appendix A - Digital Logic The Demultiplexer is a Decoder with an Enable Input A-28 Appendix A - Digital Logic A 2-4 Decoder Compare to Fig A.29 Page 7

A-29 Appendix A - Digital Logic Using a Decoder to Implement the Majority Function A-3 Appendix A - Digital Logic The Priority Encoder An encoder translates a set of inputs into a binary encoding, Can be thought of as the converse of a decoder. A priority encoder imposes an order on the inputs. A i has a higher priority than A i+ A-3 Appendix A - Digital Logic Programmable Logic Arrays (PLAs) A-32 Appendix A - Digital Logic Using a PLA to Implement the Majority Function A PLA is a customizable AND matrix followed by a customizable OR matrix: Page 8

A-33 Appendix A - Digital Logic Using PLAs to Implement an Adder A-34 Appendix A - Digital Logic A Multi-Bit Ripple- Carry Adder PLA Realization of a Full Adder A-35 Appendix A - Digital Logic Sequential Logic The combinational logic circuits we have been studying so far have no memory. The outputs always follow the inputs. There is a need for circuits with memory, which behave differently depending upon their previous state. An example is a vending machine, which must remember how many and what kinds of coins have been inserted. The machine should behave according to not only the current coin inserted, but also upon how many and what kinds of coins have been inserted previously. These are referred to as finite state machines, because they can have at most a finite number of states. A-36 Appendix A - Digital Logic Classical Model of a Finite State Machine An FSM is composed of a combinational logic unit and delay elements (called flip-flops) in a feedback path, which maintains state t information. Page 9

A-37 Appendix A - Digital Logic NOR Gate with Lumped Delay A-38 Appendix A - Digital Logic S-R Latch The S-R latch is an active high (positive logic) device. The delay between input and output (which is lumped at the output for the purpose of analysis) is at the basis of the functioning of an important memory element, the flip-flop. A-39 Appendix A - Digital Logic NAND Implementation of S-R Latch A-4 Appendix A - Digital Logic A Hazard x It is desirable to be able to turn off the latch so it does not respond to such hazards. Page

A-4 Appendix A - Digital Logic A Clock Waveform: The Clock Paces the System A-42 Appendix A - Digital Logic Scientific Prefixes For computer memory, K = 2 = 24. For everything else, like clock speeds, K =, and likewise for M, G, etc. In a positive logic system, the action happens when the clock is high, or positive. The low part of the clock cycle allows propagation between subcircuits, so their inputs settle at the correct value when the clock next goes high. A-43 Appendix A - Digital Logic Clocked S-R Latch A-44 Appendix A - Digital Logic Clocked D Latch The clock signal, CLK, enables the S and R inputs to the latch. The clocked D latch, has a potential problem: If D changes while the clock is high, the output will also change. The Master-Slave flip-flop (next slide) addresses this problem. Page

A-45 Appendix A - Digital Logic Master-Slave Flip-Flop A-46 Appendix A - Digital Logic Example: Modulo-4 Counter Counter has a clock input (CLK) and a RESET input. Counter has two output lines, which take on values of,,, and d on subsequent clock cycles. The rising edge of the clock loads new data into the master, while the slave continues to hold previous data. The falling edge of the clock loads the new master data into the slave. A-47 Appendix A - Digital Logic A-48 Appendix A - Digital Logic State Table for Mod-4 Counter State Transition Diagram for Mod-4 Counter Page 2

A-49 Appendix A - Digital Logic State Assignment for Mod-4 Counter A-5 Appendix A - Digital Logic Truth Table for Mod-4 Counter A-5 Appendix A - Digital Logic Logic Design for Mod-4 Counter A-52 Appendix A - Digital Logic Example: A Sequence Detector Example: Design a machine that outputs a when exactly two of the last three inputs are. e.g. input sequence of produces an output sequence of. Assume input is a -bit serial line. Use D flip-flops and 8-to- Multiplexers. Start by constructing a state transition diagram (next slide). Page 3

A-53 Appendix A - Digital Logic Sequence Detector State Transition Diagram A-54 Appendix A - Digital Logic Sequence Detector State Table Design a machine that outputs a when exactly two of the last three inputs are. A-55 Appendix A - Digital Logic Sequence Detector State Assignment A-56 Appendix A - Digital Logic Sequence Detector Logic Diagram Page 4

Field programmable gate array (FPGA) a semiconductor device containing programmable logic components and programmable interconnects A-58 Appendix A - Digital Logic Example: A Vending Machine Controller Logic Block Logic Block Pin Locations Example: Design a finite state machine for a vending machine controller that accepts nickels (5 cents each), dimes ( cents each), and quarters (25 cents each). When the value of the money inserted equals or exceeds twenty cents, the machine vends the item and returns change if any, and waits for next transaction. Implement with PLA and D flip-flops. Switch box topology A-59 Appendix A - Digital Logic Vending Machine State Transition Diagram A-6 Appendix A - Digital Logic Vending Machine State Table and State Assignment Page 5

A-6 Appendix A - Digital Logic PLA Vending Machine Controller A-62 Appendix A - Digital Logic Moore Counter Mealy Model: Outputs are functions of Inputs and Present State. Previous FSM designs were Mealy Machines, in which next state was computed from present state and inputs. Moore Model: Outputs t are functions of fpresent tstate t only. A-63 Appendix A - Digital Logic Four-Bit Register Makes use of tri-state buffers so that multiple registers can gang their outputs to common output lines. A-64 Appendix A - Digital Logic Left-Right Shift Register with Parallel Read and Write Page 6

A-65 Appendix A - Digital Logic Modulo-8 Counter Note the use of the T flip-flops, implemented as J-K s. They are used to toggle the input of the next flip-flop when its output is. Page 7