UNIVERSITY OF WISCONSIN MADISON

Similar documents
CS/ECE 252: INTRODUCTION TO COMPUTER ENGINEERING COMPUTER SCIENCES DEPARTMENT UNIVERSITY OF WISCONSIN-MADISON

Digital Logic: Boolean Algebra and Gates. Textbook Chapter 3

Introduction to Computer Engineering. CS/ECE 252, Fall 2012 Prof. Guri Sohi Computer Sciences Department University of Wisconsin Madison

Digital Logic. CS211 Computer Architecture. l Topics. l Transistors (Design & Types) l Logic Gates. l Combinational Circuits.

CPE100: Digital Logic Design I

Computer Science Final Examination Friday December 14 th 2001

UNIT 8A Computer Circuitry: Layers of Abstraction. Boolean Logic & Truth Tables

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

Review for Final Exam

Lecture 7: Logic design. Combinational logic circuits

Finite State Machine (FSM)

King Fahd University of Petroleum and Minerals College of Computer Science and Engineering Computer Engineering Department

CSE140: Components and Design Techniques for Digital Systems. Midterm Information. Instructor: Mohsen Imani. Sources: TSR, Katz, Boriello & Vahid

Lecture 13: Sequential Circuits, FSM

CMPE12 - Notes chapter 1. Digital Logic. (Textbook Chapter 3)

CSE 140 Midterm 2 - Solutions Prof. Tajana Simunic Rosing Spring 2013

CSE 140 Midterm 2 Tajana Simunic Rosing. Spring 2008

Sample Test Paper - I

University of Guelph School of Engineering ENG 2410 Digital Design Fall There are 7 questions, answer all questions.

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

Philadelphia University Student Name: Student Number:

Philadelphia University Student Name: Student Number:

Department of Electrical and Computer Engineering University of Wisconsin Madison. Fall Final Examination

Appendix B. Review of Digital Logic. Baback Izadi Division of Engineering Programs

Chapter 3 Digital Logic Structures

CS/COE1541: Introduction to Computer Architecture. Logic Design Review. Sangyeun Cho. Computer Science Department University of Pittsburgh

Synchronous Sequential Circuit Design. Digital Computer Design

Introduction to Computer Engineering. CS/ECE 252, Spring 2017 Rahul Nayar Computer Sciences Department University of Wisconsin Madison

ALU A functional unit

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

Combinational vs. Sequential. Summary of Combinational Logic. Combinational device/circuit: any circuit built using the basic gates Expressed as

Boolean Algebra and Digital Logic 2009, University of Colombo School of Computing

CPE100: Digital Logic Design I

CMPE12 - Notes chapter 2. Digital Logic. (Textbook Chapters and 2.1)"

Latches. October 13, 2003 Latches 1

Fundamentals of Digital Design

UNIVERSITI TENAGA NASIONAL. College of Information Technology

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

Combinatorial Logic Design Multiplexers and ALUs CS 64: Computer Organization and Design Logic Lecture #13

Combinational Logic. By : Ali Mustafa

P2 (10 points): Given the circuit below, answer the following questions:

Sequential Logic Circuits

EE 209 Logic Cumulative Exam Name:

Lecture 13: Sequential Circuits, FSM

Digital Logic Design. Midterm #2

Enrico Nardelli Logic Circuits and Computer Architecture

Logic and Computer Design Fundamentals. Chapter 8 Sequencing and Control

Boolean Logic Continued Prof. James L. Frankel Harvard University

ECE 341. Lecture # 3

Outline. policies for the first part. with some potential answers... MCS 260 Lecture 10.0 Introduction to Computer Science Jan Verschelde, 9 July 2014

CprE 281: Digital Logic

Logic design? Transistor as a switch. Layered design approach. CS/COE1541: Introduction to Computer Architecture. Logic Design Review.

Logic Design. CS 270: Mathematical Foundations of Computer Science Jeremy Johnson

ELCT201: DIGITAL LOGIC DESIGN

EE40 Lec 15. Logic Synthesis and Sequential Logic Circuits

Chapter 4. Sequential Logic Circuits

