CMSC 313 Preview Slides

Similar documents
Principles of Computer Architecture. Appendix B: Reduction of Digital Logic. Chapter Contents

CMSC 313 Lecture 19 Combinational Logic Components Programmable Logic Arrays Karnaugh Maps

CMSC 313 Lecture 19 Homework 4 Questions Combinational Logic Components Programmable Logic Arrays Introduction to Circuit Simplification

SYNCHRONOUS SEQUENTIAL CIRCUITS

Lecture 6: Gate Level Minimization Syed M. Mahmud, Ph.D ECE Department Wayne State University

The Karnaugh Map COE 202. Digital Logic Design. Dr. Muhamed Mudawar King Fahd University of Petroleum and Minerals

Motivation. CS/EE 3700 : Fundamentals of Digital System Design

Chapter 2 Combinational Logic Circuits

UNIT 5 KARNAUGH MAPS Spring 2011

Karnaugh Maps Objectives

Outcomes. Unit 14. Review of State Machines STATE MACHINES OVERVIEW. State Machine Design

Unit 2 Session - 6 Combinational Logic Circuits

This form sometimes used in logic circuit, example:

Logic Simplification. Boolean Simplification Example. Applying Boolean Identities F = A B C + A B C + A BC + ABC. Karnaugh Maps 2/10/2009 COMP370 1

Logic Synthesis and Verification. Two-Level Logic Minimization (1/2) Quine-McCluskey Procedure. Complexity

Review. EECS Components and Design Techniques for Digital Systems. Lec 06 Minimizing Boolean Logic 9/ Review: Canonical Forms

Chapter 2 Combinational Logic Circuits

Lecture 6: Manipulation of Algebraic Functions, Boolean Algebra, Karnaugh Maps

ELC224C. Karnaugh Maps

Karnaugh Maps (K-Maps)

EE40 Lec 15. Logic Synthesis and Sequential Logic Circuits

211: Computer Architecture Summer 2016

L4: Karnaugh diagrams, two-, and multi-level minimization. Elena Dubrova KTH / ICT / ES

Lecture 5: NAND, NOR and XOR Gates, Simplification of Algebraic Expressions

CPE100: Digital Logic Design I

Digital Logic Design. Midterm #2

for Digital Systems Simplification of logic functions Tajana Simunic Rosing Sources: TSR, Katz, Boriello & Vahid

DIGITAL ELECTRONICS & it0203 Semester 3

ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN. Week 9 Dr. Srinivas Shakkottai Dept. of Electrical and Computer Engineering

Boolean cubes EECS150. Mapping truth tables onto cubes. Simplification. The Uniting Theorem. Three variable example

Chapter 4 Optimized Implementation of Logic Functions

CMSC 313 Lecture 17. Focus Groups. Announcement: in-class lab Thu 10/30 Homework 3 Questions Circuits for Addition Midterm Exam returned

Simplifying Logic Circuits with Karnaugh Maps

Gate-Level Minimization

UNIT 4 MINTERM AND MAXTERM EXPANSIONS

ENG2410 Digital Design Combinational Logic Circuits

Optimizations and Tradeoffs. Combinational Logic Optimization

ELCT201: DIGITAL LOGIC DESIGN

Spiral 1 / Unit 5. Karnaugh Maps

Simplification of Boolean Functions. Dept. of CSE, IEM, Kolkata

CS/EE 181a 2008/09 Lecture 4

Chapter 7 Logic Circuits

Outcomes. Spiral 1 / Unit 5. Logic Function Synthesis KARNAUGH MAPS. Karnaugh Maps

CMSC 313 Lecture 15 Good-bye Assembly Language Programming Overview of second half on Digital Logic DigSim Demo

CHAPTER III BOOLEAN ALGEBRA

Digital Circuit And Logic Design I. Lecture 4

CHAPTER 5 KARNAUGH MAPS

Number System conversions

Logic and Computer Design Fundamentals. Chapter 2 Combinational Logic Circuits. Part 2 Circuit Optimization

9.1. Unit 9. Implementing Combinational Functions with Karnaugh Maps or Memories

Working with Combinational Logic. Design example: 2x2-bit multiplier

Computer Organization I. Lecture 13: Design of Combinational Logic Circuits

CSE 140: Components and Design Techniques for Digital Systems

Lecture 4: Four Input K-Maps

Introduction to Digital Logic Missouri S&T University CPE 2210 Karnaugh Maps

