CS/ECE 252 Introduction to Computer Engineering

Similar documents
CS/ECE 252: INTRODUCTION TO COMPUTER ENGINEERING UNIVERSITY OF WISCONSIN MADISON. Instructor: Rahul Nayar TAs: Annie Lin, Mohit Verma

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

ECE/CS 252 Fall 2011 Homework 4 (25 points) // Due in Lecture Mon Oct. 17, 2011

CS 265. Computer Architecture. Wei Lu, Ph.D., P.Eng.

CS/ECE 252: INTRODUCTION TO COMPUTER ENGINEERING UNIVERSITY OF WISCONSIN MADISON. Instructor: Rahul Nayar TAs: Annie Lin, Mohit Verma

CS 2461: Computer Architecture I

Intro. to Computer Architecture Homework 4 CSE 240 Autumn 2005 DUE: Mon. 10 October 2005

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

Department of Electrical and Computer Engineering The University of Texas at Austin

Von Neumann Architecture

LC3DataPath ECE2893. Lecture 9a. ECE2893 LC3DataPath Spring / 14

Inf2C - Computer Systems Lecture Processor Design Single Cycle

Introduction to Computer Engineering. CS/ECE 252 Prof. Mark D. Hill Computer Sciences Department University of Wisconsin Madison

Copyright The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Computing Layers

ECE 2030B 1:00pm Computer Engineering Spring problems, 5 pages Exam Two 10 March 2010

ECE 331: N0. Professor Andrew Mason Michigan State University. Opening Remarks

Chapter 4 The Von Neumann Model

CS 200: Computer Organization

HANSABA COLLEGE OF ENGINEERING & TECHNOLOGY (098) SUBJECT: DIGITAL ELECTRONICS ( ) Assignment

Copyright The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Computing Layers

For Example: P: LOAD 5 R0. The command given here is used to load a data 5 to the register R0.

The LC3's micro-coded controller ("useq") is nothing more than a finite-state machine (FSM). It has these inputs:

PART B. 3. Minimize the following function using K-map and also verify through tabulation method. F (A, B, C, D) = +d (0, 3, 6, 10).

CS 151 Final. Q1 Q2 Q3 Q4 Q5 Total Credit Score. Instructions: Student ID. (Last Name) (First Name) Signature

6.823 Computer System Architecture Datapath for DLX Problem Set #2

CS 31: Intro to Systems Digital Logic. Kevin Webb Swarthmore College February 3, 2015

Let s put together a Manual Processor

KING FAHD UNIVERSITY OF PETROLEUM & MINERALS COMPUTER ENGINEERING DEPARTMENT

Final Exam Solution Sunday, December 15, 10:05-12:05 PM

University of Toronto Mississauga. Flip to the back cover and write down your name and student number.

Storage Elements & Sequential Circuits

Philadelphia University Student Name: Student Number:

CPU ARCHITECTURE. QUESTION 1 Explain how the width of the data bus and system clock speed affect the performance of a computer system.

Design of Digital Circuits ( L) ETH Zürich, Spring 2017

Computing Layers. Chapter 3 Digital Logic Structures. Combinational vs. Sequential. State Machine. Another type of sequential circuit

Final Exam Fall 2007

Chapter 5: The Processor: Datapath and Control

Code No: 07A3EC03 Set No. 1

Student Number: UTORid: Question 0. [1 mark] Read and follow all instructions on this page, and fill in all fields.

EPC6055 Digital Integrated Circuits EXAM 1 Fall Semester 2013

Combinational vs. Sequential. State Machine. Computing Layers. Chapter 3 Digital Logic Structures. ! Another type of sequential circuit

LC-3 Instruction Processing

CS 31: Intro to Systems Digital Logic. Kevin Webb Swarthmore College February 2, 2016

CS 2506 Computer Organization II Test 1. Do not start the test until instructed to do so! printed

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

ENEL Digital Circuits Midterm Examination

ELEC 5200/6200 Computer Architecture and Design Spring 2017 Lecture 4: Datapath and Control

Lecture 10: Simple Data Path

Code No: R Set No. 1

