Performance and arithmetic

How to measure speed with CPU time, CPI and Amdahl's law, and how hardware multiplies and divides with shifts and adds.

About 2 hours of study

Learning objectives

Lessons

  1. 1

    Measuring performance Intermediate

    How to measure how fast a computer really is: CPU time from instruction count, CPI and clock rate, why GHz and MIPS mislead, and Amdahl's law.

  2. 2

    Multiplication and division in hardware Intermediate

    How an ALU multiplies and divides with shifts and adds: shift-and-add multiplication, Booth's algorithm for signed numbers, and restoring division.

Module practice

Module quiz

1. A clock of 2 GHz has a period of…
2. How many shift-and-add steps does multiplying two 8-bit numbers take?
3. A program has 10⁹ instructions at CPI 1.5 on a 3 GHz processor. What is its CPU time?
4. Booth's algorithm on the multiplier 0111 (7) does how many add or subtract operations?
5. Making 40% of a program 4 times faster gives an overall speedup of about…
6. Restoring division of 9 by 2 in 4 bits needs how many restores?

‹ How a computer runs a programThe datapath and the pipeline ›