Search the courses, subjects, tracks, games and features, or jump straight to a page.
5 cards from this section. Quick, good the night before a test.
Name the three main parts of the CPU and state the job of each.
One part calculates, one part directs and one part holds.
What does the program counter hold, and when does its value change?
Think of a bookmark in a book of instructions.
Which register holds the address of the next instruction to be fetched?
It counts its way through the program.
Which part of the CPU carries out a comparison such as checking whether a is greater than b?
Comparing is a kind of logic.
Add a DIV instruction to the TinyCPU simulation from this lesson, so that DIV n divides the accumulator by n. Then trace the program LOAD 100, DIV 4, ADD 5, HALT 0, writing the values of the PC and the accumulator after each instruction.
Adding an instruction to a CPU means teaching the control unit one more opcode and the ALU one more operation.
Processor A is a 3 GHz single-core processor and processor B is a 2 GHz quad-core processor. A task needs 6 billion clock cycles. Ignoring all other delays, find the time each processor takes for (a) one such task that cannot be split, and (b) four independent such tasks. Which processor is better in each case?
Time = cycles ÷ clock speed; a single core can run only one task at a time.
6 more questions in this section. Enroll free to practise them all.
Enroll free