King Fahd University of Petroleum and Minerals College of Computer Science and Engineering Computer Engineering Department

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

Number System. Decimal to binary Binary to Decimal Binary to octal Binary to hexadecimal Hexadecimal to binary Octal to binary

CS/COE0447: Computer Organization

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

Exam for Physics 4051, October 31, 2008

Synchronous Sequential Logic

DE58/DC58 LOGIC DESIGN DEC 2014

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

Different encodings generate different circuits

University of Toronto Faculty of Applied Science and Engineering Edward S. Rogers Sr. Department of Electrical and Computer Engineering

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

Lecture 10: Synchronous Sequential Circuits Design

Verilog HDL:Digital Design and Modeling. Chapter 11. Additional Design Examples. Additional Figures

Dr. S. Shirani COE2DI4 Midterm Test #2 Nov. 9, 2010

Adders, subtractors comparators, multipliers and other ALU elements

CS470: Computer Architecture. AMD Quad Core

State and Finite State Machines

DIGITAL LOGIC CIRCUITS

Adders, subtractors comparators, multipliers and other ALU elements

Lecture 14: State Tables, Diagrams, Latches, and Flip Flop

ELCT201: DIGITAL LOGIC DESIGN

Basic Computer Organization and Design Part 3/3

CS61C : Machine Structures

EECS 270 Midterm 2 Exam Answer Key Winter 2017

Chapter 7. Sequential Circuits Registers, Counters, RAM

Lecture 17: Designing Sequential Systems Using Flip Flops

Chapter 5. Digital Design and Computer Architecture, 2 nd Edition. David Money Harris and Sarah L. Harris. Chapter 5 <1>

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

XI STANDARD [ COMPUTER SCIENCE ] 5 MARKS STUDY MATERIAL.

CS61C : Machine Structures

Computer Science. Questions for discussion Part II. Computer Science COMPUTER SCIENCE. Section 4.2.

Sequential Logic (3.1 and is a long difficult section you really should read!)

Counters. We ll look at different kinds of counters and discuss how to build them

ECE/CS 250: Computer Architecture. Basics of Logic Design: Boolean Algebra, Logic Gates. Benjamin Lee

PAST EXAM PAPER & MEMO N3 ABOUT THE QUESTION PAPERS:

CS/COE0447: Computer Organization

Topics. CMOS Design Multi-input delay analysis. John A. Chandy Dept. of Electrical and Computer Engineering University of Connecticut

Appendix A: Digital Logic. Principles of Computer Architecture. Principles of Computer Architecture by M. Murdocca and V. Heuring

Computer Engineering Department. CC 311- Computer Architecture. Chapter 4. The Processor: Datapath and Control. Single Cycle

CMPT-150-e1: Introduction to Computer Design Final Exam

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

ECE 2300 Digital Logic & Computer Organization

The course web site s notes entitled Switches, Gates and Circuits which can be found at will be useful to you throughout the lab.

Transcription:

CS/ECE 252: INTRODUCTION TO COMPUTER ENGINEERING UNIVERSITY OF WISCONSIN MADISON Prof. Gurindar Sohi TAs: Minsub Shin, Lisa Ossian, Sujith Surendran Midterm Examination 2 In Class (50 minutes) Friday, October 24, 2014 Weight: 17.5% NO: BOOK(S), NOTE(S), OR CALCULATORS OF ANY SORT. The exam has nine pages. Circle your final answers. Plan your time carefully since some problems are longer than others. You must turn in the pages 1-9. Use the blank sides of the exam for scratch work. LAST NAME: FIRST NAME: ID#: 1

Problem 1 (4 Points) Consider the logic equation Z = B OR (A AND C). a. (1 point) Draw a gate-level circuit for Z using NOT gates and 2-input AND/OR gates. b. (1 points) Draw a gate-level circuit for Z using only 2-input NAND gates. c. (2 points) Implement a logic circuit for Z using a 4x1 multiplexer where B and C are connected to the select lines. Draw your answer using the 4x1 multiplexer below. Do not use any additional logic gates. 2