Philadelphia University Student Name: Student Number:

Outcomes. Spiral 1 / Unit 5. Logic Function Synthesis KARNAUGH MAPS. Karnaugh Maps

ELECTRICAL AND COMPUTER ENGINEERING DEPARTMENT, OAKLAND UNIVERSITY ECE-2700: Digital Logic Design Winter Notes - Unit 2

Textbook: Digital Design, 3 rd. Edition M. Morris Mano

Week-I. Combinational Logic & Circuits

ELEC Digital Logic Circuits Fall 2014 Sequential Circuits (Chapter 6) Finite State Machines (Ch. 7-10)

14:332:231 DIGITAL LOGIC DESIGN. Combinational Circuit Synthesis

CHAPTER III BOOLEAN ALGEBRA

Digital Logic Appendix A

Lecture 7: Karnaugh Map, Don t Cares

CHAPTER 7. Exercises 17/ / /2 2 0

EE 209 Spiral 1 Exam Solutions Name:

Combinatorial Logic Design Principles

Lecture 4: More Boolean Algebra

Ch 7. Finite State Machines. VII - Finite State Machines Contemporary Logic Design 1

Ch 2. Combinational Logic. II - Combinational Logic Contemporary Logic Design 1

ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN. Week 2 Dr. Srinivas Shakkottai Dept. of Electrical and Computer Engineering

Contents. Chapter 3 Combinational Circuits Page 1 of 36

Faculty of Engineering. FINAL EXAMINATION FALL 2008 (December2008) ANSWER KEY

3. Complete the following table of equivalent values. Use binary numbers with a sign bit and 7 bits for the value

E&CE 223 Digital Circuits & Systems. Lecture Transparencies (Boolean Algebra & Logic Gates) M. Sachdev

EECS150 - Digital Design Lecture 19 - Combinational Logic Circuits : A Deep Dive

CMSC 313 Lecture 16 Announcement: no office hours today. Good-bye Assembly Language Programming Overview of second half on Digital Logic DigSim Demo

ECE 20B, Winter 2003 Introduction to Electrical Engineering, II LECTURE NOTES #2

14:332:231 DIGITAL LOGIC DESIGN

ELEC Digital Logic Circuits Fall 2014 Logic Minimization (Chapter 3)

Boolean Algebra. Digital Logic Appendix A. Postulates, Identities in Boolean Algebra How can I manipulate expressions?

CSE 140 Midterm I - Solution

Lecture 2 Review on Digital Logic (Part 1)

Logic Design I (17.341) Fall Lecture Outline

L2: Combinational Logic Design (Construction and Boolean Algebra)

Combinational Logic (mostly review!)

Systems I: Computer Organization and Architecture

Midterm Examination # 1 Wednesday, February 25, Duration of examination: 75 minutes

Administrative Notes. Chapter 2 <9>

Advanced Digital Design with the Verilog HDL, Second Edition Michael D. Ciletti Prentice Hall, Pearson Education, 2011

E&CE 223 Digital Circuits & Systems. Lecture Transparencies (Boolean Algebra & Logic Gates) M. Sachdev. Section 2: Boolean Algebra & Logic Gates

Logic and Computer Design Fundamentals. Chapter 2 Combinational Logic Circuits. Part 1 Gate Circuits and Boolean Equations

COM111 Introduction to Computer Engineering (Fall ) NOTES 6 -- page 1 of 12

Karnaugh Map & Boolean Expression Simplification

Sequential Circuit Design

ELEC Digital Logic Circuits Fall 2015 Logic Minimization (Chapter 3)

ENGG 1203 Tutorial_9 - Review. Boolean Algebra. Simplifying Logic Circuits. Combinational Logic. 1. Combinational & Sequential Logic

ENGG 1203 Tutorial - 2 Recall Lab 2 - e.g. 4 input XOR. Parity checking (for interest) Recall : Simplification methods. Recall : Time Delay

inflow outflow Part I. Regular tasks for MAE598/494 Task 1

Transcription:

CMSC 33 Preview Slies These are raft slies. The actual slies presente in lecture may be ifferent ue to last minute changes, scheule slippage,... UMBC, CMSC33, Richar Chang <chang@umbc.eu>

CMSC 33 Lecture 2 Introuction to Circuit Simplification Karnaugh Map eamples Quine-McCluskey (Tabular Reuction) UMBC, CMSC33, Richar Chang <chang@umbc.eu>

