The CPU and the fetch-execute cycle
Introducido
11:47
La CPU
El procesador en tu teléfono está haciendo algo casi estúpidamente simple. Obtén una instrucción. Averigua qué significa. Hazla. Luego obtén la siguiente. Eso es…
Narración en inglés · subtítulos en inglés y 中文 que puedes cambiar
En esta lección
| English | Significado |
|---|---|
| CPU/ˌsiː piː ˈjuː/ | |
| data/ˈdeɪtə/ | Recorded facts, observations or values used for analysis or processing. |
| instructions/ɪnˈstrʌkʃnz/ | instrucciones |
| ALU/ˌeɪ el ˈjuː/ | |
| control unit/kənˈtrəʊl ˈjuːnɪt/ | unidad de control |
| registers/ˈredʒɪstəz/ | registros |
| buses/ˈbʌsɪz/ | |
| program/ˈprəʊɡræm/ | A set of instructions specifying operations for a computer to carry out. |
| fetch–execute cycle/fetʃ ˈeksɪkjuːt ˈsaɪkl/ | The repeating process of obtaining an instruction, decoding it and carrying out the required operation. |
| logical comparisons | |
| control signals | |
| memory/ˈmeməri/ | Circuits that store data, such as registers, RAM and ROM. |
| address/əˈdres/ | An identifier specifying a location in memory or on a network. |
| chip | |
| Fetch | |
| Execute/ˈeksɪkjuːt/ | |
| PC | |
| MAR | |
| MDR | |
| CIR | |
| ACC | |
| Decode | |
| cache/kæʃ/ | caché |
| embedded system/emˈbedɪd ˈsɪstəm/ | sistema embebido |
| cores/kɔːz/ | Processing units within a processor that can execute instruction streams. |
| cache size | |
| clock speed/klɒk spiːd/ | The number of cycles of a processor's clock per second; it alone does not determine how quickly every program runs. |
| Storage/ˈstɔːrɪdʒ/ | |
| secondary storage/ˈsekəndəri ˈstɔːrɪdʒ/ | Non-volatile storage used to retain data and programs beyond immediate processing. |
| program counter/ˈprəʊɡræm ˈkaʊntə/ | A processor register holding the address of the next instruction to fetch in the simplified CPU model. |
| address bus/əˈdres bʌs/ | The signal lines used to identify a memory location or device involved in a transfer. |
| data bus/ˈdeɪtə bʌs/ | The signal lines carrying data between processor, memory and other connected components. |
| accumulator/əˈkjuːmjʊleɪtə/ | A register used to hold intermediate arithmetic or logical results during processing. |
La unidad central de procesamiento
- La UCP (Unidad Central de Procesamiento) procesa datos y ejecuta instrucciones, repitiendo un ciclo millones de veces por segundo.
- En su interior se encuentran la ALU (Unidad Aritmética Lógica), la unidad de control y los registros, conectados mediante buses.
- Ejecuta cada programa a través del ciclo de búsqueda–ejecución.
Partes de la UCP
- ALU — realiza cálculos y comparaciones lógicas.
- Unidad de control (CU) — envía señales de control para gestionar todas las partes.
- Registros — pequeñas y muy rápidas memorias que almacenan un valor cada una.
- Tres buses los conectan con la memoria: dirección (un solo sentido), datos (bidireccional) y control.


Una UCP moderna es un único chip que contiene la unidad de control, la ALU y los registros
The ALU in a CPU:
Dificultad 1/5 · 100 monedas + un pequeño bono en el primer intento de hoy
The arithmetic logic unit does the maths and logic; the control unit manages the parts.
Registros y el ciclo de búsqueda–ejecución
- Registros especiales: PC (dirección de la siguiente instrucción), MAR (dirección para acceder), MDR (dato/instrucción obtenida), CIR (instrucción en ejecución), ACC (resultado de la ALU).
- El ciclo se repite en tres etapas: Búsqueda (copiar la instrucción a la UCP, luego PC + 1) → Decodificación (la CU determina su significado) → Ejecución (llevarla a cabo).

El ciclo de búsqueda–decodificación–ejecución que la UCP repite para cada instrucción
El ciclo de búsqueda-ejecución
Tap round the loop the CPU repeats billions of times a second — fetch the instruction, decode what it means, execute it, then do it all again.
Match each CPU part to what it does.
Dificultad 2/5 · 140 monedas + un pequeño bono en el primer intento de hoy
The ALU computes, the control unit directs, the PC tracks the next instruction, and cache keeps hot data close.
Put the stages of the cycle in order.
Dificultad 3/5 · 200 monedas + un pequeño bono en el primer intento de hoy
Fetch the instruction, decode what it means, then execute it — repeated continuously.
Caché, rendimiento, sistemas embebidos
- La caché es una pequeña cantidad de memoria muy rápida cercana a la UCP, que almacena datos de uso frecuente para que la UCP espere menos.
- El rendimiento depende del número de núcleos, el tamaño de la caché y la velocidad de reloj (ciclos por segundo).
- Un sistema embebido es una computadora pequeña integrada en un dispositivo para una tarea fija específica (lavadora, microondas).

Caché y memoria principal (RAM) están situadas cerca de la UCP para alimentarla de datos rápidamente


Which change would improve CPU performance?
Dificultad 1/5 · 100 monedas + un pequeño bono en el primer intento de hoy
More cores, a larger cache and a higher clock speed all improve performance.
Cache is small, very fast memory near the CPU that holds often-used data, so the CPU waits less than it would reading from main memory.
Dificultad 1/5 · 100 monedas + un pequeño bono en el primer intento de hoy
A bigger cache, more cores and a higher clock speed all raise performance — cache helps by cutting the wait for data.
Esta tarjeta es nueva, por eso aparece en inglés hasta que su traducción esté lista.
Worked example: one trip round the cycle
The program counter 程序计数器 (PC) holds 20. Describe how the next instruction is fetched.
- The address 20 is copied from the PC to the MAR and sent along the address bus 地址总线 to memory. The instruction stored at address 20 comes back along the data bus 数据总线 into the MDR, then is copied to the CIR.
- The PC goes up by 1, to 21, ready for the next fetch. The control unit then decodes the instruction in the CIR, and it is executed (the ALU does any calculation, with the result in the accumulator 累加器).
Which register holds the address of the next instruction to be fetched?
Dificultad 1/5 · 100 monedas + un pequeño bono en el primer intento de hoy
The PC holds the next address and is incremented after each fetch.
Doubling the number of cores always makes every program run twice as fast.
Dificultad 1/5 · 100 monedas + un pequeño bono en el primer intento de hoy
Only tasks that can be split between cores speed up, and the cores must share work and memory.
Lo has entendido
- UCP = ALU (matemáticas/lógica) + CU (señales de control) + registros, conectados por buses de dirección/datos/control
- Registros clave: PC (siguiente instrucción), MAR/MDR (memoria), CIR (actual), ACC (resultado)
- El ciclo: búsqueda → decodificación → ejecución
- Rendimiento: núcleos, tamaño de la caché, velocidad de reloj; caché = memoria rápida cerca de la UCP
¿Qué salió mal? Solo el equipo del sitio ve esta información.