ECEN 301Discussion #25 – Final Review1 DateDayClass No. TitleChaptersHW Due date Lab Due date Exam 1 DecMon25Final Review LAB 8 2 DecTue 3 DecWed26Final.

Slides:



Advertisements
Similar presentations
SOP and POS Forms Notation.
Advertisements

EET 1131 Unit 7 Arithmetic Operations and Circuits
Digital Logic Chapter 5 Presented by Prof Tim Johnson
Multiplexors Sequential Circuits and Finite State Machines Prof. Sin-Min Lee Department of Computer Science.
Circuits require memory to store intermediate data
Dr. ClincyLecture1 Appendix A – Part 2: Logic Circuits Current State or output of the device is affected by the previous states Circuit Flip Flops New.
Number Representation and Logic Design CS 3220 Fall 2014 Hadi Esmaeilzadeh Georgia Institute of Technology Some slides adopted from.
Sequential Circuit Analysis & Design Dr. Aiman H. El-Maleh Computer Engineering Department King Fahd University of Petroleum & Minerals Dr. Aiman H. El-Maleh.
ECEN 301Discussion #24 – DAC1 Conversion Luke 22:32 32 But I have prayed for thee, that thy faith fail not: and when thou art converted, strengthen thy.
Arithmetic Hakim Weatherspoon CS 3410, Spring 2012 Computer Science Cornell University See P&H 2.4 (signed), 2.5, 2.6, C.6, and Appendix C.6.
ECEN 301Discussion #21 – Boolean Algebra1 DateDayClass No. TitleChaptersHW Due date Lab Due date Exam 12 NovWed21Boolean Algebra13.2 – 13 EXAM 2 13 NovThu.
ECEN 301Discussion #22 – Combinational Logic1 DateDayClass No. TitleChaptersHW Due date Lab Due date Exam 17 NovMon22Combinational Logic13.3 – 13.5 LAB.
ECE 331 – Digital System Design Flip-Flops and Registers (Lecture #18) The slides included herein were taken from the materials accompanying Fundamentals.
Logic Circuits Another look at Floating Point Numbers Common Combinational Logic Circuits Timing Sequential Circuits Note: Multiplication & Division in.
1 Sequential logic networks I. Motivation & Examples  Output depends on current input and past history of inputs.  “State” embodies all the information.
Chapter 4: The Building Blocks: Binary Numbers, Boolean Logic, and Gates Invitation to Computer Science, C++ Version, Third Edition.
Homework Reading Machine Projects Labs Tokheim Chapter 9.1 – 9.6
2-1 ECE 424 Design of Microprocessor-Based Systems Haibo Wang ECE Department Southern Illinois University Carbondale, IL Fundamentals of Digital.
ENGIN112 L20: Sequential Circuits: Flip flops October 20, 2003 ENGIN 112 Intro to Electrical and Computer Engineering Lecture 20 Sequential Circuits: Flip.
CS 151 Digital Systems Design Lecture 20 Sequential Circuits: Flip flops.
Digital Circuits. Analog and Digital Signals Noise margins in Logic Circuits VMVM.
Computer ArchitectureFall 2008 © August 20 th, Introduction to Computer Architecture Lecture 2 – Digital Logic Design.
1 Sequential Circuits Registers and Counters. 2 Master Slave Flip Flops.
Prof. Hakim Weatherspoon CS 3410, Spring 2015 Computer Science Cornell University See: P&H Chapter 2.4, 3.2, B.2, B.5, B.6.
Chapter 12 Digital Logic Circuit Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
+ CS 325: CS Hardware and Software Organization and Architecture Exam 1: Study Guide.
Sequential Circuits Chapter 4 S. Dandamudi To be used with S. Dandamudi, “Fundamentals of Computer Organization and Design,” Springer,  S.
ECE 2110: Introduction to Digital Systems Signed Number Conversions.
ES 244: Digital Logic Design Chapter 1 Chapter 1: Introduction Uchechukwu Ofoegbu Temple University.
Introduction to Digital Logic Design Appendix A of CO&A Dr. Farag
ECEN 301Discussion #23 – Sequential Logic1 DateDayClass No. TitleChaptersHW Due date Lab Due date Exam 19 NovWed23Sequential Logic NovThu 21 NovFri.
Computers Organization & Assembly Language
Logic and data representation Revision. AND gate A B A B All inputs have to be true ( i.e 1) for the output of the gate to be high, in all other cases.
1 CHAPTER 4: PART I ARITHMETIC FOR COMPUTERS. 2 The MIPS ALU We’ll be working with the MIPS instruction set architecture –similar to other architectures.
Basic Arithmetic (adding and subtracting)
+ CS 325: CS Hardware and Software Organization and Architecture Combinational Circuits 1.
Rabie A. Ramadan Lecture 3
Digital Computer Concept and Practice Copyright ©2012 by Jaejin Lee Logic Circuits I.
1 DIGITAL ELECTRONICS. 2 OVERVIEW –electronic circuits capable of carrying out logical (boolean) and arithmetic operations on information stored as binary.
Engineering 1040: Mechanisms & Electric Circuits Spring 2014 Number Systems.
ECEN 301Discussion #19 – Binary Numbers1 Numbered Moses 1:33,35,37 33 And worlds without number have I created; and I also created them for mine own purpose;
Chapter 2Basic Digital Logic1 Chapter 2. Basic Digital Logic2 Outlines  Basic Digital Logic Gates  Two types of digital logic circuits Combinational.
Numbers and Arithmetic Hakim Weatherspoon CS 3410, Spring 2013 Computer Science Cornell University See: P&H Chapter , 3.2, C.5 – C.6.
SEQUENTIAL CIRCUITS Component Design and Use. Register with Parallel Load  Register: Group of Flip-Flops  Ex: D Flip-Flops  Holds a Word of Data 
D Latch Delay (D) latch:a) logic symbolb) NAND implementationc) NOR implementation.
Tutorial: ITI1100 Dewan Tanvir Ahmed SITE, UofO
ECEN 301Discussion #22 – Combinational Logic1 Remember and be Thankful 2 Nephi 1:9, 20: 9 Wherefore, I, Lehi, have obtained a promise, that inasmuch as.
Kavita Bala CS 3410, Spring 2014 Computer Science Cornell University.
Hamming Code,Decoders and D,T-flip flops Prof. Sin-Min Lee Department of Computer Science.
CPS3340 Computer Architecture Fall Semester, 2013
CS/COE0447 Computer Organization & Assembly Language
Appendix C Basics of Digital Logic Part I. Florida A & M University - Department of Computer and Information Sciences Modern Computer Digital electronics.
CHAPTER 2 Digital Combinational Logic/Arithmetic Circuits
1 Fundamentals of Computer Science Combinational Circuits.
Sahar Mosleh PageCalifornia State University San Marcos 1 More on Flip Flop State Table and State Diagram.
Chapter 1_0 Registers & Register Transfer. Chapter 1- Registers & Register Transfer  Chapter 7 in textbook.
Number Representation (Part 2) Computer Architecture (Fall 2006)
1 Ethics of Computing MONT 113G, Spring 2012 Session 4 Binary Addition.
MicroProcessors Lec. 4 Dr. Tamer Samy Gaafar. Course Web Page —
President UniversityErwin SitompulDigital Systems 7/1 Lecture 7 Digital Systems Dr.-Ing. Erwin Sitompul President University
1 CS 352 Introduction to Logic Design Lecture 1 Ahmed Ezzat Number Systems and Boolean Algebra, Ch-1 + Ch-2.
1 CS/COE0447 Computer Organization & Assembly Language Logic Design Appendix C.
Mealy and Moore Machines Lecture 8 Overview Moore Machines Mealy Machines Sequential Circuits.
1 Homework Reading –Tokheim Chapter 9.1 – 9.6 Machine Projects –Continue on mp3 Labs –Continue in labs with your assigned section.
FLIP FLOPS Binary unit capable of storing one bit – 0 or 1
Fundamentals & Ethics of Information Systems IS 201
University of Gujrat Department of Computer Science
Reading: Hambley Chapters
CS/COE0447 Computer Organization & Assembly Language
Sequential Circuit Analysis & Design
Presentation transcript:

ECEN 301Discussion #25 – Final Review1 DateDayClass No. TitleChaptersHW Due date Lab Due date Exam 1 DecMon25Final Review LAB 8 2 DecTue 3 DecWed26Final Review 4 DecThu 5 DecFri RecitationHW 11 6 DecSat 7 DecSun 8 DecMon27Final Review LAB 9 9 DecTue Schedule…

ECEN 301Discussion #25 – Final Review2 Summary Jacob 6:12 12 O be wise; what can I say more?

ECEN 301Discussion #25 – Final Review3 Lecture 25 – Final Review

ECEN 301Discussion #25 – Final Review4 Final Exam u17 – 21 December uChapters 2 – 6, 8, 13 – 15 u30 questions Ù30 multiple choice (answer on bubble sheet!) 1 point each Ù0 long answer (show your work!) 4 or 5 points each uClosed book! ÙThree 3x5 cards allowed uCalculators allowed uNo time limit uStudy lecture slides and homework

ECEN 301Discussion #25 – Final Review5 Final Exam Review…Overview 1.Exam 1 Review 2.Exam 2 Review 3.Binary Numbers ÙSigned & Unsigned ÙConversions 4.Logic Functions ÙConversions among 3 representations 5.Boolean Algebra 6.Combinational Logic 7.Sequential Logic 8.Digital to Analog Converters (DACs)