B-3 Appeni B: Reuction of Digital Logic Reuction (Simplification) of Boolean Epressions It is usually possible to simplify the canonical SOP (or POS) forms. A smaller Boolean equation generally translates to a lower gate count in the target circuit. We cover three methos: algebraic reuction, Karnaugh map reuction, an tabular (Quine-McCluskey) reuction. Principles of Computer Architecture by M. Murocca an V. Heuring 999 M. Murocca an V. Heuring

B-7 Appeni B: Reuction of Digital Logic Karnaugh Maps: Venn Diagram Representation of Majority Function Each istinct region in the Universe represents a minterm. This iagram can be transforme into a Karnaugh Map. ABC A ABC AB C AB C A BC A B C A BC A B C B C Principles of Computer Architecture by M. Murocca an V. Heuring 999 M. Murocca an V. Heuring

B-8 Appeni B: Reuction of Digital Logic K-Map for Majority Function Place a in each cell that correspons to that minterm. Cells on the outer ege of the map wrap aroun Minterm Ine 2 3 4 5 6 7 A B C F C AB -sie -sie A balance tips to the left or right epening on whether there are more s or s. Principles of Computer Architecture by M. Murocca an V. Heuring 999 M. Murocca an V. Heuring

B-9 Appeni B: Reuction of Digital Logic Ajacency Groupings for Majority Function C AB F = BC + AC + AB Principles of Computer Architecture by M. Murocca an V. Heuring 999 M. Murocca an V. Heuring

B- Appeni B: Reuction of Digital Logic Minimize AND-OR Majority Circuit A B C F F = BC + AC + AB The K-map approach yiels the same minimal two-level form as the algebraic approach. Principles of Computer Architecture by M. Murocca an V. Heuring 999 M. Murocca an V. Heuring

B- Appeni B: Reuction of Digital Logic K-Map Groupings Minimal grouping is on the left, non-minimal (but logically equivalent) grouping is on the right. To obtain minimal grouping, create smallest groups first. AB CD AB CD 2 4 5 2 3 3 4 F = A B C + A C D + A B C + A C D F = B D + A B C + A C D + A B C + A C D Principles of Computer Architecture by M. Murocca an V. Heuring 999 M. Murocca an V. Heuring

Eample Requiring More Rules A AB CD 4 2 8 5 3 9 3 7 5 D 2 6 4 C B UMBC, CMSC33, Richar Chang <chang@umbc.eu>

B-2 Appeni B: Reuction of Digital Logic K-Map Corners are Logically Ajacent CD AB F = B C D + B D + A B Principles of Computer Architecture by M. Murocca an V. Heuring 999 M. Murocca an V. Heuring

B-3 Appeni B: Reuction of Digital Logic K-Maps an Don t Cares There can be more than one minimal grouping, as a result of on t cares. AB CD AB CD F = B C D + B D F = A B D + B D Principles of Computer Architecture by M. Murocca an V. Heuring 999 M. Murocca an V. Heuring

Two bits:,,, Gray Coe Three bits:,,,,,,, Successive bit patterns only iffer at position For Karnaugh maps, ajacent s represent minterms that can be simplifie using the rule: ABC + A BC = (A + A )BC = BC = BC A AB C UMBC, CMSC33, Richar Chang <chang@umbc.eu> B

Karnaugh Maps Implicant: rectangle with, 2, 4, 8, 6... s Prime Implicant: an implicant that cannot be etene into a larger implicant Essential Prime Implicant: the only prime implicant that covers some K-map Algorithm (not from M&H):. Fin ALL the prime implicants. Be sure to check every an to use on t cares. 2. Inclue all essential prime implicants. 3. Try all possibilities to fin the minimum cover for the remaining s. UMBC, CMSC33, Richar Chang <chang@umbc.eu>

K-map Eample A AB CD 4 2 8 A AB CD 4 2 8 5 3 9 3 7 5 D 5 3 9 3 7 5 D 2 6 4 2 6 4 C C B B A B + AC D + AB D UMBC, CMSC33, Richar Chang <chang@umbc.eu>

Notes on K-maps Also works for POS Takes 2 n time for formulas with n variables Only optimizes two-level logic Reuces number of terms, then number of literals in each term Assumes inverters are free Does not consier minimizations across functions Circuit minimization is generally a har problem Quine-McCluskey can be use with more variables CAD tools are available if you are serious UMBC, CMSC33, Richar Chang <chang@umbc.eu>

