Quiz 2 Solutions Room 10 Evans Hall, 2:10pm Tuesday April 2 (Open Katz only, Calculators OK, 1hr 20mins)

Similar documents
Quiz 2 Room 10 Evans Hall, 2:10pm Tuesday April 2 (Open Katz only, Calculators OK, 1hr 20mins)

BER KELEY D AV IS IR VINE LOS AN GELES RIVERS IDE SAN D IEGO S AN FRANCISCO

Final Exam. ECE 25, Spring 2008 Thursday, June 12, Problem Points Score Total 90

CPE100: Digital Logic Design I

ECE20B Final Exam, 200 Point Exam Closed Book, Closed Notes, Calculators Not Allowed June 12th, Name

The University of Michigan Department of Electrical Engineering and Computer Science. EECS 270 Fall Practice Final Exam.

Fundamentals of Digital Design

Practice Final Exam Solutions

Combinational Logic. By : Ali Mustafa

Sample Test Paper - I

Digital Logic: Boolean Algebra and Gates. Textbook Chapter 3

CSE 140L Spring 2010 Lab 1 Assignment Due beginning of the class on 14 th April

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

Homework Assignment #1 Solutions EE 477 Spring 2017 Professor Parker

Digital Logic Design - Chapter 4

For smaller NRE cost For faster time to market For smaller high-volume manufacturing cost For higher performance

CPE100: Digital Logic Design I

Written exam for IE1204/5 Digital Design with solutions Thursday 29/

Boolean Logic Continued Prof. James L. Frankel Harvard University

Synchronous Sequential Circuit

11.1 As mentioned in Experiment 10, sequential logic circuits are a type of logic circuit where the output of

Written exam with solutions IE Digital Design Friday 21/

DO NOT COPY DO NOT COPY

Department of Electrical & Electronics EE-333 DIGITAL SYSTEMS

LOGIC CIRCUITS. Basic Experiment and Design of Electronics

Digital Logic (2) Boolean Algebra

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

Numbers & Arithmetic. Hakim Weatherspoon CS 3410, Spring 2012 Computer Science Cornell University. See: P&H Chapter , 3.2, C.5 C.

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

DE58/DC58 LOGIC DESIGN DEC 2014

04. What is the Mod number of the counter circuit shown below? Assume initially reset.

EE40 Lec 15. Logic Synthesis and Sequential Logic Circuits

Different encodings generate different circuits

University of Toronto Faculty of Applied Science and Engineering Final Examination

Chapter 3 Combinational Logic Design

The Design Procedure. Output Equation Determination - Derive output equations from the state table

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

Digital Logic Appendix A

LOGIC CIRCUITS. Basic Experiment and Design of Electronics. Ho Kyung Kim, Ph.D.

CPE/EE 422/522. Chapter 1 - Review of Logic Design Fundamentals. Dr. Rhonda Kay Gaede UAH. 1.1 Combinational Logic

DHANALAKSHMI COLLEGE OF ENGINEERING, CHENNAI DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING CS6201 DIGITAL PRINCIPLES AND SYSTEM DESIGN

CSC9R6 Computer Design. Practical Digital Logic

Parity Checker Example. EECS150 - Digital Design Lecture 9 - Finite State Machines 1. Formal Design Process. Formal Design Process

Vidyalankar S.E. Sem. III [CMPN] Digital Logic Design and Analysis Prelim Question Paper Solution

Numbers and Arithmetic

ENGIN 112 Intro to Electrical and Computer Engineering

COMBINATIONAL LOGIC FUNCTIONS

Reg. No. Question Paper Code : B.E./B.Tech. DEGREE EXAMINATION, NOVEMBER/DECEMBER Second Semester. Computer Science and Engineering

University of California at Berkeley College of Engineering Department of Electrical Engineering and Computer Sciences

Total Time = 90 Minutes, Total Marks = 50. Total /50 /10 /18

DESIGN AND IMPLEMENTATION OF ENCODERS AND DECODERS. To design and implement encoders and decoders using logic gates.

Boolean Algebra. Digital Logic Appendix A. Boolean Algebra Other operations. Boolean Algebra. Postulates, Identities in Boolean Algebra

ENG2410 Digital Design Combinational Logic Circuits

ECE 2300 Digital Logic & Computer Organization

Chapter 4. Combinational: Circuits with logic gates whose outputs depend on the present combination of the inputs. elements. Dr.

Chapter 9 Asynchronous Sequential Logic

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

COMPUTER SCIENCE TRIPOS

Systems I: Computer Organization and Architecture

CS1800 Discrete Structures Fall 2016 Profs. Gold & Schnyder April 25, CS1800 Discrete Structures Final

DIGITAL LOGIC CIRCUITS

Synchronous Sequential Logic

UNIVERSITI TENAGA NASIONAL. College of Information Technology

Simplify the following Boolean expressions and minimize the number of literals:

We are here. Assembly Language. Processors Arithmetic Logic Units. Finite State Machines. Circuits Gates. Transistors

Cs302 Quiz for MID TERM Exam Solved

Section 3: Combinational Logic Design. Department of Electrical Engineering, University of Waterloo. Combinational Logic

CprE 281: Digital Logic

Written reexam with solutions for IE1204/5 Digital Design Monday 14/

University of Minnesota Department of Electrical and Computer Engineering

Problem Set 9 Solutions

Adders, subtractors comparators, multipliers and other ALU elements

CprE 281: Digital Logic

EECS Components and Design Techniques for Digital Systems. FSMs 9/11/2007

Lecture 10: Synchronous Sequential Circuits Design

Latches. October 13, 2003 Latches 1

CS1800 Discrete Structures Final Version A

COMBINATIONAL LOGIC CIRCUITS. Dr. Mudathir A. Fagiri

Computer Science 324 Computer Architecture Mount Holyoke College Fall Topic Notes: Digital Logic

ELEN Electronique numérique

Logic Design II (17.342) Spring Lecture Outline

Introduction to Karnaugh Maps

211: Computer Architecture Summer 2016

WORKBOOK. Try Yourself Questions. Electrical Engineering Digital Electronics. Detailed Explanations of

Synchronous Sequential Circuit Design. Digital Computer Design

EGR224 F 18 Assignment #4

Combinational Logic Design Combinational Functions and Circuits

Binary addition (1-bit) P Q Y = P + Q Comments Carry = Carry = Carry = Carry = 1 P Q

Numbers and Arithmetic

MODULAR CIRCUITS CHAPTER 7

CSE 140 Midterm 2 Tajana Simunic Rosing. Spring 2008

University of Florida EEL 3701 Fall 2014 Dr. Eric. M. Schwartz Department of Electrical & Computer Engineering Wednesday, 15 October 2014

Floating Point Representation and Digital Logic. Lecture 11 CS301

15.1 Elimination of Redundant States

MASSACHUSETTS INSTITUTE OF TECHNOLOGY Department of Electrical Engineering and Computer Sciences

XI STANDARD [ COMPUTER SCIENCE ] 5 MARKS STUDY MATERIAL.

EET 310 Flip-Flops 11/17/2011 1

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

S.Y. Diploma : Sem. III [DE/ED/EI/EJ/EN/ET/EV/EX/IC/IE/IS/IU/MU] Principles of Digital Techniques

UNIVERSITY OF WISCONSIN MADISON

Transcription:

UNIVERSITY OF CALIFORNIA AT BERKELEY ERKELEY DAVIS IRVINE LOS ANGELES RIVERSIDE SAN DIEGO SAN FRANCISCO SANTA BARBARA SANTA CRUZ Department of Electrical Engineering and Computer Sciences Quiz 2 Solutions Room Evans Hall, 2:pm Tuesday April 2 (Open Katz only, Calculators OK, hr 2mins) CS 5 - Spring 996 Prof. A. R. Newton Include all final answers in locations indicated. Use space provided for all working and state all assumptions. If necessary attach additional sheets by staple at the end. BE SURE TO WRITE YOUR NAME ON EVERY SHEET. () You are to design a four-input priority encoder, shown below, such that when two inputs, D i and D j, are high simultaneously, D i has priority over D j when i>j. The encoder produces a binary output code (f f ) corresponding to the input that has the highest priority. The circuit should also have an enable input, E, such that (f f ) are set to () when E is low, and an output P which indicates the presence of data ( s) on any of the inputs. inputs D D D 2 D 3 E f f P priority output input present Enable (a) Show a truth-table for the priority encoder, in terms of D to D 3 only, and derive the logic equations for f and f. Express the logic equations using a minimum number of literals. (a) (pts) D D D 2 D 3 f f - - - - - - - - You lost points if you did not indicate the output don t cares for the case. f = D 3 + D (D 2 ) f = D 2 + D 3 Quiz 2 Solutions Page of 8 CS 5 - Sp. 96

(b) Draw a schematic diagram for the entire priority encoder, including output P and input E in the schematic, using a minimum number of NAND, OR, and inverter gates only. Assume complements are not available. (b) (pts) P D D D 2 f D 3 E f Additional space for Problem CS 5 - Sp. 96 Page 2 of 8 Quiz 2 Solutions

(2) (a) For the following state table, where x is the input and Z is the output: PS NS Z x= x= A B C B A C C D C D D E E A F F B G G A E (i) Use an implication table to identify and eliminate all redundant states. Show your final implication table and the state table with no redundancy. (ii) Show a state graph for the final irredundant machine. Include all information on the graph, including inputs and outputs. 2(a) (pts) Equivalent states from implication table are (AB) fi A, (C) fi C, (D) fi D, (EFG) fi E A/ C/ E/ D/ Quiz 2 Solutions Page 3 of 8 CS 5 - Sp. 96