ECEN 301Discussion #25 – Final Review6 Binary Numbers – Unsigned Binary word (B): a sequence of n 1s and 0s B = b n-1 b n-2 …b 2 b 1 b 0.b -1 b -2 …b -(m-1) b -m Ù EX: B = (n = 8, m=4) Converting from binary (B) to decimal (D) B = b n-1 b n-2 …b 2 b 1 b 0.b -1 b -2 …b -(m-1) b -m D = b n-1 ·2 n-1 + b n-2 ·2 n-2 + … + b 1 ·2 1 + b 0 ·2 0 + b -1 · b -2 · … + b -(m-1) ·2 -(m-1) + b -m ·2 -m Binary point

ECEN 301Discussion #25 – Final Review7 Binary Numbers – Unsigned Example1: What is in decimal?

ECEN 301Discussion #25 – Final Review8 Binary Numbers – Unsigned Example1: What is in decimal?

ECEN 301Discussion #25 – Final Review9 Binary Numbers – Signed 3 common representations for signed integers: 1.Sign magnitude 2.1’s compliment 3.2’s compliment Most common for computers

ECEN 301Discussion #25 – Final Review10 Binary Numbers – Sign-Magnitude Range: Representations Ù01111 binary => 15 decimal Ù11111=> -15 Ù00000=> 0 Ù10000=> -0 Problem ÙDifficult addition/subtraction check signs convert to positive use adder or subtractor as required ÙHow to add two sign-magnitude numbers? Ex: 1 + (-4) The MSB encodes the sign: 0 = + 1 = 

ECEN 301Discussion #25 – Final Review11 Binary Numbers – 1’s Complement Range: Representations Ù00110 binary => 6 decimal Ù11001=> -6 Ù00000=> 0 Ù11111=> -0 Problem ÙDifficult addition/subtraction no need to check signs as before cumbersome logic circuits end-around-carry ÙHow to add to one’s complement numbers? Ex: 4 + (-3) To negate a number, Invert it, bit-by-bit. MSB still encodes the sign: 0 = + 1 = 

ECEN 301Discussion #25 – Final Review12 Binary Numbers – Two’s Complement Range: Representation: ÙIf number is positive or zero, normal binary representation, zeroes in upper bit(s) ÙIf number is negative, start with positive number flip every bit (i.e., take the one’s complement) then add one (5) (9) (1’s comp)(1’s comp) (-5)(-9) MSB still encodes the sign: 0 = + 1 = 

ECEN 301Discussion #25 – Final Review13 Binary Numbers – Signed Example2: What is the 2’s complement of ?

ECEN 301Discussion #25 – Final Review14 Binary Numbers – Signed Example2: What is the 2’s complement of ? (53) (1’s comp) + 1 (add 1) (-53)

ECEN 301Discussion #25 – Final Review15 Binary Numbers – Decimal to Binary Positive numbers Œ start with empty result  if decimal number is odd, prepend ‘ 1 ’ to result else prepend ‘ 0 ’ Ž divide number by 2, throw away fractional part (INTEGER divide)  if number is non-zero, go back to  else you are done Negative numbers  do above for positive version of number and negate result.

ECEN 301Discussion #25 – Final Review16 Binary Numbers – Decimal to Binary Example3: convert -195 to 2’s complement binary notation

