Exam in Computer Architecture

Similar documents
Exam in Testing. Justin Pearson. Dec Cover Sheet. Problem no. Solution provided Max Your points Total: 59

ECE 313 Computer Organization FINAL EXAM December 13, 2000

ECE/CS 552: Introduction to Computer Architecture ASSIGNMENT #1 Due Date: At the beginning of lecture, September 22 nd, 2010

Exam in Distributed Systems

Exam in Distributed Systems

CS 352H Computer Systems Architecture Exam #1 - Prof. Keckler October 11, 2007

Winter 2002 FINAL EXAMINATION

LECTURE 10. Pipelining: Advanced ILP

CDA3100 Midterm Exam, Summer 2013

COS 471A,COS 471B/ELE 375 Midterm

Quiz for Chapter 2 Instructions: Language of the Computer3.10

Computer Organization and Architecture (CSCI-365) Sample Final Exam

1 5. Addressing Modes COMP2611 Fall 2015 Instruction: Language of the Computer

For More Practice FMP

Winter 2006 FINAL EXAMINATION Auxiliary Gymnasium Tuesday, April 18 7:00pm to 10:00pm

CS 230 Practice Final Exam & Actual Take-home Question. Part I: Assembly and Machine Languages (22 pts)

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

Homework 1. Problem 1. The following code fragment processes an array and produces two values in registers $v0 and $v1:

MIPS Coding Continued

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

Chapter 7. Microarchitecture. Copyright 2013 Elsevier Inc. All rights reserved.

EECE 417 Computer Systems Architecture

COMP MIPS instructions 2 Feb. 8, f = g + h i;

Programming the processor

BITS, PILANI -DUBAI. International Academic City, Dubai BE (Hans) CS III Year -2nd Sem

Comprehensive Exams COMPUTER ARCHITECTURE. Spring April 3, 2006

ECE 341 Midterm Exam

MIPS ISA and MIPS Assembly. CS301 Prof. Szajda

CS 351 Final Exam Solutions

MIPS Assembly: Practice Questions for Midterm 1 Saving to and Loading from Memory CS 64: Computer Organization and Design Logic Lecture #6

CIS 371 Spring 2010 Thu. 4 March 2010

Performance Evaluation CS 0447

CSE 378 Midterm 2/12/10 Sample Solution

Lecture: Pipelining Basics

MIPS Assembly Programming