Karnaugh Maps Implicant: rectangle with, 2, 4, 8, 6... s Prime Implicant: an implicant that cannot be etene into a larger implicant Essential Prime Implicant: the only prime implicant that covers some K-map Algorithm (not from M&H):. Fin ALL the prime implicants. Be sure to check every an to use on t cares. 2. Inclue all essential prime implicants. 3. Try all possibilities to fin the minimum cover for the remaining s. UMBC, CMSC33, Richar Chang <chang@umbc.eu>

Notes on K-maps Also works for POS Takes 2 n time for formulas with n variables Only optimizes two-level logic Reuces number of terms, then number of literals in each term Assumes inverters are free Does not consier minimizations across functions Circuit minimization is generally a har problem Quine-McCluskey can be use with more variables CAD tools are available if you are serious UMBC, CMSC33, Richar Chang <chang@umbc.eu>

Circuit Minimization is Har Uni systems store passwors in encrypte form. User types in, system computes f() an looks for f() in a file. Suppose we us 64-bit passwors an I want to fin the passwor, such that f() = y. Let gi() = if f() = y an the ith bit of is otherwise. If the ith bit of is, then gi() outputs for every an has a very, very simple circuit. If you can simplify every circuit quickly, then you can crack passwors quickly. UMBC, CMSC33, Richar Chang <chang@umbc.eu>

B-6 Appeni B: Reuction of Digital Logic 3-Level Majority Circuit K-Map Reuction results in a reuce two-level circuit (that is, AND followe by OR. Inverters are not inclue in the two-level count). Algebraic reuction can result in multi-level circuits with even fewer logic gates an fewer inputs to the logic gates. A B C M Principles of Computer Architecture by M. Murocca an V. Heuring 999 M. Murocca an V. Heuring

CD AB A 4 2 8 CD AB A 4 2 8 CD AB A 4 2 8 5 3 9 5 3 9 5 3 9 3 7 5 D 3 7 5 D 3 7 5 D 2 6 4 2 6 4 2 6 4 C C C B B B CD AB A 4 2 8 CD AB A 4 2 8 CD AB A 4 2 8 5 3 9 5 3 9 5 3 9 3 7 5 D 3 7 5 D 3 7 5 D 2 6 4 2 6 4 2 6 4 C C C B B B

B-4 Appeni B: Reuction of Digital Logic Five-Variable K-Map Visualize two 4-variable K-maps stacke one on top of the other; groupings are mae in three imensional cubes. CDE AB AB CDE F = A C D E + A B D E + B E Principles of Computer Architecture by M. Murocca an V. Heuring 999 M. Murocca an V. Heuring

B-5 Si-Variable K-Map Appeni B: Reuction of Digital Logic Visualize four 4-variable K-maps stacke one on top of the other; groupings are mae in three imensional cubes. ABC DEF ABC DEF ABC ABC DEF DEF Principles of Computer Architecture by M. Murocca an V. Heuring G = B C E F + A B D E 999 M. Murocca an V. Heuring

Appeni B: Reuction of Digital Logic B-9 Principles of Computer Architecture by M. Murocca an V. Heuring 999 M. Murocca an V. Heuring Truth Table with Don t Cares A truth table representation of a single function with on t cares. C D B F A

Appeni B: Reuction of Digital Logic B-2 Principles of Computer Architecture by M. Murocca an V. Heuring 999 M. Murocca an V. Heuring Tabular (Quine-McCluskey) Reuction Tabular reuction begins by grouping minterms for which F is nonzero accoring to the number of s in each minterm. Don t cares are consiere to be nonzero. The net step forms a consensus (the logical form of a cross prouct) between each pair of ajacent groups for all terms that iffer in only one variable. C D B A C D B A * * * C D B A * * * Initial setup After first reuction After secon reuction (a) (b) (c)

B-2 Appeni B: Reuction of Digital Logic Table of Choice The prime implicants form a set that completely covers the function, although not necessarily minimally. A table of choice is use to obtain a minimal cover set. Prime Implicants Minterms * * * Principles of Computer Architecture by M. Murocca an V. Heuring 999 M. Murocca an V. Heuring

B-22 Appeni B: Reuction of Digital Logic Reuce Table of Choice In a reuce table of choice, the essential prime implicants an the minterms they cover are remove, proucing the eligible set. F = ABC + ABC + BD + AD Eligible Set Minterms Set Set 2 X Y Z Principles of Computer Architecture by M. Murocca an V. Heuring 999 M. Murocca an V. Heuring

