Lecture 02: Digital Logic Review

Similar documents
IES Digital Mock Test

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

DIGITAL ELECTRONICS QUESTION BANK

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

Module -18 Flip flops

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

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

Digital Electronic Concepts

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

SRV ENGINEERING COLLEGE SEMBODAI RUKMANI VARATHARAJAN ENGINEERING COLLEGE SEMBODAI

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

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

Course Outline Cover Page

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

Digital Logic Circuits

Electronics. Digital Electronics

Department of Electronics and Communication Engineering

Chapter 4: The Building Blocks: Binary Numbers, Boolean Logic, and Gates

Code No: R Set No. 1

Chapter 3 Digital Logic Structures

! Is it feasible? ! How do we decompose the problem? ! Vdd. ! Topology. " Gate choice, logical optimization. " Fanin, fanout, Serial vs.

EE 42/100 Lecture 24: Latches and Flip Flops. Rev A 4/14/2010 (8:30 PM) Prof. Ali M. Niknejad

Laboratory Manual CS (P) Digital Systems Lab

CMOS Digital Integrated Circuits Lec 11 Sequential CMOS Logic Circuits

EE19D Digital Electronics. Lecture 1: General Introduction

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

Propagation Delay, Circuit Timing & Adder Design. ECE 152A Winter 2012

Propagation Delay, Circuit Timing & Adder Design

ENGIN 112 Intro to Electrical and Computer Engineering

Java Bread Board Introductory Digital Electronics Exercise 2, Page 1

(CSC-3501) Lecture 6 (31 Jan 2008) Seung-Jong Park (Jay) CSC S.J. Park. Announcement

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

Logic Families. Describes Process used to implement devices Input and output structure of the device. Four general categories.

Combinational logic. ! Regular logic: multiplexers, decoders, LUTs and FPGAs. ! Switches, basic logic and truth tables, logic functions

UNIVERSITY OF BOLTON SCHOOL OF ENGINEERING BENG (HONS) ELECTRICAL & ELECTRONICS ENGINEERING SEMESTER TWO EXAMINATION 2017/2018

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

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

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

Positive and Negative Logic

CMOS Digital Integrated Circuits Analysis and Design

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION (Autonomous) (ISO/IEC Certified) MODEL ANSWER

Lecture 3: Logic circuit. Combinational circuit and sequential circuit

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

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

CS302 - Digital Logic Design Glossary By

ELECTRONICS ADVANCED SUPPLEMENTARY LEVEL

Digital Electronics Course Objectives

Dr. Nicola Nicolici COE/EE2DI4 Midterm Test #1 Oct 18, 2006

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

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

DIGITAL CIRCUITS AND SYSTEMS ASSIGNMENTS 1 SOLUTIONS

Introduction (concepts and definitions)

Lecture 19: Design for Skew

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

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

Combinational Logic Design CH002

Combinational Logic Circuits. Combinational Logic

Unit 3. Logic Design

! Sequential Logic. ! Timing Hazards. ! Dynamic Logic. ! Add state elements (registers, latches) ! Compute. " From state elements

EE40 Lecture 35. Prof. Chang-Hasnain. 12/5/07 Reading: Ch 7, Supplementary Reader

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.

Lecture 18. BUS and MEMORY

Unit level 4 Credit value 15. Introduction. Learning Outcomes

EEE 301 Digital Electronics

Module 4: Design and Analysis of Combinational Circuits 1. Module-4. Design and Analysis of Combinational Circuits

16 Multiplexers and De-multiplexers using gates and ICs. (74150, 74154)

5. (Adapted from 3.25)

COMBINATIONAL and SEQUENTIAL LOGIC CIRCUITS Hardware implementation and software design

CPE/EE 427, CPE 527 VLSI Design I: Homeworks 3 & 4

CHAPTER 3 BASIC & COMBINATIONAL LOGIC CIRCUIT

! Review: Sequential MOS Logic. " SR Latch. " D-Latch. ! Timing Hazards. ! Dynamic Logic. " Domino Logic. ! Charge Sharing Setup.

DEPARTMENT OF ELECTRICAL & ELECTRONICS ENGINEERING

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

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

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

Chapter 3 Combinational Logic Design

Design of low-power, high performance flip-flops

Written exam IE1204/5 Digital Design Friday 13/

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

Spec. Instructor: Center

Preface to Third Edition Deep Submicron Digital IC Design p. 1 Introduction p. 1 Brief History of IC Industry p. 3 Review of Digital Logic Gate

Baker Ch 13: Clocked Circuits

Electronic Components And Circuit Analysis

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

