1. Tell the number of bits needed to encode the members of the following information classes:

2. Give the IEEE-754 single and double precision representations of +85.312510. Answer in hexadecimal. Show all work.

3. A. What is the decimal value of 0xFFFD if it is a 16-bit two's complement number?

B. What would be the 32-bit representation of the same value? (Answer in hexadecimal)

4. Give the 8-bit two's complement representations of the decimal numbers +64 and ­25. Answer in hexadecimal.

5. For each of the following arithmetic sums, write the binary equivalent of each operand and the result using two's complement representation. Each operand and result is to use exactly four bits. Mark a zero or one in each box in the Carry and Overflow columns to indicate the value of the carry out of the leftmost position and whether there is arithmetic overflow (1) or not (0). Answer this question on this sheet.

Operand1Operand2 ResultCarryOver-flow
expressiona
+5
+2
+7
answera
expressionb
-3
-6
-9
answerb
expressionc
+1
-1
0
answerc

6. Assume that the interface between a CPU and a memory consists of 24 address wires, 8 data wires, and three control wires named read, write, and wait.

  1. Use complete English sentences to tell the sequence of events that would take place for the CPU to read the contents of memory address 0x1234. For each step, tell whether the CPU or the memory performs the step and which wires it controls.
  2. Same as (a) for writing 0x3F into the byte at address 0x01000.
  3. If the memory access time is 350 nanoseconds and the CPU clock rate is 100 MHz, how many wait states will the processor incur for each memory access? Show all work.

7. A program is run on two different computers. On computer A the program requires 100,000 instructions, the average cycles per instruction is 2.0, and the Clock rate is 100 Mhz. On computer B the program requires 20,000 instructions, the average cycles per instruction is 10.0, and the clock rate 75 MHz. Which computer is faster, and by how much? (The instruction counts are dynamic, not static.) Show all work. Bonus: Which computer uses a RISC processor?

8. Engineers can make their company's new processor either perform floating-point operations twice as fast or perform string operations 1.2 times faster compared to the current processor they are selling. They did a survey of their customers and established that the average program spends 5% of the time doing floating-point operations, and 30% of the time doing string operations. Assume it costs the same amount of money to implement either optimization but that they can't do both for some reason. Which one should they do? Show all work.


Christopher Vickery
Computer Science Department
Queens College of CUNY