B-23 Appeni B: Reuction of Digital Logic Multiple Output Truth Table The power of tabular reuction comes into play for multiple functions, in which minterms can be share among the functions. Minterm A B C F F F 2 m m m 2 m 3 m 4 m 5 m 6 m 7 Principles of Computer Architecture by M. Murocca an V. Heuring 999 M. Murocca an V. Heuring

B-24 Appeni B: Reuction of Digital Logic Multiple Output Table of Choice F (A,B,C) = ABC + BC F (A,B,C) = AC + AC + BC F 2 (A,B,C) = B Minterms Prime Implicants F F * * F (A,B,C) F (A,B,C) F 2 (A,B,C) m m 3 m 7 m m 3 m 4 m 6 m 7 m 2 m 3 m 6 m 7 F * F 2 * F,2 F,,2 * Principles of Computer Architecture by M. Murocca an V. Heuring 999 M. Murocca an V. Heuring

Simplifying Finite State Machines State Reuction: equivalent FSM with fewer states State Assignment: choose an assignment of bit patterns to states (e.g., B is ) that results in a smaller circuit Choice of flip-flops: use D flip-flops, J-K flip-flops or a T flip-flops? a goo choice coul lea to simpler circuits. UMBC, CMSC33, Richar Chang <chang@umbc.eu>

B-32 Appeni B: Reuction of Digital Logic The State Assignment Problem Two state assignments for machine M 2. Input X P.S. A B/ A/ B C/ D/ C C/ D/ D B/ A/ Input X S S A: / / B: / / C: / / D: / / Input X S S A: / / B: / / C: / / D: / / Machine M 2 State assignment SA State assignment SA Principles of Computer Architecture by M. Murocca an V. Heuring 999 M. Murocca an V. Heuring

B-33 Appeni B: Reuction of Digital Logic State Assignment SA Boolean equations for machine M 2 using state assignment SA. S S X X S S X S S S = S S + S S S = S S X + S S X + S S X + S S X Z = S S + S X + S S X Principles of Computer Architecture by M. Murocca an V. Heuring 999 M. Murocca an V. Heuring

B-34 Appeni B: Reuction of Digital Logic State Assignment SA Boolean equations for machine M 2 using state assignment SA. S S X X S S X S S S = S S = X Z = S X + S X Principles of Computer Architecture by M. Murocca an V. Heuring 999 M. Murocca an V. Heuring

State Assignment Heuristics No known efficient alg. for best state assignment Some heuristics (rules of thumb): The initial state shoul be simple to reset all zeroes or all ones. Minimize the number of state variables that change on each transition. Maimize the number of state variables that on't change on each transition. Eploit symmetries in the state iagram. If there are unuse states (when the number of states s is not a power of 2), choose the unuse state variable combinations carefully. (Don't just use the first s combination of state variables.) Decompose the set of state variables into bits or fiels that have well-efine meaning with respect to the input or output behavior. Consier using more than the minimum number of states to achieve the objectives above. UMBC, CMSC33, Richar Chang <chang@umbc.eu>

B-35 Appeni B: Reuction of Digital Logic Sequence Detector State Transition Diagram / / D B / / / E / A / / / F / / C / Input: Output: / G Time: 2 3 4 5 6 7 8 / Principles of Computer Architecture by M. Murocca an V. Heuring 999 M. Murocca an V. Heuring

B-36 Appeni B: Reuction of Digital Logic Sequence Detector State Table Present state Input X A B/ C/ B D/ E/ C F/ G/ D D/ E/ E F/ G/ F D/ E/ G F/ G/ Principles of Computer Architecture by M. Murocca an V. Heuring 999 M. Murocca an V. Heuring

Sequence Detector State Reuction Table A B C D E F G A B C D E F G UMBC, CMSC33, Richar Chang <chang@umbc.eu>

B-37 Appeni B: Reuction of Digital Logic Sequence Detector Reuce State Table Present state Input X A: A' BD: B' C: C' E: D' F: E' G: F' B'/ B'/ E'/ E'/ B'/ E'/ C'/ D'/ F'/ F'/ D'/ F'/ Principles of Computer Architecture by M. Murocca an V. Heuring 999 M. Murocca an V. Heuring

6-State Sequence Detector / B/D / E / / / / A F / / / / C / G UMBC, CMSC 33, Richar Chang <chang@umbc.eu>