Problem 2 (6 Points) The finite state machine (FSM) below (in Figure 1(a)) recognizes a certain bit sequence. The machine takes one input every clock cycle, which can be 1 or 0. The machine outputs a 1 when this certain bit sequence is recognized; otherwise it outputs a 0. Each state is represented as S 1S 0. For example, the state marked as 01 has S 1 = 0, and S 0 = 1. X is the output in each state. S 1 S 0 represents the next state and the labels on each transition is the input value that triggers the transition. Assume that the initial state is 00. a. (2 points) Complete the Next State truth table above for the FSM. b. (3 Points) Draw the logic circuit which implements the above FSM using combinational logic and flip flops. Use representation shown in figure 1(b) for any 1-bit flip flop required in the circuit (where CLK is the clock). You can use any kind of logic gates for implementing the combinational logic. Note: You should implement both the states (S1,S0) as well as the output (X). 3

c. (1 point) Which bit sequence does the above FSM recognize? Your answer should be a string of bits (e.g, 1001 or 11001 ). 110 Problem 3 (3 Points) Consider the following circuit containing a multiplexer, a single-bit full adder and a decoder. X and Y are inputs to this circuit, and the circuit produces an output Z. Fill in the truth table below for this combinational circuit. X Y Z 0 0 1 0 1 1 1 0 0 1 1 0 4

Problem 4 (5 Points) Consider the logic equation Z = NOT(A AND NOT(NOT(C) AND NOT(B))). (Hint: You may want to use DeMorgan s law to simplify the equation.) a. (2 points) Fill out the following truth table for Z. A B C Z 0 0 0 1 0 0 1 1 0 1 0 1 0 1 1 1 1 0 0 1 1 0 1 0 1 1 0 0 1 1 1 0 b. (3 points) Label the inputs on the transistor-level circuit below so that the circuit implements the logic function Z. 5

Problem 5 (3 Points) Suppose a 32-bit instruction takes the following format: OPCODE SR DR UNUSED IMM Where SR = source register, DR= destination register, IMM = immediate value Assuming that there are 400 opcodes and the IMM field is 11-bits wide, answer the following: a. (1 point) What is the minimum number of bits required to represent the OPCODE? 2 9 = 512 > 400, so 9 bits b. (1 point) If the source register (SR) and destination register (DR) each have 5 bits, what is the maximum number of registers supported by this instruction set architecture? 2 5 = 32 registers c. (1 point) If the UNUSED bits were instead used for the register fields (SR and DR), how many more registers could we have in our computer? 32 9 5 5 11 = 2 bits in the UNUSED field. This means we can give 2/2 =1 bit to each the SR and DR field. So, we could represent 2 6 2 5 = 32 more registers 6

Problem 6 (9 Points) a. (1 point) What is the addressability (number of bytes per memory location) of a 1024 byte memory which uses 9 bits for each memory address? Show your work. 1024 bytes = 2 10 = 2 10 2 3 bits 2 13 bits 2 9 bits = 2 4 bits = 16 bits b. (2 points) How many different n-input Boolean functions are possible? Show your work. Given n inputs, 2 2n functions are possible. c. (1 point) How many select lines does an n-input mux have? Let n = 2 y, since we know n must be a power of 2. The number of select lines is y, or log 2 n. >> log 2 n d. (1 point) How many outputs does an n-input decoder have? A decoder has n inputs and 2 n outputs 7

e. (1 point) Mention two important things that happen during the FETCH phase of the instruction cycle. Increment PC Read the instruction, store in IR f. (2 points) How many n-type transistors are present in a 16-bit wide register? Show your work. Each Gated D latch has 4 NAND gates and 1 inverter. Each NAND gate has 2 n-type transistors, and each inverter has 1 n-type transistor. Therefore, we have 16*4*2 + 16 = 144 n-type transistors. g. (1 Point) Which of the following stages of instruction processing are required for the processing of an ADD instruction which reads value of 2 registers and stores the final value into another register. Circle all that apply: Fetch Decode Evaluate address Fetch operands from the memory Execute Operation Store result 8