ECEN 301Discussion #25 – Final Review17 Binary Numbers – Decimal to Binary Example3: convert -195 to 2’s complement binary notation 1.First find positive version (195) in binary – then take 2’s complement Is it odd? 1951

ECEN 301Discussion #25 – Final Review18 Binary Numbers – Decimal to Binary Example3: convert -195 to 2’s complement binary notation 1.First find positive version (195) in binary – then take 2’s complement Is it odd? Integer division by 2: 195/2 = 97.5 → 97

ECEN 301Discussion #25 – Final Review19 Binary Numbers – Decimal to Binary Example3: convert -195 to 2’s complement binary notation 1.First find positive version (195) in binary – then take 2’s complement Is it odd? Integer division by 2: 97/2 = 48.5 → 48

ECEN 301Discussion #25 – Final Review20 Binary Numbers – Decimal to Binary Example3: convert -195 to 2’s complement binary notation 1.First find positive version (195) in binary – then take 2’s complement Is it odd? Integer division by 2: 48/2 = 24

ECEN 301Discussion #25 – Final Review21 Binary Numbers – Decimal to Binary Example3: convert -195 to 2’s complement binary notation 1.First find positive version (195) in binary – then take 2’s complement Is it odd? Integer division by 2: 24/2 = 12

ECEN 301Discussion #25 – Final Review22 Binary Numbers – Decimal to Binary Example3: convert -195 to 2’s complement binary notation 1.First find positive version (195) in binary – then take 2’s complement Is it odd? Integer division by 2: 12/2 = 6

ECEN 301Discussion #25 – Final Review23 Binary Numbers – Decimal to Binary Example3: convert -195 to 2’s complement binary notation 1.First find positive version (195) in binary – then take 2’s complement Is it odd? Integer division by 2: 6/2 = 3

ECEN 301Discussion #25 – Final Review24 Binary Numbers – Decimal to Binary Example3: convert -195 to 2’s complement binary notation 1.First find positive version (195) in binary – then take 2’s complement Is it odd? Integer division by 2: 3/2 = 1.5 → 1

ECEN 301Discussion #25 – Final Review25 Binary Numbers – Decimal to Binary Example3: convert -195 to 2’s complement binary notation 1.First find positive version (195) in binary – then take 2’s complement Is it odd? Integer division by 2: 1/2 = 0.5 → 0

ECEN 301Discussion #25 – Final Review26 Binary Numbers – Decimal to Binary Example3: convert -195 to 2’s complement binary notation 1.First find positive version (195) in binary – then take 2’s complement Is it odd? ’s complement

ECEN 301Discussion #21 – Boolean Algebra27 Hexadecimal Notation uBinary is hard to read and write by hand uHexadecimal is a common alternative  16 digits are ABCDEF = 0x478F = 0xDEAD = 0xBEEF = 0xA5A5 Binary Hex Dec A B C D E F15 0x is a common prefix for writing numbers which means hexadecimal 1.Separate binary code into groups of 4 bits (starting from the right) 2.Translate each group into a single hex digit

ECEN 301Discussion #25 – Final Review28 Binary Numbers – Hexadecimal Example4: convert to hexadecimal notation

ECEN 301Discussion #25 – Final Review29 Binary Numbers – Hexadecimal Example4: convert to hexadecimal notation

ECEN 301Discussion #25 – Final Review30 Binary Numbers – Hexadecimal Example4: convert to hexadecimal notation D

ECEN 301Discussion #25 – Final Review31 Binary Numbers – Hexadecimal Example4: convert to hexadecimal notation D

ECEN 301Discussion #25 – Final Review32 Binary Numbers – Hexadecimal Example4: convert to hexadecimal notation D F

ECEN 301Discussion #25 – Final Review33 Binary Numbers – Hexadecimal Example4: convert to hexadecimal notation D F8

ECEN 301Discussion #25 – Final Review34 Binary Numbers – Hexadecimal Example4: convert to hexadecimal notation D F8A

ECEN 301Discussion #25 – Final Review35 Binary Numbers – Hexadecimal Example4: convert to hexadecimal notation D F8A3 NB: add a leading zero to complete 4 bits