B-38 Appeni B: Reuction of Digital Logic Sequence Detector State Assignment Present state Input X S 2 S S S 2 S S Z S 2 S S Z A': / / B': / / C': / / D': / / E': / / F': / / Principles of Computer Architecture by M. Murocca an V. Heuring 999 M. Murocca an V. Heuring

B-4 Appeni B: Reuction of Digital Logic Sequence Detector K-Maps K-map reuction of net state an output functions for sequence etector. S 2 S S X S = S 2 S X + S X + S 2 S + S X S 2 S S X S = S 2 S X + S 2 S X S 2 S S X S 2 S S X S 2 = S 2 S + S Principles of Computer Architecture by M. Murocca an V. Heuring Z = S 2 S X + S S X + S 2 S X 999 M. Murocca an V. Heuring

Improve Sequence Detector? Formulas from the 7-state FSM: s2 = (s + )(s2 + s + s) s = s + s = s or s = z = s2 s + s2 s Formulas from the 6-state FSM: s2 = s2 s + s s = s2 s + s2 s s = s2 s + s + s2 s + s z = s2 s + s s + s2 s UMBC, CMSC33, Richar Chang <chang@umbc.eu>

Sequence Detector State Assignment 7-state s2 s s s2' s' s' z 2 3 4 5 6 7 8 9 2 3 4 5 A = E = B = F = C = G = D = new 6-state s2 s s s2' s' s' z 2 3 4 5 6 7 8 9 2 3 4 5 A = E = B/D = F = C = G = D = UMBC, CMSC33, Richar Chang <chang@umbc.eu>

6-State Sequence Detector 7-state s2 s s2 s 4 2 8 new 6-state s2 s s2 s 4 2 8 s 5 3 9 3 7 5 2 6 4 s 5 3 9 3 7 5 2 6 4 s s s2 = (s + )(s2 + s + s) s2 = (s + )(s2 + s + s) UMBC, CMSC33, Richar Chang <chang@umbc.eu>

6-State Sequence Detector 7-state s2 s s2 s 4 2 8 new 6-state s2 s s2 s 4 2 8 s 5 3 9 3 7 5 2 6 4 s 5 3 9 3 7 5 2 6 4 s s s = s + s s = s UMBC, CMSC33, Richar Chang <chang@umbc.eu>

6-State Sequence Detector 7-state s2 s s2 s 4 2 8 new 6-state s2 s s2 s 4 2 8 s 5 3 9 3 7 5 2 6 4 s 5 3 9 3 7 5 2 6 4 s s s = s = UMBC, CMSC33, Richar Chang <chang@umbc.eu>

6-State Sequence Detector 7-state s2 s s2 s 4 2 8 new 6-state s2 s s2 s 4 2 8 s 5 3 9 3 7 5 2 6 4 s 5 3 9 3 7 5 2 6 4 s s z = s2 s + s2 s z = s2 s + s2 s UMBC, CMSC33, Richar Chang <chang@umbc.eu>

Improve Sequence Detector Tetbook formulas for the 6-state FSM: s2 = s2 s + s s = s2 s + s2 s s = s2 s + s + s2 s + s z = s2 s + s s + s2 s New formulas for the 6-state FSM: s2 = (s + )(s2 + s + s) s = s s = z = s2 s + s2 s UMBC, CMSC33, Richar Chang <chang@umbc.eu>

B-43 Appeni B: Reuction of Digital Logic Ecitation Tables Each table shows the settings that must be applie at the inputs at time t in orer to change the outputs at time t+. S-R flip-flop Q t Q t+ Q t Q t+ S J R K D flip-flop Q t Q t+ Q t Q t+ D T J-K flip-flop T flip-flop Principles of Computer Architecture by M. Murocca an V. Heuring 999 M. Murocca an V. Heuring

B-44 Appeni B: Reuction of Digital Logic Serial Aer Time (t) 4 3 2 4 3 2 Time (t) X Y C in Serial Aer Z C out i y i No carry state / / A / Carry state B / / z i / / / State transition iagram, state table, an state assignment for a serial aer. Input XY Present state A A/ A/ A/ B/ B A/ B/ B/ B/ Net state Output Present state (S t ) Input XY A: / / / / B: / / / / Principles of Computer Architecture by M. Murocca an V. Heuring 999 M. Murocca an V. Heuring