CSE A215 Assembly Language Programming for Engineers

Chapter 4 The Von Neumann Model

EE 3170 Microcontroller Applications

University of California, Berkeley College of Engineering

Reference Sheet for C112 Hardware

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

UNIVERSITY OF CALIFORNIA, DAVIS Department of Electrical and Computer Engineering. EEC180B DIGITAL SYSTEMS II Fall 1999

Code No: R Set No. 1

Lec-6-HW-2-digitalDesign

LC-3 Instruction Processing. (Textbook s Chapter 4)

Finite State Machines (FSMs) and RAMs and CPUs. COS 116, Spring 2011 Sanjeev Arora

Chapter 5: Computer Systems Organization

Year 10 OCR GCSE Computer Science (9-1)

Grading: 3 pts each part. If answer is correct but uses more instructions, 1 pt off. Wrong answer 3pts off.

Chapter 5: Computer Systems Organization. Invitation to Computer Science, C++ Version, Third Edition

Chapter 9 Computer Design Basics

MIDTERM EXAM March 28, 2018

Written exam for IE1204/5 Digital Design Thursday 29/

ECE 2020B Fundamentals of Digital Design Spring problems, 6 pages Exam Two 26 February 2014

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

Chapter 4 The Von Neumann Model

NAME: 1a. (10 pts.) Describe the characteristics of numbers for which this floating-point data type is well-suited. Give an example.

Transistor: Digital Building Blocks

ECE 2030D Computer Engineering Spring problems, 5 pages Exam Two 8 March 2012

Special Microarchitecture based on a lecture by Sanjay Rajopadhye modified by Yashwant Malaiya

Programmable machines

University of California, Berkeley College of Engineering

SIR C.R.REDDY COLLEGE OF ENGINEERING, ELURU DEPARTMENT OF INFORMATION TECHNOLOGY LESSON PLAN

KINGS COLLEGE OF ENGINEERING DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING QUESTION BANK NAME OF THE SUBJECT: EE 2255 DIGITAL LOGIC CIRCUITS

Computer Arithematics Solved MCQs MCQs Multiple Choice Questions

CMPUT 101 with Solutions Quiz 2 (50 minutes) November 7, 2003

McGill University Faculty of Engineering FINAL EXAMINATION Fall 2007 (DEC 2007)

CSE140: Components and Design Techniques for Digital Systems

Computer Architecture EE 4720 Midterm Examination

COMPUTER SYSTEM. COMPUTER SYSTEM IB DP Computer science Standard Level ICS3U. COMPUTER SYSTEM IB DP Computer science Standard Level ICS3U

Department of Electrical Engineering and Computer Sciences Fall 2017 Instructors: Randy Katz, Krste Asanovic CS61C MIDTERM 2

ENCM 369 Winter 2019 Lab 6 for the Week of February 25

SECONDARY SCHOOL, L-IMRIEĦEL HALF YEARLY EXAMINATIONS 2016/2017

Homework deadline extended to next friday

CDA 3103 Computer Organization Exam 1 (Sep. 22th, 2014)

Lecture 2: Number Systems

Review Topics. Midterm Exam Review Slides

Parallel logic circuits

3.4 Basic Storage Elements

ECE 2020B Fundamentals of Digital Design Spring problems, 6 pages Exam Two Solutions 26 February 2014

Midterm spring. CSC228H University of Toronto

EECS 151/251A: SRPING 2017 MIDTERM 1

Review Topics. Midterm Exam Review Slides

Finite State Machine Lab

CS 151 Midterm. Instructions: Student ID. (Last Name) (First Name) Signature

School of Computer Science

Transcription:

