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
- Compute CPU time and average CPI
- Use Amdahl's law for an improvement
- Run shift-and-add, Booth and restoring division by hand
Lessons
- 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
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
- CPU timeEasy
- Average CPI of an instruction mixMedium
- Which upgrade winsHard
- Shift-and-add multiplicationEasy
- Restoring divisionMedium
- Booth's algorithmHard
Module quiz
‹ How a computer runs a programThe datapath and the pipeline ›