







Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Material Type: Exam; Professor: Lin; Class: COMPUTER ORGNIZATN; Subject: Computer Science; University: University of Maryland; Term: Spring 2001;
Typology: Exams
1 / 13
This page cannot be seen from the preview
Don't miss anything!








CMCS 311 Section 0201 Final Exam
Name
22 May 2001 200 Points
(Please print legibly)
The point total for each problem precedes the problem number. To ensure full credit for your work, please place all answers in the spaces provided.
(8) 1. Complete the following table for each of the indicated representations. Each representation includes 16 bits. Give your answers in decimal. You may leave your answer in power-of-2 format.
Largest number
Most negative number (Give the decimal value, not the negative format representation.)
16-bit Sign Magnitude
4-digit BCD 9's Complement ^/O O Q
4-digit BCD 10's Complement l/ O O Q
(8) 2. Perform each of the indicated conversions. Answers may be left as fractions in the converted base.
(27.75)10 = /o //-^ J2 (Use the minimum number of bits necessary)
(-27)io = (i> 0 Q O I o 1 )2 (Use excess 32 with 7 bits)
(43.3)7 = ( 51 4 (^) ;io
(10) 3. The single precision IEEE 754 standard is as follows:
1 sign bit J y f 8-bit exponent in excess 127 format -pc. 23-bit fraction, normalized, with a hidden 1 Exponents 00000000 and 11111111 are reserved ^ r^ O 'clean zero' is all zeroes in the exponent and fraction; the sign bit can be 0 or 1 'dirty zero' is all zeroes in the exponent, a 0 or 1 in the sign bit, and the magnitude (denormalized) in the fraction with no hidden 1; the exponent value is - Infinity is represented by all ones in the exponent, zeroes in the fraction, and the sign bit 0 or 1 Not a number (NaN) is represented by all ones in the exponent, the fraction is non- zero, and the sign bit is 0 or 1
For each of the following, provide the decimal value (not the bit pattern). You may leave your answer in factor or power-of-2 format.
td
.-XI ' -^Largest positive representable number (infinity is not a number) ~- (^) nV
Smallest positive non-zero number that is normarlized
Smallest positive non-zero number using 'dirty zero' format
The most negative normalized number
- b -^ b
The smallest gap between positive non-zero normalized numbers
(10) 4. Connect the 3-to-8 decoder and the OR gate below to implement the 3-way exclusive OR function.
(8) 7. Perform the additions below and indicate if there is an overflow. Assume 4 bits to the left of the binary point in each instance.
a. Two's complement b. One's complement £>' ' (-DO, 3( 0 1 f> >? " 1011.101 1011..
Overflow? " Overflow?
(10) 8. A serial multiplier operates through a series of shifts and additions. The multiplicand is stored in M and the multiplier in Q. C holds the carry bit from addition. A holds the partial sums. The final answer is in Q and A. If the least significant bit (LSB) in Q is a 1, then M is added to A; otherwise, M is not added. After the LSB of Q is checked, and M is, or is not, added to A, then C, A, Q are shifted to the right. The process is repeated until each bit in Q has been in the rightmost position. Show the results, and whether changes are due to an add or a shift, as the process is implemented with a multiplicand of 1010 and a multiplier of 0101. The initial values are provided. There may be more blank spaces than necessary.
M 1010
C A Q Add or shift? 0 0000 01 01
Q i 1 £ b i p o /. £> P / 1 p PJ^OO 5ft' Q -P-PJ 1 2 o J O $ H- >
b o { What is the final product?
(10) 9. Use the Booth algorithm (not bit pair recoding) to multiply 010110 (multiplicand) by 011111 (multiplier). There may be more spaces available than necessary. Leave extraneous spaces blank.
010110 Multiplicand 011111 Multiplier 1 5 2. - Q. "J Booth receded multiplier
- r
D DZ Dl Dl B
(8) 10. Compute the number of words of memory traffic required to fetch and to execute each of the three programs below. Assume 8-bit addresses, 8-bit word size, and that operation codes require 1 byte. Give your answer in words.
3-Address Mult B, C, D Add A, D, D
Fetch: B
Execute: L?
2-Address Mult B, C Add A, C Stor C, D
Fetch: 7
Execute: C/
1- Address LoadC MultB Add A StorD
Fetch: &
Execute:^4 1
(10) 5. Indicate on the spaces provided the requested values after the following ARC program has executed. All negatives are stored in 2's complement. All values given are hexadecimal; answers should be given in hexadecimal. r I 1 ,.,'!» '.'U •begin .,„, ; , <' ol
„
Id [x], %r orncc %rl, %r2, %r st %r2, [x] sethi 123ABCH, %r srl %r3, 8, %r st %r3, [w] Id [y], %r Id [z], %r addcc %r4, %r5, %r bvs done st %r3, [y] bcs done
done: jmpl %r!5 +_4, %rO w: -10H x: -8H y: -10H z: -40H
w =
x.
0 °
, '
/ V\
. ( ? Up °
s\s
1
z = M
(8) 13. You are to construct larger memories using 4X4 RAM chips. —-'
r) How many chips would be necessary to construct an 8 X 16 RAM?
____ How many chips would be necessary to construct an 8 X 4 RAM?
_9- ________ How many chips would be necessary to construct an 4 X 8 RAM?
(10) 14. A main memory has 232 words. The words are divided into 224 blocks of 28 words each. The cache associated with memory has 215 slots. Each slot also has 28 words.
. d^ 1-^^ V' o-^ v.,.r^lf the cache is associative, what fields would be in the address and how many bits c'^ ^ v^- ' "'^ would be in each?
If the cache is direct mapped, what fields would be in the address and how many bits would be in each? Of
o
If the cache is set associative with a set size of L6, what fields would be in the address and how many bits would be in each?
B
(8) 16. A computer has 16 pages of virtual address space and 4 physical page frames. Initially, the physical memory is empty. Circle each of the page references in the following page reference sequence that causes a page fault using the least recently used (LRU) and first in first out (FIFO) algorithms.. <Y I ^
'g) 2 3 4 g)g) 4
(10) 17. A disk has 128 tracks of 32 sectors each on each surface of 8 platters. The sectors are numbered from 0 to 31. The disk spins at a rate of 1 rotation every 16 ms and takes 15 ms to move between adjacent tracks. The read / write heads are at the start of sector 4 on track 7. How long will it take to read sector 2 on track 56?
'^> O— i(
Seek time = 1
|6 ^'
Rotational delay = 6 ^ or /^ ^ v
Transfer time =
Total time = __________ (account for any overlap in activities)
10
(8) 18. A magnetic tape is 600 feet long, stores 6000 bytes per inch (BPI), has a record size of 3000 bytes, and an interrecord gap of .5 inches.
What is the storage capacity in bytes?
S*
(8) 19. A communication system uses only the following 8 messages:
What is the Hamming Distance for this system? _______^4
(8) 22. Using the cyclic redundancy check (CRC) of section 9.4.4 (as discussed in lecture), given the frame to be transmitted and the generator polynomial below, provide the transmitted frame.
M(x) = 101101110
G(x) = x4 + x2 + 1
M(x) + R(x) =
(8) 23. Use the cyclic redundancy check (CRC) of section 9.4.4 (as discussed in lecture), and the message and generator polynomial below to answer the questions.
M(x) + R(x) = 101110
G(x) = x2 +x
Is the message valid?.
What is the correct value of R(x)?