Student Info Name: Section: netid: CS/ECE 252 Introduction to Computer Engineering Spring 2017 Instructor: Radhakrishnan Rahul Nayar TAs: Annie Lin, Mohit URL: http://pages.cs.wisc.edu/~rrahulnayar/cs252/spring2017/index.html Homework 4 [Due at lecture on Wed, March 1st] Primary contact for this homework: Annie [elin23 at wisc dot edu] You must do this homework alone. Please staple multiple pages together. 1. In the von Neumann model, how does the processing unit use the Memory Address Register (MAR) and Memory Data Register (MDR) to process data values to and from memory? (2 pts) To read a location (A): 1. Write the address (A) into the MAR. 2. Send a read signal to the memory. 3. Read the data from MDR. To write a value (X) to a location (A): 1. Write the data (X) to the MDR. 2. Write the address (A) into the MAR. 3. Send a write signal to the memory 2. If a computer has 32-bit addressability and needs 8 bits to access a location in memory, what is the total memory size in bytes? Show your work for full credit. (2 pts) 2^8 * 32 = 8192 bits = 1024 bytes (2^10) 3. Consider a machine which implements an ISA in which every instruction is 32 bits long and has the following format: (3 pts) Opcode DR SR IMMVAL Where DR = Destination register, SR = Source Register, and IMMVAL = Immediate Value. The fields DR, SR are represented using the same number of bits.

If there are 7 bits for the opcode and 16 registers, a. How many unique opcodes can be represented? 2^7 = 128 b. What is the minimum number of bits required for the source register (SR) field? 2^x >= 16, solve for x = 4 c. If IMMVAL represents an unsigned value, what is the range of values (in decimal) that can be represented using the immediate value field? 32 - (7 + 4 + 4) = 17 bits. 0 to 2^17-1 (131,071) 4. Examine the circuit below. The values of A and B feed through a decoder into a gated D-latch and change with every clock tick. A is In[1], and B is In[0]. Note that bits are numbered from zero ordering from right to left. So if In = 001, In[0] = 1, In[1] = 0 and In[2] = 0. (7 pts) (a) Fill out the following truth table between A, B, D, and WE. A B D WE 0 0 0 0 0 1 0 0 1 0 1 1 1 1 0 1 (b) Find the value of the out signal for each tick. Assume that upon initialization, out = 1.

Time 0 1 2 3 4 5 6 7 8 9 10 A N/A 0 1 1 1 0 0 1 0 0 1 B N/A 1 1 0 0 1 0 1 1 1 1 Out 1 1 0 1 1 1 1 0 0 0 0 5. Complete the truth table for the following combinatorial circuit. Note that bits are numbered from zero ordering from right to left. So if In = 001, In[0] = 1, In[1] = 0 and In[2] = 0. (4 pts) A B C Z 0 0 0 0 1 0 0 1 0 1 0 0 0 0 1 0 1 1 0 0 1 0 1 1 0 1 1 1

1 1 1 0 6. (a) Each clock cycle, an input is provided to the finite state machine (FSM) below. Assuming that we start at state 00 and given an input for each tick, fill in the table to show the next state. (4 pts) This is a corrected version that fixes some mistakes with the original. This question was not graded due to the error. Time 0 1 2 3 4 5 6 7 8 Input START 1 0 0 1 1 0 1 0 State 00 01 10 00 01 01 10 11 10 (b) What bit sequence(s) does this FSM recognize? Your answer should be a string of bits (ex. 01 or 1110 ).

101 7. (2 pts) (a) Suppose a decoder can take five inputs. How many output lines will it have? 2^5 (b) A multiplexer has n input lines. How many select lines will it have? log2(n) 8. (6 pts) (a) Describe how RS latches can be used to build gated D-latches. RS latches are simple storage elements that can used to either hold a previous value inside a latch or to set it to 1 or 0. Gated D-latches add a write-enable element that control whether or not the RS latch will take a new value. If WE = 1, the RS latch takes the new D value. If WE = 0, D is ignored. (b) Describe how gated D-latches can be used to build master-slave flipflops. Master-slave flipflops are a pair of gated d-latches that incorporate an additional clock element. When the clock is high, the D input is stored in the first latch and the second latch stays the same. Likewise, when the clock is low, the first latch's output is stored in the second latch, and the first latch does not change. The result is that output can only change state when the clock makes a transition from high to low. (c) Describe how gated D-latches can be used to build a register. Registers are a collection of gated D-latches that are controlled by a common WE. Each D-latch stores 1 bit, and when WE = 1, an n-bit D-value is written to the register.