امتحان نهاية الفصل الدراسي الثاني )يونية ) ٢٠١٥. Computer Architectures (CS x35) معماريات الحاسب x35) (CS. ii. if (g >= h) g = g + 1; else h = h 1;

THE HONG KONG UNIVERSITY OF SCIENCE & TECHNOLOGY Computer Organization (COMP 2611) Spring Semester, 2014 Final Examination

ECE 313 Computer Organization FINAL EXAM December 11, Multicycle Processor Design 30 Points

Problem 3: Theoretical Questions: Complete the midterm exam taken from a previous year attached at the end of the assignment.

Comprehensive Exam: Sample Paper

CMSC411 Fall 2013 Midterm 1

Computer Architecture EE 4720 Midterm Examination

Introduction to MIPS Processor

Fall 2016 CSE Qualifying Exam CSCE 531, Compilers

COMPUTER ARCHTECTURE

2B 52 AB CA 3E A1 +29 A B C. CS120 Fall 2018 Final Prep and super secret quiz 9

Introduction to C. Why C? Difference between Python and C C compiler stages Basic syntax in C

Run time environment of a MIPS program

EC 413 Computer Organization

ECE 30 Introduction to Computer Engineering

ISA Instruction Operation

Topic Notes: MIPS Instruction Set Architecture

CS 251, Winter 2019, Assignment % of course mark

Appendix C: Pipelining: Basic and Intermediate Concepts

CMSC 411 Practice Exam 1 w/answers. 1. CPU performance Suppose we have the following instruction mix and clock cycles per instruction.

Points available Your marks Total 100

CS 351 Final Review Quiz

Lets Build a Processor

ECE 2035 Programming HW/SW Systems Spring problems, 6 pages Exam One 4 February Your Name (please print clearly)

Computer Systems and Networks. ECPE 170 Jeff Shafer University of the Pacific. MIPS Assembly

ICS DEPARTMENT ICS 233 COMPUTER ARCHITECTURE & ASSEMBLY LANGUAGE. Midterm Exam. First Semester (141) Time: 1:00-3:30 PM. Student Name : _KEY

OPEN BOOK, OPEN NOTES. NO COMPUTERS, OR SOLVING PROBLEMS DIRECTLY USING CALCULATORS.

COMP2121: Microprocessors and Interfacing. Instruction Set Architecture (ISA)

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

Computer Architecture EE 4720 Midterm Examination

Compiling Code, Procedures and Stacks

Solutions are slightly different for V1 Question 1 (6 points):

CS252 Prerequisite Quiz. Solutions Fall 2007

CS 112 Final May 8, 2008 (Lightly edited for 2012 Practice) Name: BU ID: Instructions

Computer Organization EE 3755 Midterm Examination

Slide Set 5. for ENCM 369 Winter 2014 Lecture Section 01. Steve Norman, PhD, PEng

Slide Set 7. for ENCM 501 in Winter Term, Steve Norman, PhD, PEng

ECE 411, Exam 1. Good luck!

LSU EE 4720 Homework 5 Solution Due: 20 March 2017

EE380 Spring 2014 Exam 1 Answer Key

Common Problems on Homework

Introduction to Computer Organization. Final Exam Summer 2017

Lecture 7: Examples, MARS, Arithmetic

Unit 3. Assembly programming Exercises

CS3350B Computer Architecture Winter 2015

TSEA 26 exam page 1 of Examination. Design of Embedded DSP Processors, TSEA26 Date 8-12, G34, G32, FOI hus G

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

Lecture 4: Instruction Set Architecture

Instruction-set Design Issues: what is the ML instruction format(s) ML instruction Opcode Dest. Operand Source Operand 1...

Chapter Two MIPS Arithmetic

CO200 Computer Organization and Architecture

ELEC / Computer Architecture and Design Fall 2013 Instruction Set Architecture (Chapter 2)

This exam is worth 40 points, or 30% of your total course grade. The exam contains eight

University of California College of Engineering Computer Science Division -EECS. CS 152 Midterm I

Computer Architecture EE 4720 Midterm Examination

Computer Science 324 Computer Architecture Mount Holyoke College Fall Topic Notes: MIPS Instruction Set Architecture

TDDB68 Processprogrammering och operativsystem / Concurrent programming and operating systems

ECE 313 Computer Organization FINAL EXAM December 14, This exam is open book and open notes. You have 2 hours.

Week 7: Assignment Solutions

ECE 486/586. Computer Architecture. Lecture # 7

Architectures. Code Generation Issues III. Code Generation Issues II. Machine Architectures I

CS152 Computer Architecture and Engineering CS252 Graduate Computer Architecture. VLIW, Vector, and Multithreaded Machines

Review of Last Lecture. CS 61C: Great Ideas in Computer Architecture. MIPS Instruction Representation II. Agenda. Dealing With Large Immediates

Quick Review. lw $t0, 4($a0) Registers x Memory. $a0 is simply another name for register 4 $t0 is another name for register (green sheet)

Computer Systems Laboratory Sungkyunkwan University

Transcription:

Exam in Computer Architecture Justin Pearson 2002-03-07 Cover Sheet Problem no. Solution provided Max Your points 1 1 2 6 3 14 4 9 5 13 6 11 7 10 Total: 64 Name :................................................... Pers.no. :................................................... Exam Rubric All answers should be written in English or Swedish (English is preferred). A mark of 50% is required for a 3. 1

Obs!! If you are not registered on the TF course please indicate which Computer Architecture Course you are registered on. Hjälpmedel: Pen,pencil, ruler,rubber, dictionary. You are not allowed a calculator. 2

1. Mark the following statements true or false. (a) The processor can decide if the value in a memory location is a character or part of a floating point number. (b) If a processor is asked to execute a datafile, the processor will refuse and signal an error. (c) It is possible to decide if a bit pattern represents a 2 s complement number or a normal number. (points 1) 2. Computer Arithmetic (a) Convert (where possible) the following numbers into 5 bit 2 s complement numbers. 3, 3, 10,16. (points 2) (b) Explain with examples what happens when numbers overflow with binary two s complement. (points 2) (c) When an overflow occurs on the MIPS processor an Exception occurs. Explain what an Expception is. (points 2) 3. Question on Processor Implementation (a) What is latch, give one example of a latch and describe how it works. (points 2). (b) In a multicycle processor why is it necessary to record intermediate results in a latch? (points 2). (c) In a multicycle approach to processor implementation a finite machine is needed to control the processor. What is a finite state machine and what does it do in a multicycle implementation? (points 4) (d) What is microcode, you should explain in some detail. ((4 points) (e) Discuss the difference (if any) between RISC and CISC style processors. (points???) 4. Pipelines (a) What is an instruction pipeline and how does it enhance the performance of processor. (points 2) 3

(b) What are pipeline stalls, what causes them on the MIPS processor. You should provide examples where possible (points 4). (c) The MIPS processor has data-forwarding between arithmetic instructions. What is data-forwarding, how does it work on the MIPS and how is it possible. (points 3) 5. Memory and Caches (a) What it a memory Cache? What principles does it rely on to increase the performance? performance. (2 points) (b) Describe the memory access characteristics of programs that perform badly on cache based systems. (2 points ). (c) What are multi-level Caches? (1 points) (d) Given a memory reference a Cache has to determine if the memory is in the Cache. There are a number of schemes for determining where a global memory reference should be placed in the cache memory. Describe the following Schemes: Direct mapped and n-way associative caches. (4 points) (e) What is a TLB? What function does it provide in a virtual memory system? Why is it required? What principle does it rely on to provide good performance? (points 4) 6. Simple questions on MIPS instructions. (a) With examples describe how the lw instruction works on the MIPS. (points 2) (b) How can constants be loaded into registers instructions without using pseudo-instructions (li and la you should explain what really happens with li and la). (points 3) (c) Suppose you have two values stored in memory at locations 0x40000010 and 0x40000014 and you want to add the two numbers and write the result in location 0x40000020, write the shortest sequence of MIPS instructions to do this. You should not use any pseudoinstructions (points 3). (d) Explain with examples how the slt instruction works on the MIPS and how it is used. (points 3) 7. More MIPS programming 4

(a) Assuming that the base address of the integer array A is stored in register $s0; the base address of the integer array B is stored in $s1 and the base address of the integer array C is stored in register $s2 translate the following fragment of C code into assembly: int i; for(i=0; i<100; i++) { A[i] = 2*B[i] - 2*C[i] } You should provide comments in the code and make the code as efficient as possible. (points 4) (b) Write a function that given the address of a string in $a0 decides if the string is a palindrome 1. The function should return the result 0 in register $v0 if the string is a palindrome and 1 if the string is not a palindrome. You should provide comments for the code.(points 6). Good Luck!! 1 A palindrome is a sequence of characters that is the same when read forward and backwards e.g. abba 5