DOC PREVIEW
Princeton COS 116 - Homework 5

This preview shows page 1 out of 2 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 2 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 2 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

COS 116 The Computational UniverseHomework 5Due: April 10, 2008Q1. Consider the following 4-state, 1-input finite state machine:a) Give the truth table for this finite state machine. The table should specify the nextstate for each combination of input and current state.b) Draw a circuit design that implements this finite state machine. Your circuit willconsist of a combinational circuit and some “rising-edge triggered” D flip-flops(like you used in lab). The combinational portion should implement the truth tablefrom part (a). Make your circuit as simple as you can.Q2. A computer manufacturer lists its processor speed as 3.2 GHz. Explain what theymean by this and comment in a line or two in what ways it is a meaningful measure ofspeed and in what ways it is not. Explain in a line or two how circuit designers determinethe maximum speed at which the clock can be run for a circuit in question.Q3. You decide to learn the machine language for a modern CPU. You notice that itassumes that all memory addresses have 32 bits. How large a memory does that imply?Can such a program run on a CPU with 1 Gigabyte memory? Explain in a line or two.Q4. Suppose we have a computer with a main memory that can hold 10 data items, and acache that can hold 3 data items. Initially, the main memory contains the numbers 1through 10, and the cache is empty:Main memory:000101011011100112345678910Cache:Recall that, whenever a program requests a data item, it first checks to see whether it is inthe cache. If it is, the request proceeds normally. If it’s not, the data item is first copiedfrom the main memory to the cache. If the cache is full, some other data item in the cachemust be overwritten.Assume our computer uses the “Least Recently Used” algorithm to decide which dataitem will be overwritten. Now suppose we run a program that requests data items in thefollowing sequence: 2, 4, 7, 2, 1, 3, 4, 2, 4, 10, 4, 9, 2, 5, 2, 2. Show the contents of thecache after each request. Also, say how many times during this sequence the requesteditem was not in the cache.Q5. Consider a computer with three levels of memory: cache, RAM, and hard disk. Thetable below gives the time required to access a data item from each of these memories.Memory TypeAccess TimeCache5 x 10-9sRAM2 x 10-8sHard disk5 x 10-3sSuppose that 98% of data requests are satisfied by the cache, 1.9% by the RAM, and0.1% by the hard disk. Calculate the average time to access a data item in this


View Full Document

Princeton COS 116 - Homework 5

Documents in this Course
Lecture 5

Lecture 5

15 pages

lecture 7

lecture 7

22 pages

Lecture

Lecture

32 pages

Lecture

Lecture

16 pages

Midterm

Midterm

2 pages

Lecture

Lecture

23 pages

Lecture

Lecture

21 pages

Lecture

Lecture

24 pages

Lecture

Lecture

22 pages

Lecture

Lecture

28 pages

Lecture

Lecture

21 pages

Lecture

Lecture

50 pages

Lecture

Lecture

19 pages

Lecture

Lecture

28 pages

Lecture

Lecture

32 pages

Lecture

Lecture

23 pages

Lecture

Lecture

21 pages

Lecture

Lecture

19 pages

Lecture

Lecture

22 pages

Lecture

Lecture

21 pages

Logic

Logic

20 pages

Lab 7

Lab 7

9 pages

Lecture

Lecture

25 pages

Lecture 2

Lecture 2

25 pages

lecture 8

lecture 8

19 pages

Midterm

Midterm

5 pages

Lecture

Lecture

26 pages

Lecture

Lecture

29 pages

Lecture

Lecture

40 pages

Lecture 3

Lecture 3

37 pages

lecture 3

lecture 3

23 pages

lecture 3

lecture 3

20 pages

Lecture

Lecture

21 pages

Lecture

Lecture

24 pages

Lecture

Lecture

19 pages

Load more
Download Homework 5
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Homework 5 and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Homework 5 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?