ECEN 301Discussion #25 – Final Review36 Binary Numbers – Hexadecimal Example4: convert to hexadecimal notation x3A8F4D7

ECEN 301Discussion #25 – Final Review37 Binary Numbers Example5: Complete the following table UnsignedSign-magitude1’s complement2’s complementHEX

ECEN 301Discussion #25 – Final Review38 Binary Numbers Example5: Complete the following table UnsignedSign-magitude1’s complement2’s complementHEX x xEB x5D -93NA xA3

ECEN 301Discussion #25 – Final Review39 Logic Functions 3 different ways to represent logic functions: 1.Equation: a mathematical representation of a logic function Final logic output Each letter variable represents a top-level input to the logic function Mathematical operations (i.e. addition and multiplication) are boolean algebra operations A bar over a variable represent an inverting or a NOT operation

ECEN 301Discussion #25 – Final Review40 Logic Functions 3 different ways to represent logic functions: 2.Gates: a visual block representation of the function Four 3-input AND gates feeding into one 4-input OR gate Top-level inputs Final output

ECEN 301Discussion #25 – Final Review41 Logic Functions 3 different ways to represent logic functions: 3.Truth Table: indicates what the output will be for every possible input combination ABCZ If there are n inputs (left-hand columns) there will be 2 n entries (rows) in the table EX: 3 inputs require 2 3 = 8 rows There will always be at least one output (right-hand columns) For each input combination (row) output(s) will be either 0 or 1

ECEN 301Discussion #25 – Final Review42 Logic Functions – Gates TypeSymbolEquationTruth Table NOT AND OR INOUT AB AB

ECEN 301Discussion #25 – Final Review43 Logic Functions – Gates TypeSymbolEquationTruth Table NAND NOR ABOUT AB

ECEN 301Discussion #25 – Final Review44 Logic Functions – Translation Logic Equations Logic Gates Truth Tables These are three different ways of representing logical information You can convert any one of them to any other ABOUT

ECEN 301Discussion #25 – Final Review45 Equations to Gates s a b y y y OR

ECEN 301Discussion #25 – Final Review46 Logic Functions – Gates to Equations out OR

ECEN 301Discussion #25 – Final Review47 Logic Functions – Truth Tables to Gates uEach row of truth table is an AND gate uEach output column is an OR gate SABOUT out s a b s a b s a b s a b

ECEN 301Discussion #25 – Final Review48 Logic Functions – Truth Table to Equations uWrite out truth table a combination of AND’s and OR’s Ùequivalent to gates Ùeasily converted to gates SABOUT

ECEN 301Discussion #25 – Final Review49 Logic Functions – Equations to Truth Tables uFor each AND term Ùfill in the proper row on the truth table SABOUT

ECEN 301Discussion #25 – Final Review50 Boolean Algebra – Rules

ECEN 301Discussion #25 – Final Review51 Boolean Algebra – DeMorgan’s Law To distribute the bar, change the operation. NOR Symbols NAND Symbols

ECEN 301Discussion #25 – Final Review52 Boolean Algebra Example6: simplify the following function

ECEN 301Discussion #25 – Final Review53 Boolean Algebra Example6: simplify the following function

ECEN 301Discussion #25 – Final Review54 Boolean Algebra Example7: Simplify the equation created by the following truth table ABCZ

ECEN 301Discussion #25 – Final Review55 Boolean Algebra Example7: Simplify the equation created by the following truth table ABCZ

ECEN 301Discussion #25 – Final Review56 Boolean Algebra Example7: Simplify the equation created by the following truth table ABCZ

ECEN 301Discussion #25 – Final Review57 Boolean Algebra Example8: Determine the truth table ABCZ 000? 001? 010? 011? 100? 101? 110? 111? A B C Z

ECEN 301Discussion #25 – Final Review58 Boolean Algebra Example8: Determine the truth table ABCx1x1 Z 0000? 0010? 0101? 0111? 1001? 1011? 1101? 1111? A B C Z

ECEN 301Discussion #25 – Final Review59 Boolean Algebra Example8: Determine the truth table ABCx1x1 x2x2 Z 00001? 00101? 01011? 01110? 10011? 10111? 11011? 11110? A B C Z

ECEN 301Discussion #25 – Final Review60 Boolean Algebra Example8: Determine the truth table ABCx1x1 x2x2 x3x3 Z ? ? ? ? ? ? ? ? A B C Z

