← Quiz: COA Basics: all 10 questions
Quiz: COA Basics · Question 9 of 10
What does this print? (code)
What does this print?
instructions = 4_000_000
cpi = 2
clock_hz = 1e9
print(instructions * cpi / clock_hz * 1000, "ms")
- A.4.0 ms
- B.2.0 ms
- C.8.0 ms
- D.0.8 ms
Answer & explanation
Correct answer: 8.0 ms
CPU time = 4,000,000 × 2 / 1,000,000,000 s = 0.008 s = 8 ms.
Can you get the rest right without peeking?
Take the timed Quiz: COA Basics quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →