1. Home
  2. Explore
  3. Computer Science
  4. How CPUs Work

Study methods

Flashcards
Quiz
Fill in the blanks
Written test
Lesson
Notes
Podcast
Content

How CPUs Work

  • 30Unfamiliar
  • 0Learning
  • 0Familiar
  • 0Mastered
Topic: Central Processing Unit Overview

What is the primary role of a CPU in a device?

30 questions

  1. 1

    What is the primary role of a CPU in a device?

    1. A

      It provides power to the other components.

    2. B

      It acts as the brain of the device, executing instructions.

    3. C

      It stores all user data permanently.

    4. D

      It manages the display and graphics output.

    Correct answer
    B

    It acts as the brain of the device, executing instructions.

    Explanation

    The CPU is described as 'the brain of the device', responsible for processing instructions.

  2. 2

    How many transistors did the 6502 processor have?

    1. A

      4528 transistors

    2. B

      352 transistors

    3. C

      2.3 million transistors

    4. D

      16 billion transistors

    Correct answer
    A

    4528 transistors

    Explanation

    The 6502 chip is built from 4528 transistors.

  3. 3

    How many calculations per second can the M1 processor perform?

    1. A

      Around 430 thousand

    2. B

      Around 10 billion

    3. C

      Around 1 billion

    4. D

      Around 3 trillion

    Correct answer
    D

    Around 3 trillion

    Explanation

    The M1 processor can perform around 3 trillion calculations a second.

  4. 4

    What is the 'technological DNA' common to all processors?

    1. A

      The use of silicon as a semiconductor

    2. B

      Transistors and logic gates

    3. C

      The Fetch, Decode, Execute cycle

    4. D

      The von Neumann architecture

    Correct answer
    C

    The Fetch, Decode, Execute cycle

    Explanation

    The video states that the shared technological DNA is the Fetch, Decode, Execute cycle, not transistors or logic gates.

  5. 5

    In the CPU analogy, what do the bookshelves represent?

    1. A

      The CPU cache

    2. B

      The SSD storage chips

    3. C

      The DRAM

    4. D

      The registers

    Correct answer
    B

    The SSD storage chips

    Explanation

    Bookshelves represent the storage devices like SSD chips, which hold semi-permanent long-term data.

  6. 6

    In the CPU analogy, what does the cart represent?

    1. A

      The cache memory

    2. B

      The registers

    3. C

      The DRAM

    4. D

      The ALU

    Correct answer
    C

    The DRAM

    Explanation

    The cart represents the DRAM, which is temporary and limited capacity working memory.

  7. 7

    In the CPU analogy, what does the open book on the table represent?

    1. A

      The accumulator

    2. B

      The instruction set

    3. C

      The program counter

    4. D

      The cache memory

    Correct answer
    D

    The cache memory

    Explanation

    The open book represents the very limited capacity cache memory inside the CPU.

  8. 8

    In the CPU analogy, what does the sheet of paper represent?

    1. A

      The ALU

    2. B

      The registers

    3. C

      The instruction decoder

    4. D

      The control unit

    Correct answer
    B

    The registers

    Explanation

    The single sheet of paper represents the registers, used for storing values being actively used.

  9. 9

    In the CPU analogy, what does the calculator represent?

    1. A

      The control unit

    2. B

      The ALU

    3. C

      The instruction decoder

    4. D

      The cache

    Correct answer
    B

    The ALU

    Explanation

    The calculator represents the Arithmetic Logic Unit (ALU).

  10. 10

    In the CPU analogy, what does the robot controller represent?

    1. A

      The instruction decoder

    2. B

      The clock generator

    3. C

      The control unit

    4. D

      The ALU

    Correct answer
    C

    The control unit

    Explanation

    The automated robot is called a control unit or controller, which orchestrates operations.

  11. 11

    What is the special name for the display of the ALU calculator in the analogy?

    1. A

      Accumulator

    2. B

      Instruction register

    3. C

      Register

    4. D

      Program counter

    Correct answer
    A

    Accumulator

    Explanation

    The ALU calculator's display that outputs the result is called the accumulator.

  12. 12

    Which of the following is NOT a function that the ALU can perform?

    1. A

      Logical AND, OR, XOR

    2. B

      Bit shifting

    3. C

      Multiplying by 10 in decimal

    4. D

      Addition and subtraction

    Correct answer
    C

    Multiplying by 10 in decimal

    Explanation

    The ALU works in binary; bit shifting is like multiplying by 2, not by 10. Multiplying by 10 in decimal is not an ALU function.

  13. 13

    In binary, a bit shift of one position to the left is equivalent to multiplying by what?

    1. A

      2

    2. B

      10

    3. C

      1

    4. D

      8

    Correct answer
    A

    2

    Explanation

    In binary, adding a zero to the end (left shift) multiplies the number by 2.

  14. 14

    What happens when the ALU compares two numbers and they are equal?

    1. A

      The comparison result is stored in a register.

    2. B

      The program counter jumps to a new address.

    3. C

      The equals flag goes up.

    4. D

      The accumulator is set to 1.

    Correct answer
    C

    The equals flag goes up.

    Explanation

    When two numbers are equal, an equals flag goes up; the less than and greater than flags stay down.

  15. 15

    In the CPU analogy, what are the two types of pages found in the books?

    1. A

      Variables and constants

    2. B

      Instructions and data

    3. C

      Headers and footers

    4. D

      Code and comments

    Correct answer
    B

    Instructions and data

    Explanation

    Books contain two types of pages: instructions (like a recipe) and data (like ingredients).

  16. 16

    What is the function of the program counter (PC)?

    1. A

      It stores the current instruction being executed.

    2. B

      It holds the result of the last ALU operation.

    3. C

      It keeps track of the next instruction to execute.

    4. D

      It counts the number of instructions completed.

    Correct answer
    C

    It keeps track of the next instruction to execute.

    Explanation

    The program counter (or instruction address register) holds the address of the next instruction.

  17. 17

    How does a jump instruction alter the flow of a program?

    1. A

      It repeats the previous instruction.

    2. B

      It copies data from one register to another.

    3. C

      It increments the program counter by a fixed amount.

    4. D

      It changes the value in the program counter to a new address.

    Correct answer
    D

    It changes the value in the program counter to a new address.

    Explanation

    A jump instruction directly sets the program counter to a new number, causing execution to continue from that address.

  18. 18

    Which type of instruction is used to implement IF statements and loops?

    1. A

      Store instruction

    2. B

      Increment instruction

    3. C

      Load instruction

    4. D

      Conditional branch

    Correct answer
    D

    Conditional branch

    Explanation

    Conditional branches check comparison flags and can change the program counter based on conditions, enabling IF and loops.

  19. 19

    How many different instructions could the 6502 processor execute?

    1. A

      56

    2. B

      354

    3. C

      676

    4. D

      145

    Correct answer
    A

    56

    Explanation

    The 6502 processor could complete 56 different instructions.

  20. 20

    How many different instructions can the M1 chip execute?

    1. A

      354

    2. B

      1024

    3. C

      56

    4. D

      676

    Correct answer
    A

    354

    Explanation

    The M1 chip can complete 354 instructions (ArmV8.4 instruction set).

  21. 21

    What are the three key steps in completing an instruction?

    1. A

      Input, Output, Compute

    2. B

      Read, Process, Write

    3. C

      Fetch, Decode, Execute

    4. D

      Load, Store, Execute

    Correct answer
    C

    Fetch, Decode, Execute

    Explanation

    The three steps are always Fetch, Decode, and Execute.

  22. 22

    During the Fetch step, what happens to the program counter?

    1. A

      It is incremented by 1.

    2. B

      It is set to zero.

    3. C

      It is stored in the current instruction register.

    4. D

      It is loaded with the instruction address.

    Correct answer
    A

    It is incremented by 1.

    Explanation

    During Fetch, the instruction is copied into the CIR and the program counter is increased by 1.

  23. 23

    What is the purpose of the instruction decoder?

    1. A

      It performs arithmetic operations.

    2. B

      It generates control signals based on the instruction's binary.

    3. C

      It fetches instructions from memory.

    4. D

      It increments the program counter.

    Correct answer
    B

    It generates control signals based on the instruction's binary.

    Explanation

    The instruction decoder interprets the machine code and produces the control signals to execute the instruction.

  24. 24

    What is the role of timing signals in the Execute step?

    1. A

      They regulate the delivery of control signals to ensure correct operation.

    2. B

      They save the result to memory.

    3. C

      They increment the program counter.

    4. D

      They decode the instruction.

    Correct answer
    A

    They regulate the delivery of control signals to ensure correct operation.

    Explanation

    Timing signals accommodate the travel time of electricity and logic gate delays, ensuring the correct result.

  25. 25

    What clock speed did the 6502 processor use?

    1. A

      100 MHz

    2. B

      2.4 GHz

    3. C

      3.2 GHz

    4. D

      1 MHz

    Correct answer
    D

    1 MHz

    Explanation

    The 6502 chip had a 1 Megahertz clock, each step taking a microsecond.

  26. 26

    What technique allows modern processors to overlap the Fetch, Decode, and Execute steps for multiple instructions?

    1. A

      Cache prefetching

    2. B

      Pipelining

    3. C

      Branch prediction

    4. D

      Multithreading

    Correct answer
    B

    Pipelining

    Explanation

    Pipelining queues multiple instructions so that different steps for different instructions occur simultaneously.

  27. 27

    In the M1 processor's pipelined core, how many instructions can be queued per clock cycle?

    1. A

      4

    2. B

      32

    3. C

      8

    4. D

      16

    Correct answer
    C

    8

    Explanation

    The M1 core can queue 8 instructions per clock cycle in its pipeline.

  28. 28

    What distinguishes RISC architectures like ArmV8.4 from CISC architectures?

    1. A

      RISC has more instructions than CISC.

    2. B

      CISC architectures are more energy efficient than RISC.

    3. C

      RISC uses a more complicated instruction decoder.

    4. D

      RISC instructions are simple and execute at a fast, consistent rate.

    Correct answer
    D

    RISC instructions are simple and execute at a fast, consistent rate.

    Explanation

    RISC instructions are relatively simple and execute at a consistently fast rate, making them more energy efficient.

  29. 29

    Which architecture is used in Intel and AMD chips?

    1. A

      CISC

    2. B

      SIMT

    3. C

      RISC

    4. D

      ArmV8.4

    Correct answer
    A

    CISC

    Explanation

    Intel and AMD chips use the CISC architecture with x86-64 instructions.

  30. 30

    What does SoC stand for and what does it imply about the M1 chip?

    1. A

      Standard on Chip; the M1 is a standard CPU design.

    2. B

      System on Chip; the M1 integrates CPU, GPU, and other components on one chip.

    3. C

      Single on Chip; the M1 has only one core.

    4. D

      Serial on Chip; the M1 uses serial processing.

    Correct answer
    B

    System on Chip; the M1 integrates CPU, GPU, and other components on one chip.

    Explanation

    SoC stands for System on Chip, integrating multiple processors and accelerators (CPU, GPU, neural engine) on one die.

Question 1 of 30
Question 1 of 30

Ask anything

We've read this whole study set, so questions about it get the best answers.

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent