Quiz #1 - 2-8-1
1. Computer A requires 5 CPI for all instructions.
How much time will a program with 20,000,000 instructions take with a 10MHz clock?
5Cyc/Inst*20,000,000Insts=100,000,000Cycles
100,000,000 Cycles/10,000,000cyc/s = 10s
2. Show all steps and results of adding -5 and -2 in 4-bit 2's compliment math:
-5 = -0101 = 1011
-2 = -0010 = 1110
Carry 1 11
-5 1011
-2 +1110
Result 1 1001 = - 0111 = -7
3. Explain the contributions made by the British to the early history (1800-1950s)
of computers. List at least two people involved.
Developed some of the 1st mechanical computers
Turing/Code breaking
Turing - Turing Test, Turing Machines, theory
Ada - 1st Programmer
Babbage - Mechanical Computer
4. What is the value of 0x6A if it is an unsigned number?
What if it is a 2's compliment signed number?
6*16+10 = 96+10 = 106
or
0110 1010 = 2^1+2^3+2^5+2^6 = 106
5. TRUE OR FALSE
Average CPI for a particular program can be used as a
performance measure (for that program) on machines that
have the same ISA and the same clock rate?
TRUE - The same ISA means that they are reading the same instructions.
Therefore the program will have the exact same instructions on
CPU A as it does on CPU B. If they are running at the same clock
rate and the Average CPI is lower on A, A will finish first.