Digital Circuits Laboratory LAB no. 12. REGISTERS

INTRODUCTION TO DIGITAL CONCEPT

Lecture 2: Digital Logic Basis

Classification of Digital Circuits

NUMBER SYSTEM AND CODES

DIGITAL LOGIC COMPUTER SCIENCE

CONTENTS Sl. No. Experiment Page No

NORTH MAHARASHTRA UNIVERSITY, JALGAON

EXPERIMENT NO 1 TRUTH TABLE (1)

Practical Workbook Logic Design & Switching Theory

EECS150 - Digital Design Lecture 2 - Synchronous Digital Systems Review Part 1. Outline

VLSI Design 11. Sequential Elements

Digital. Design. R. Ananda Natarajan B C D

Chapter 3 Digital Logic Structures

Electronic Circuits EE359A

Unit 3 Digital Circuits (Logic)

Transcription:

CENG 3420 Lecture 02: Digital Logic Review Bei Yu byu@cse.cuhk.edu.hk CENG3420 L02 Digital Logic. 1 Spring 2017

Review: Major Components of a Computer CENG3420 L02 Digital Logic. 2 Spring 2017

Review: The Instruction Set Architecture (ISA) software instruction set architecture hardware The interface description separating the software and hardware CENG3420 L02 Digital Logic. 3 Spring 2017

Analog vs. Digital Analog Signal q Vary in a smooth way over time q Analog data are continuous valued Example: audio, video Digital Signal q Maintains a constant level then changes to another constant level (generally operate in one of the two states) q Digital data are discrete valued Example: computer data CENG3420 L02 Digital Logic. 4 Spring 2017

Number Systems q An ordered set of symbols, called digits, with relations defined for addition, subtraction, multiplication, and division q Radix or base of the number system is the total number of digits allowed in the number system q Commonly used numeral systems CENG3420 L02 Digital Logic. 5 Spring 2017

q In the 2009 film Avatar, Na'vi race employs an octal numeral system. CENG3420 L02 Digital Logic. 6 Spring 2017

Conversion from Decimal Integer q Step 1: Divide the decimal number by the radix (number base) q Step 2: Save the remainder (first remainder is the least significant digit) q Repeat steps 1 and 2 until the quotient is zero q Result is in reverse order of remainders CENG3420 L02 Digital Logic. 7 Spring 2017

EX: L02-1 q EX1: Convert 36 8 to binary value q EX2: Convert 36 10 to binary value CENG3420 L02 Digital Logic. 8 Spring 2017

Unsigned Binary Representation Hex Binary Decimal 0x00000000 0 0000 0 0x00000001 0 0001 1 0x00000002 0 0010 2 0x00000003 0 0011 3 0x00000004 0 0100 4 0x00000005 0 0101 5 0x00000006 0 0110 6 0x00000007 0 0111 7 0x00000008 0 1000 8 0x00000009 0 1001 9 0xFFFFFFFC 1 1100 0xFFFFFFFD 1 1101 2 32-4 2 32-3 0xFFFFFFFE 1 1110 2 32-2 0xFFFFFFFF 1 1111 2 32-1 2 31 2 30 2 29... 2 3 2 2 2 1 2 0 bit weight 31 30 29... 3 2 1 0 bit position 1 1 1... 1 1 1 1 bit 1 0 0 0... 0 0 0 0-1 2 32-1 CENG3420 L02 Digital Logic. 9 Spring 2017

Signed Binary Representation 2 sc binary decimal -2 3 = 1000-8 -(2 3-1) = 1001-7 1010-6 1011-5 complement all the bits 1100-4 1101-3 0101 1011 1110-2 and add a 1 and add a 1 1111-1 0000 0 0110 1010 0001 1 0010 2 complement all the bits 0011 3 0100 4 0101 5 0110 6 0111 7 CENG3420 L02 Digital Logic. 10 Spring 2017 2 3-1 =

EX: L02-2 q For an n-bit signed binary numeral system, what s the largest positive number and the smallest negative number? CENG3420 L02 Digital Logic. 11 Spring 2017

Digital Circuits Digital circuits generally contain two parts: Combinational logic Sequential logic Combinational circuits consist of logic gates with inputs and outputs The outputs at any instance of time depend only on the combination of the input values based on logic operations such as AND, OR etc. Sequential circuits, in addition to inputs and outputs also have storage elements, therefore the output depends on both the current inputs as well as the stored values CENG3420 L02 Digital Logic. 12 Spring 2017

Digital Signal Representation q Active HIGH High voltage means On q Active LOW Low voltage means On 5.0 V Logic 0 Logic 1 False Off LOW No Open switch True On HIGH Yes Closed switch HIGH (1) LOW (0) 4.0 V 3.0 V 2.0 V 1.0 V 0.0 V CENG3420 L02 Digital Logic. 13 Spring 2017

Logic Gates NOT (Invertor) AND OR Invertor schematic view NAND NOR XOR XNOR q What is the schematic view of an AND gate? CENG3420 L02 Digital Logic. 14 Spring 2017

EX: L02-3 q Please draw NOR gate schematic view CENG3420 L02 Digital Logic. 15 Spring 2017

Truth Table q A means for describing how a logic circuit s output depends on the logic levels present at the circuit s inputs q The number of input combinations will equal 2 N for an N-input truth table A B Logic Circuit Y Inputs Output A B Y 0 0 0 0 1 0 1 0 0 1 1 1 CENG3420 L02 Digital Logic. 16 Spring 2017

EX: L02-4 Determine the true table of a three-input AND gate CENG3420 L02 Digital Logic. 17 Spring 2017

Combinational Circuits Input X.. Combinational Circuits.. Output Z Z = F(X) In combinational circuits, the output at any time is a direct function of the applied external inputs CENG3420 L02 Digital Logic. 18 Spring 2017

Design Procedure of Combinational Circuits Circuit Specification Truth Table How many input/output? Minimization K-maps, Algebraic Manipulation, CAD tools Logic Diagram CENG3420 L02 Digital Logic. 19 Spring 2017

EX: L02-5 q Implement AB+CD using NAND gates only CENG3420 L02 Digital Logic. 20 Spring 2017

Propagation Delay q The delay when the signal arrives at the input of a circuit, and when the output of the circuit changes, is called the propagation delay q A circuit is considered to be fast, if its propagation delay is small (ideally as close to 0 as possible) X Y Z Delay between input (X, Y) and change in output Z CENG3420 L02 Digital Logic. 21 Spring 2017

Timing Diagram q The inputs to a circuit can be changed over time. q The timing diagram shows the values of the input signals to a circuit with the passage of time, in the form of a waveform q It also shows a waveform for the output Inputs X Y Propagation Delay of the Circuit = τ Output Z Timing Diagram for an AND gate Time CENG3420 L02 Digital Logic. 22 Spring 2017

Power Consumption V DD Dynamic Power V o C L V DD2 /2 V i C L Ground CENG3420 L02 Digital Logic. 23 Spring 2017

Fanin q Fanin of a gate is the number of inputs to the gate q For a 3-input OR gate, the fanin = 3 q There is a limitation on the fanin for any gate q In CMOS IC technology, higher fanin implies slower gates (higher propagation delays) CENG3420 L02 Digital Logic. 24 Spring 2017

Fanout q Fanout is the number of gates that can be driven by a driver gate q The driven gate is called the load gate q There is a limit to the number of load gates that can be driven by a driver gate Fanout = 3 CENG3420 L02 Digital Logic. 25 Spring 2017

Buffers q Buffers have a single input and a single output, where output = input q Buffers help increase the driving capability of a circuit by increasing the fanout q Drive strength: how much load a gate can drive q Greater drive strength, fanout gates (dis)charged quickly CENG3420 L02 Digital Logic. 26 Spring 2017

How to increase drive strength? q Reduce resistance -> Increase output current Increase transistor size with gate Parallel a number of transistors NAND BUF_X1 BUF_X4 BUF_X16 CENG3420 L02 Digital Logic. 27 Spring 2017

Decoder n inputs. n-to-2 n Decoder... 2 n outputs q Information is represented by binary codes q Decoding - the conversion of an n-bit input code to an m-bit output code with n <= m <= 2 n such that each valid code word produces a unique output code q Circuits that perform decoding are called decoders q A decoder is a minterm generator CENG3420 L02 Digital Logic. 28 Spring 2017

Decoder (Use Cases) q Decode a 3-bit op-codes: q Home automation: op0 op1 op2 3-to-8 Decoder Add Sub And Xor Not Load Store Jump C 0 C 1 2-to-4 Decoder Light A/C Door Light-A/C Load a Add b Store c.. CENG3420 L02 Digital Logic. 29 Spring 2017

Decoder-Based Circuits X Y Z C S 0 0 0 0 0 0 0 1 0 1 0 1 0 0 1 0 1 1 1 0 1 0 0 0 1 1 0 1 1 0 1 1 0 1 0 1 1 1 1 1 S = (1,2,4,7) C = (3,5,6,7) 3 inputs and 8 possible minterms 3-to-8 decoder can be used for implementing this circuit Src: Mano s book CENG3420 L02 Digital Logic. 30 Spring 2017

Encoder 2 n inputs... 2 n -to-n Encoder. n outputs q Encoding - the opposite of decoding - the conversion of an m-bit input code to a n-bit output code such that each valid code word produces a unique output code q Circuits that perform encoding are called encoders q An encoder has 2 n (or fewer) input lines and n output lines which generate the binary code corresponding to the input values q Typically, an encoder converts a code containing exactly one bit that is 1 to a binary code corresponding to the position in which the 1 appears. CENG3420 L02 Digital Logic. 31 Spring 2017

Multiplexers q Directs one of 2 n input to the output q Input to output direction is done based on a set of n select bits 2 n inputs 2 n x 1 MUX one output n select lines CENG3420 L02 Digital Logic. 32 Spring 2017

MUX-based Design (n-1 Select lines) A B C F 0 0 0 0 0 0 1 1 F = C C D 0 F(A,B,C)= (1,2,6,7) 0 1 0 1 0 1 1 0 1 0 0 0 1 0 1 0 F = C F = 0 C 0 1 D 1 D 2 D 3 S S 1 0 A B F 1 1 0 1 1 1 1 1 F = 1 CENG3420 L02 Digital Logic. 33 Spring 2017

Combinational vs Sequential inputs X Combinational Circuits outputs Z q A combinational circuit: q At any time, outputs depends only on inputs Changing inputs changes outputs q History is ignored! CENG3420 L02 Digital Logic. 34 Spring 2017

Combinational vs Sequential inputs X present state Combinational Circuits Memory outputs Z next state q A sequential circuit: q outputs depends on inputs and previous inputs Previous inputs are stored as binary information into memory The stored information at any time defines a state q next state depends on inputs and present state CENG3420 L02 Digital Logic. 35 Spring 2017

Examples of sequential systems Traffic light ATM Vending machine CENG3420 L02 Digital Logic. 36 Spring 2017

Types of Sequential Circuits q Two types of sequential circuits: Synchronous: The behavior of the circuit depends on the input signal values at discrete intervals of time (also called clocked) Asynchronous: The behavior of the circuit depends on the order of change of the input signals at any instance of time (continuous) CENG3420 L02 Digital Logic. 37 Spring 2017

Design A Latch q Store one bit of information: cross-coupled invertor = q How to change the value stored? R: reset signal S: set signal SR-Latch CENG3420 L02 Digital Logic. 38 Spring 2017

EX: L02-6 q What s the Q value based on different R, S inputs? q S=R=1: q S=0,R=1: q S=1,R=0: q S=R=0: CENG3420 L02 Digital Logic. 39 Spring 2017

Design A Flip-Flop q Based on Gated Latch = q Master-slave positive-edge-triggered D flip-flop CENG3420 L02 Digital Logic. 40 Spring 2017

Latch and Flip-Flop q Latch is level-sensitive q Flip-flop is edge triggered CENG3420 L02 Digital Logic. 41 Spring 2017

Timing Diagrams (optional) Contamination and Propagation Delays t pd Logic Prop. Delay A Combinational Logic Y A Y t cd t pd t cd Logic Cont. Delay t pcq Latch/Flop Clk-Q Prop Delay clk clk t setup t hold t ccq Latch/Flop Clk-Q Cont. Delay D Flop Q D t pcq t pdq Latch D-Q Prop Delay Q t ccq t pcq t setup t hold Latch D-Q Cont. Delay Latch/Flop Setup Time Latch/Flop Hold Time D clk Latch Q clk D Q t setup t hold t t ccq pcq t cdq t pdq CENG3420 L02 Digital Logic. 42 Spring 2017

Registers 0 1 n-1 q A register is a group of flip-flops. q An n-bit register is made of n flip-flips and can store n bits q A register may have additional combinational gates to perform certain operations CENG3420 L02 Digital Logic. 43 Spring 2017

4-Bit Register q A simple 4-bit register can be made with 4 D-FF q Common Clock At each positive-edge, 4 bits are loaded in parallel Previous data is overwritten q Common Clear Asynchronous clear When Clear = 0, all FFs are cleared; i.e. 0 is stored. CENG3420 L02 Digital Logic. 44 Spring 2017

4-bit Shift Register Serial-in and Serial-out (SISO) q A simple 4-bit shift register can be made with 4 D-FF q Common Clock At each positive-edge, 1 bit is shifted in Rightmost bit is discarded q Which direction this register is shifting? CENG3420 L02 Digital Logic. 45 Spring 2017

Universal Shift Register (cont.) CENG3420 L02 Digital Logic. 46 Spring 2017