ECEN 301Discussion #25 – Final Review61 Boolean Algebra Example8: Determine the truth table ABCx1x1 x2x2 x3x3 Z A B C Z

ECEN 301Discussion #25 – Final Review62 Boolean Algebra Example8: Determine the truth table ABCx1x1 x2x2 x3x3 Z

ECEN 301Discussion #25 – Final Review63 Combinational Logic – Decoders uDecode the input and signify its value by raising just one of its outputs. uA decoder with n inputs has 2 n outputs X Y Z W 2-to-4 Decoder AB W X Y Z DECODER Symbol

ECEN 301Discussion #25 – Final Review64 Combinational Logic – Decoders uWrite the truth table X Y Z W ABWXYZ

ECEN 301Discussion #25 – Final Review65 Combinational Logic – Multiplexors uConnect one of its inputs to its output according to select signals uUseful for selecting one from a collection of data inputs. uUsually has 2 n inputs and n select lines. AB S C 10 MULTIPLEXOR Symbol

ECEN 301Discussion #25 – Final Review66 Combinational Logic – Multiplexors uWrite the truth table AB S C 10 MULTIPLEXOR Symbol ABSC

ECEN 301Discussion #25 – Final Review67 Sequential Logic – SR Latch SR Latch with additional inputs: ÙEnable (E) – S and R can only change Q when E is 1 ÙPreset (PRE) – regardless of S, R, or E, put Q to 1 when PRE is 1 ÙClear (CLR) – regardless of S, R, E, or PRE, put Q to 0 when CLR is 1 SQ R E PRE CLR E S R PRE CLR Q Precedence : 1.If CLR = 1, Q = 0 2.If PRE = 1, Q = 1 3.If E = 1, Q is set based on SR: If S = 0 and R = 0, Q = held If S = 0 and R = 1, Q = 0 If S = 1 and R = 0, Q = 1 If S = 1 and R = 1, Q = unstable 4.Else Q is held SR can only change Q only in blue regions (where E = 1) BUT CLR and PRE will change Q ANYTIME

ECEN 301Discussion #25 – Final Review68 Sequential Logic – D Latch D Latch has only 2 states: ÙSet (set Q to 1): D = 1 ÙReset (reset Q to 0): D = 0 D Latch with enable (E): ÙQ can only change when E = 1 EDQ new 00Q old DQ E SQ R E D E E D Q D can only change Q only in blue regions (where E = 1)

ECEN 301Discussion #25 – Final Review69 Sequential Logic – D Flip-Flop D FF: 2 SR latches in master/slave configuration. The output (Q) changes on the rising clock edge DCLKQ new DQ CLK SQ R SQ RQ E E D Q MasterSlave CLK D Q D can only change Q only on rising clock edge (arrows)

ECEN 301Discussion #25 – Final Review70 Sequential Logic – JK Flip-Flop JK FF: 2 SR latches in master/slave configuration. The output (Q) changes on the falling clock edge JKCLKQ new 00Q old JK FF has 4 allowed states: ÙPresent state (keep Q as is): J = 0, K = 0 ÙReset (reset Q to 0): J = 0, K = 1 ÙSet (set Q to 1): J = 1, K = 0 ÙToggle (set Q to Q): J = 1, K = 1 SQ R SQ RQ E E CLK J Q QK J Q K Indicates falling clock edge

ECEN 301Discussion #25 – Final Review71 Sequential Logic – T Flip-Flop T FF: JK FF with J and K inputs connected TCLKQ new 0Q old 1 T FF has 2 allowed states: ÙPresent state (keep Q as is): T = 0 ÙToggle (set Q to Q): T = 1 CLK T Q J Q K TQ

ECEN 301Discussion #25 – Final Review72 Sequential Logic – Digital Counters Ripple counter: with N bits, cycles through the numbers from 0 to 2 N – 1 ÙN JK FFs cascaded together to produce an N-bit up counter CLK J Q K J Q K J Q K 111 B2B2 B1B1 B0B0 NB: for 3-bit counter we need 3 FFs CLK B0B0 B1B1 B2B2

ECEN 301Discussion #25 – Final Review73 Sequential Logic – Digital Counters Synchronous counter: with N bits, cycles through the numbers from 0 to 2 N – 1 ÙInput clock drives all FFs simultaneously TQ CLK TQ TQ 1 B0B0 B1B1 B2B2 B0B0 B1B1 B2B2