Appeni B: Reuction of Digital Logic B-45 Principles of Computer Architecture by M. Murocca an V. Heuring 999 M. Murocca an V. Heuring Serial Aer Net-State Functions Truth table showing net-state functions for a serial aer for D, S-R, T, an J-K flip-flops. Shae functions are use in the eample. Y S t X D S R J K T Z Present State (Set) (Reset)

B-46 Appeni B: Reuction of Digital Logic J-K Flip-Flop Serial Aer Circuit X Y X Y CLK J Q S K Q X Y Y Z X Principles of Computer Architecture by M. Murocca an V. Heuring 999 M. Murocca an V. Heuring

B-47 Appeni B: Reuction of Digital Logic D Flip-Flop Serial Aer Circuit X Y X Y CLK D Q S Q X Y Y Z X Principles of Computer Architecture by M. Murocca an V. Heuring 999 M. Murocca an V. Heuring

B-35 Appeni B: Reuction of Digital Logic Sequence Detector State Transition Diagram / / D B / / / E / A / / / F / / C / Input: Output: / G Time: 2 3 4 5 6 7 8 / Principles of Computer Architecture by M. Murocca an V. Heuring 999 M. Murocca an V. Heuring

6-State Sequence Detector / B/D / E / / / / A F / / / / C / G UMBC, CMSC 33, Richar Chang <chang@umbc.eu>

Improve Sequence Detector? Formulas from the 7-state FSM: s2 = (s + )(s2 + s + s) s = s + s = s or s = z = s2 s + s2 s Formulas from the 6-state FSM: s2 = s2 s + s s = s2 s + s2 s s = s2 s + s + s2 s + s z = s2 s + s s + s2 s UMBC, CMSC33, Richar Chang <chang@umbc.eu>

Sequence Detector State Assignment 7-state s2 s s s2' s' s' z 2 3 4 5 6 7 8 9 2 3 4 5 A = E = B = F = C = G = D = new 6-state s2 s s s2' s' s' z 2 3 4 5 6 7 8 9 2 3 4 5 A = E = B/D = F = C = G = D = UMBC, CMSC33, Richar Chang <chang@umbc.eu>

Improve Sequence Detector Tetbook formulas for the 6-state FSM: s2 = s2 s + s s = s2 s + s2 s s = s2 s + s + s2 s + s z = s2 s + s s + s2 s New formulas for the 6-state FSM: s2 = (s + )(s2 + s + s) s = s s = z = s2 s + s2 s UMBC, CMSC33, Richar Chang <chang@umbc.eu>

6-State Sequence Detector s2 s s s2' s' s' z j2 k2 j k j k 2 3 4 5 6 7 8 9 Q Q' J K 2 3 4 5 UMBC, CMSC33, Richar Chang <chang@umbc.eu>

6-State Sequence Detector J2 s2 s s2 s 4 2 8 K2 s2 s s2 s 4 2 8 s 5 3 9 3 7 5 2 6 4 s 5 3 9 3 7 5 2 6 4 s s J2 = s + s K2 = s UMBC, CMSC33, Richar Chang <chang@umbc.eu>

6-State Sequence Detector J s2 s s2 s 4 2 8 K s2 s s2 s 4 2 8 s 5 3 9 3 7 5 2 6 4 s 5 3 9 3 7 5 2 6 4 s s J = s K = UMBC, CMSC33, Richar Chang <chang@umbc.eu>

6-State Sequence Detector J s2 s s2 s 4 2 8 K s2 s s2 s 4 2 8 s 5 3 9 3 7 5 2 6 4 s 5 3 9 3 7 5 2 6 4 s s J = K = UMBC, CMSC33, Richar Chang <chang@umbc.eu>

Improve Sequence Detector Formulas for the 6-state FSM with D Flip-flops: s2 = (s + )(s2 + s + s) s = s s = Formulas for the 6-state FSM with J-K Flip-flops: J2 = s + s J = s J = K2 = s K = K = UMBC, CMSC33, Richar Chang <chang@umbc.eu>