2(b) Considering the definition of setup time for a latch, is it possible for the setup time for a latch to be negative? If so, under what conditions can the setup time for a latch be negative? State all the conditions you can think of and illustrate with an example, where possible. 2(b) (pts) Katz defines setup time as the minimum time interval preceding the clock event during which the input must be stable to be validly recognized. If the setup time were negative, that would mean that the input could change (need not be stable) for up to T su after the clock event. This would only be possible if the circuitry from the latch input to the clocked storage element was faster than the delay from the clock edge on the clock pin to the internal storing event in the latch. In fact, this is the case in a number of practical latches. For example, certain Altera PLD families have negative setup-time latches (see the spec. sheets). This is often achieved by using a very fast Schmitt trigger circuit on the input to the latch to speed up the input. Such latches are very effective in helping to speed up the overall performance of a circuit; something not possible with the more conservative Xilinx parts. Another way of viewing the situation is to imagine a very slow clock input transition while having a fast transition on the inputs. CS 5 - Sp. 96 Page 4 of 8 Quiz 2 Solutions

(3) This problem concerns a base-(-2) (base-(minus-two)) adder. In CS5, we only considered number systems with positive bases (in particular, the binary, or base-2, system). For example, in a base-3 system, the number ABCD 3 is equal to: ABCD 3 = A*3 3 + B*3 2 + C*3 + D*3. So for a base-(-2) system, EFGH -2 would be computed using: EFGH -2 = E*(-2) 3 + F*(-2) 2 + G*(-2) + H*(-2) (a) Convert the following decimal numbers to base-(-2). Use as many bits as you need. 3(a) (8pts) 5 = -2 6 = -2-7 = -2 = -2 (b) For the purpose of this problem, we define a number system as contiguous if, given any two integer values m and n which can be represented in the number system, there exists no integer value x, with m< x < n, that cannot be represented in the system. For example, a -bit decimal system is contiguous. It can represent the counting numbers -9, and there are no numbers in between and 9 which cannot be represented using one decimal digit. The binary number system (base 2) is also contiguous. (i) Is a four-bit base-(-2) system contiguous? (ii) What are the maximum and minimum values (in decimal) that can be represented by a four-bit base-(-2) system? (iii) Is an n-bit base-(-2) system contiguous, where n is any positive integer? Justify your answer. 3(b) (6pts) (i) yes (ii) Maximum = 5 Minimum = - (iii) yes For any negative bit, b i, the associated positive value is found by adding the next bit, b i+. However, since +2 n is contiguous, then -2 n must also be contiguous. Quiz 2 Solutions Page 5 of 8 CS 5 - Sp. 96

(c) Add the following numbers in base-(-2). Pay close attention to the carry-in and carry-out aspects because they are important in Part (d) 3(c) (2pts) -2 + -2 = -2 (d) Draw a truth table for a one-bit bit slice of a base-(-2) adder. Assume one bit of carry-in. You must determine the specification for the carry-out. 3(d) (4pts) C i A i B i S i C i+ C i+2 Additional space for Problem 3 CS 5 - Sp. 96 Page 6 of 8 Quiz 2 Solutions

(4) (a) For the two-input primitive flow table shown on the right, obtain the merged flow table by merging states to produce a table with the minimum possible number of rows. Show your merger diagram (graph). Assume all outputs are the same value. Do not attempt to reduce the table by eliminating equivalent states first; all states must appear in your final answer. x x2 5 6 2 - - 2-5 3 2 4 5 3 - - 5 6 2 4 5 - - 4. (a) (pts) Merger diagram and minimum-row merged flow table 6 2 x x2 5 4 3 5 6 2 4 5 3 2 Merger Diagram Minimum-row merged flow table Additional space for Problem 4(a) Quiz 2 Solutions Page 7 of 8 CS 5 - Sp. 96

(4) (b) Obtain a race-free state assignment for the merged flow table shown on the right (not related to part 4(a)) using as few additional states as possible. List all adjacency constraints. Show all steps and your final state-codes. (Hint: three state variables are required.) x x2 2 3 4 7 6 3 5 7 6 8 4 7 2 3 5 4. (b) (pts) a b a b c d g c e f d a b c d e f g x x2 a a b g c b b d c b c c e f b d c - - - - a - - - - - c Q3 Q Q2 b c 2 3 g - 6 7 a d e f 4 5 If you noted that in fact, under the fundamental mode assumption, the 2 in the final row is really a don tcare, and that as a result we only need two additional states really (i.e. we don t need state f above), you were given bonus points. Additional space for Problem 4(b) CS 5 - Sp. 96 Page 8 of 8 Quiz 2 Solutions

Quiz 2 Solutions Page 9 of 8 CS 5 - Sp. 96