ECEN 301Discussion #25 – Final Review74 Sequential Logic Example9: Assuming the outputs of the following circuit start in a 000 state, determine the outputs for 4 clock cycles CLK TQ J Q K DQ Q2Q2 Q1Q1 Q0Q0

ECEN 301Discussion #25 – Final Review75 Sequential Logic Example9: Assuming the outputs of the following circuit start in a 000 state, determine the outputs for 4 clock cycles CLK T Q new 0Q old 1 DCLKQ new JKCLKQ new 00Q old Set outputs to Based on output values change FF inputs 3.On each clock cycle: a)change FF outputs based on inputs b)Change FF inputs based on new outputs TQ CLK J Q K DQ Q2Q2 Q1Q1 Q0Q0

ECEN 301Discussion #25 – Final Review76 Sequential Logic Example9: Assuming the outputs of the following circuit start in a 000 state, determine the outputs for 4 clock cycles CLK T Q new 0Q old 1 DCLKQ new JKCLKQ new 00Q old Set outputs to Based on output values change FF inputs 3.On each clock cycle: a)change ALL FF outputs based on inputs TQ CLK J Q K DQ Q2Q2 Q1Q1 Q0Q0

ECEN 301Discussion #25 – Final Review77 Sequential Logic Example9: Assuming the outputs of the following circuit start in a 000 state, determine the outputs for 4 clock cycles CLK T Q new 0Q old 1 DCLKQ new JKCLKQ new 00Q old Set outputs to Based on output values change FF inputs 3.On each clock cycle: a)change ALL FF outputs based on inputs b)Change ALL FF inputs based on new outputs TQ CLK J Q K DQ Q2Q2 Q1Q1 Q0Q0

ECEN 301Discussion #25 – Final Review78 Sequential Logic Example9: Assuming the outputs of the following circuit start in a 000 state, determine the outputs for 4 clock cycles CLK CycleQ2Q2 Q1Q1 Q0Q0 start000 TCLKQ new 0Q old 1 DCLKQ new JKCLKQ new 00Q old Inputs changed due to outputs TQ CLK J Q K DQ Q2Q2 Q1Q1 Q0Q0

ECEN 301Discussion #25 – Final Review79 Sequential Logic Example9: Assuming the outputs of the following circuit start in a 000 state, determine the outputs for 4 clock cycles CLK CycleQ2Q2 Q1Q1 Q0Q0 start TCLKQ new 0Q old 1 DCLKQ new JKCLKQ new 00Q old Outputs change on new clock cycle TQ CLK J Q K DQ Q2Q2 Q1Q1 Q0Q0

ECEN 301Discussion #25 – Final Review80 Sequential Logic Example9: Assuming the outputs of the following circuit start in a 000 state, determine the outputs for 4 clock cycles CLK CycleQ2Q2 Q1Q1 Q0Q0 start TCLKQ new 0Q old 1 DCLKQ new JKCLKQ new 00Q old Inputs changed due to outputs TQ CLK J Q K DQ Q2Q2 Q1Q1 Q0Q0

ECEN 301Discussion #25 – Final Review81 Sequential Logic Example9: Assuming the outputs of the following circuit start in a 000 state, determine the outputs for 4 clock cycles CLK CycleQ2Q2 Q1Q1 Q0Q0 start TCLKQ new 0Q old 1 DCLKQ new JKCLKQ new 00Q old Outputs change on new clock cycle TQ CLK J Q K DQ Q2Q2 Q1Q1 Q0Q0

ECEN 301Discussion #25 – Final Review82 Sequential Logic Example9: Assuming the outputs of the following circuit start in a 000 state, determine the outputs for 4 clock cycles CLK CycleQ2Q2 Q1Q1 Q0Q0 start TCLKQ new 0Q old 1 DCLKQ new JKCLKQ new 00Q old TQ CLK J Q K DQ Q2Q2 Q1Q1 Q0Q0 Inputs changed due to outputs

ECEN 301Discussion #25 – Final Review83 Sequential Logic Example9: Assuming the outputs of the following circuit start in a 000 state, determine the outputs for 4 clock cycles CLK CycleQ2Q2 Q1Q1 Q0Q0 start TCLKQ new 0Q old 1 DCLKQ new JKCLKQ new 00Q old TQ CLK J Q K DQ Q2Q2 Q1Q1 Q0Q0 Outputs change on new clock cycle

ECEN 301Discussion #25 – Final Review84 Sequential Logic Example9: Assuming the outputs of the following circuit start in a 000 state, determine the outputs for 4 clock cycles CLK CycleQ2Q2 Q1Q1 Q0Q0 start TCLKQ new 0Q old 1 DCLKQ new JKCLKQ new 00Q old TQ CLK J Q K DQ Q2Q2 Q1Q1 Q0Q0 Inputs changed due to outputs

ECEN 301Discussion #25 – Final Review85 Sequential Logic Example9: Assuming the outputs of the following circuit start in a 000 state, determine the outputs for 4 clock cycles CLK CycleQ2Q2 Q1Q1 Q0Q0 start TCLKQ new 0Q old 1 DCLKQ new JKCLKQ new 00Q old TQ CLK J Q K DQ Q2Q2 Q1Q1 Q0Q0 Outputs change on new clock cycle

ECEN 301Discussion #25 – Final Review86 Digital to Analog Converter (DAC) DAC: converts an unsigned binary word to an analog output voltage or current Resolution δv: minimum step size by which the output voltage (or current) can increment Output voltage v a : the analog value represented by the binary word B EX: let n=4 v a = (2 3 ·b ·b ·b ·b 0 )δv Max output voltage v aMax : the maximum analog value EX: let n=4 v aMax = ( )δv = (2 n – 1) δv

ECEN 301Discussion #24 – DAC87 Digital to Analog Converter (DAC) Building a DAC: use a summing amplifier – + +vo–+vo– +–+– +–+– +–+– R Sn R S2 R S1 v Sn v S2 v S1 RFRF – + +va–+va– R1R1 R n-2 R n-1 RFRF R0R0 v in b n-1 b n-2 b1b1 b0b0 Summing amplifierDAC

ECEN 301Discussion #25 – Final Review88 Digital to Analog Converter (DAC) Building a DAC: the analog output (v a ) is proportional to the binary word B – + +va–+va– R1R1 R n-2 R n-1 RFRF R0R0 v in b n-1 b n-2 b1b1 b0b0 Choose THUS v si in summing amplifier

ECEN 301Discussion #25 – Final Review89 Digital to Analog Converter (DAC) Example10: find the smallest resolution δv of an 8-bit DAC v aMax = 12V – + +va–+va– R1R1 R n-2 R n-1 RFRF R0R0 v in b n-1 b n-2 b1b1 b0b0

ECEN 301Discussion #25 – Final Review90 Digital to Analog Converter (DAC) Example10: find the smallest resolution δv of an 8-bit DAC v aMax = 12V – + +va–+va– R1R1 R n-2 R n-1 RFRF R0R0 v in b n-1 b n-2 b1b1 b0b0

ECEN 301Discussion #25 – Final Review91 Digital to Analog Converter (DAC) Example11: find the resistor values for a DAC with: range = 15V δv = 1V v in = 5V R F = 2kΩ – + +va–+va– R1R1 R n-2 R n-1 RFRF R0R0 v in b n-1 b n-2 b1b1 b0b0

ECEN 301Discussion #25 – Final Review92 Digital to Analog Converter (DAC) Example11: find the resistor values for a DAC with: range = 15V δv = 1V v in = 5V R F = 2kΩ – + +va–+va– R1R1 R n-2 R n-1 RFRF R0R0 v in b n-1 b n-2 b1b1 b0b0

ECEN 301Discussion #25 – Final Review93 Digital to Analog Converter (DAC) Example11: find the resistor values for a DAC with: range = 15V δv = 1V v in = 5V R F = 2kΩ – + +va–+va– R1R1 R n-2 R n-1 RFRF R0R0 v in b n-1 b n-2 b1b1 b0b0

ECEN 301Discussion #25 – Final Review94 Digital to Analog Converter (DAC) Example11: find the resistor values for a DAC with: range = 15V δv = 1V v in = 5V R F = 2kΩ – + +va–+va– R1R1 R n-2 R n-1 RFRF R0R0 v in b n-1 b n-2 b1b1 b0b0