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.
Operand1 | Operand2 | Result | Carry | Over-flow | |
expressiona | |||||
answera | |||||
expressionb | |||||
answerb | |||||
expressionc | |||||
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.
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.