CMSC 33 Computer Organization & Assembly Language Programming Section Fall 24 Homework 5 Due: Tuesay, December 7, 23. ( points) Question A.3, page 494, Murocca & Heuring 2. ( points) Question A.29, page 497, Murocca & Heuring 3. ( points) Question B., page 542, Murocca & Heuring 4. ( points) Question B., page 542, Murocca & Heuring 5. (6 points) This problem asks you to take the steps involve in the esign process of a finite state machine. You will esign a finite state machine that has a one bit input an a one bit output z. Themachinemustoutputforeveryinputsequenceening in the string or. The output shoul be in all other cases. [Aapte from Contemporary Logic Design, Rany H.Katz,Benjamin/Cummings Publishing, 994.] (a) ( points) In the space provie on the net page, raw the minimumstatetransition iagram for the finite state machine escribe above. You must use the state-minimization algorithm escribe in class to show that the finite state machine has the minimum number of states. (Hint: You shoul have fewer than 8statesinyourmachine.) (b) (5 points) Use the state assignment heuristics escribe in class an pick two ifferent state assignments for your finite state machine. Note: the bit pattern for the initial state must be. (c) (4 points) For each of the two state assignments: i. Fill in the truth tables with values for D flip-flops, for the output bit an for J-K flip-flops. ii. Use the Karnaugh maps provie to minimize the formulas for each column of the truth table. iii. Count the number of gates neee for each implementation. () (5 points) Shoul you use your first or secon state assignment? D flip-flops or J-K flip-flops? Note: Keep a copy of your work for the last question. You will nee it for DigSim Assignment 3.

CMSC 33 Homework 5 Name: Minimize State Transition Diagram (show work) State Assignment: A B C D E F unuse unuse Assignment # Assignment#2

ASSIGNMENT # Ecitation Table for J-K Flip-Flops Q Q' J K Truth Table: s2 s s s2' s' s' z j2 k2 j k j k 2 3 4 5 6 7 8 9 2 3 4 5

Assignment #: Karnaugh Maps for D Flip-Flops an the output s2 s2 s s 4 2 8 s2 s2 s s 4 2 8 5 3 9 5 3 9 3 7 5 3 7 5 s 2 6 4 s 2 6 4 s s s2 = s = # of gates = # of gates = s2 s2 s s 4 2 8 s2 s2 s s 4 2 8 5 3 9 5 3 9 3 7 5 3 7 5 s 2 6 4 s 2 6 4 s s s = z = # of gates = # of gates = Total # of gates for D flip-flops (on t count z) =

Assignment #: Karnaugh Maps for J-K Flip-Flops s2 s2 s s 4 2 8 s2 s2 s s 4 2 8 5 3 9 5 3 9 3 7 5 3 7 5 s 2 6 4 s 2 6 4 s j2 = k2 = # of gates = # of gates = s s2 s2 s s 4 2 8 s2 s2 s s 4 2 8 5 3 9 5 3 9 3 7 5 3 7 5 s 2 6 4 s 2 6 4 s j = k = # of gates = # of gates = s s2 s2 s s 4 2 8 s2 s2 s s 4 2 8 5 3 9 5 3 9 3 7 5 3 7 5 s 2 6 4 s 2 6 4 s j = k = # of gates = # of gates = s Total # of gates for J-K flip-flops (on t count z) =

ASSIGNMENT #2 Ecitation Table for J-K Flip-Flops Q Q' J K Truth Table: s2 s s s2' s' s' z j2 k2 j k j k 2 3 4 5 6 7 8 9 2 3 4 5

Assignment #2: Karnaugh Maps for D Flip-Flops an the output s2 s2 s s 4 2 8 s2 s2 s s 4 2 8 5 3 9 5 3 9 3 7 5 3 7 5 s 2 6 4 s 2 6 4 s s s2 = s = # of gates = # of gates = s2 s2 s s 4 2 8 s2 s2 s s 4 2 8 5 3 9 5 3 9 3 7 5 3 7 5 s 2 6 4 s 2 6 4 s s s = z = # of gates = # of gates = Total # of gates for D flip-flops (on t count z) =

Assignment #2: Karnaugh Maps for J-K Flip-Flops s2 s2 s s 4 2 8 s2 s2 s s 4 2 8 5 3 9 5 3 9 3 7 5 3 7 5 s 2 6 4 s 2 6 4 s j2 = k2 = # of gates = # of gates = s s2 s2 s s 4 2 8 s2 s2 s s 4 2 8 5 3 9 5 3 9 3 7 5 3 7 5 s 2 6 4 s 2 6 4 s j = k = # of gates = # of gates = s s2 s2 s s 4 2 8 s2 s2 s s 4 2 8 5 3 9 5 3 9 3 7 5 3 7 5 s 2 6 4 s 2 6 4 s j = k = # of gates = # of gates = s Total # of gates for J-K flip-flops (on t count z) =