You are on page 1of 2

COS 140: Foundations of Computer Science Additional Homework from Prelim I

Assigned March 14, Due March 23 1. Given the following sequential circuit:
A C

D B

(a) Draw the characteristic table. (b) What happens if A=1, B=0, then B becomes 1, then both become 0? 2. The following gure shows a 2-bit register implemented with D-latches (data latches):
D0 Clock D1

Enable C Reset A D B e n a b l e Q A D B e n a b l e Q C

Out0

Out1

The boxes labeled A, B, and C contain very simple logic circuits that (1) cause the data bits, Di , to be stored in the latches when either or both of Enable or Clock is high (i.e., is a 1), no matter what Reset is; and (2) clear (set to 0) the latches when Reset is high, no matter what values Enable, Clock, or Di have. What circuits are contained in A, B, and C? 3. Suppose you are implementing RAID Level 1 with 8 disks. Recall that for this RAID level, striping is used and there is complete data redundancy. Assume that the average I/O request will read or write 2048 bytes. (a) What should the strip size be to maximize transfer rate? (b) What should the strip size be to maximize request rate? 1

(c) (1 point) Under the best possible condition, given the strip size you selected to maximize request rate, what is the maximum number of requests that could be handled (serviced) at once? 4. Suppose you have a one-dimensional array of 32-bit integers named A that is stored beginning at memory location 1024. If you were to access each element of the array in order with an assembly language program using register indirect addressing: (a) To what value would you rst set the register? (b) How much would you increment the register each time you wanted to move to another location? 5. Suppose you have a two-dimensional array, Picture, where each element Picture[i,j] contains a 2-byte value that species the brightness at a location in a picture. If the pictures size is 500500, each index begins at 0, and the picture array is stored in rowmajor order beginning at memory location 2048, nd the address of Picture[100,200].

You might also like