Von Neumann architecture and the CPU · Arquitetura Von Neumann e a CPU
| English | Português |
|---|---|
| processor/ˈprəʊsesə/ | processador |
| registers/ˈredʒɪstəz/ | registradores |
| buses/ˈbʌsɪz/ | barramentos |
| Von Neumann architecture/vɒn ˈnɔɪmən ˈɑːkɪtektʃə/ | Arquitetura Von Neumann |
| Immediate Access Store/ɪˈmiːdɪət ˈækses stɔː/ | Armazenamento de Acesso Imediato |
| stored program/stɔːd ˈprəʊɡræm/ | programa armazenado |
| ALU/ˌeɪ el ˈjuː/ | ALU |
| control unit/kənˈtrəʊl ˈjuːnɪt/ | unidade de controle |
| system clock/ˈsɪstəm klɒk/ | relógio do sistema |
| clock speed/klɒk spiːd/ | velocidade do clock |
| general-purpose registers/ˈdʒenərəl ˈpɜːpəs ˈredʒɪstəz/ | registradores de propósito geral |
| special purpose registers/ˈspeʃl ˈpɜːpəs ˈredʒɪstəz/ | registradores de propósito especial |
| Program Counter/ˈprəʊɡræm ˈkaʊntə/ | Contador de Programa |
| Memory Address Register/ˈmeməri əˈdres ˈredʒɪstə/ | Registrador de Endereço de Memória |
| Memory Data Register/ˈmeməri ˈdeɪtə ˈredʒɪstə/ | Registrador de Dados de Memória |
| Current Instruction Register/ˈkʌrənt ɪnˈstrʌkʃn ˈredʒɪstə/ | Registrador de Instrução Atual |
| accumulator/əˈkjuːmjʊleɪtə/ | acumulador |
| Index Register/ˈɪndeks ˈredʒɪstə/ | Registrador de Índice |
| Status Register/ˈsteɪtəs ˈredʒɪstə/ | Registrador de Status |
| flag/flæɡ/ | flag |
| address bus/əˈdres bʌs/ | barramento de endereços |
| data bus/ˈdeɪtə bʌs/ | barramento de dados |
| control bus/kənˈtrəʊl bʌs/ | barramento de controle |
| register transfer/ˈredʒɪstə ˈtrænsfɜː/ | transferência de registrador |
The report every computer still follows
- In June 1945 John von Neumann circulated a typed draft describing a machine that had not yet been built: the EDVAC.
- Its idea was simple and new. Keep the program in the same memory as the data, and have one processor fetch and carry out the instructions one at a time.
- The draft was never finished, but the design was copied everywhere. Your phone, your laptop and the school server are all built on it.
- This lesson takes the model apart: the memory, the processor's parts, its registers and the buses between them.
O relatório que cada computador ainda segue
- Em junho de 1945, John von Neumann circulou uma versão digitada descrevendo uma máquina que ainda não havia sido construída: o EDVAC.
- Sua ideia era simples e nova. Mantenha o programa na mesma memória dos dados, e tenha um processador buscando e executando as instruções uma de cada vez.
- O rascunho nunca foi concluído, mas o design foi copiado em todos os lugares. Seu telefone, seu laptop e o servidor da escola são todos construídos sobre ele.
- Esta aula desmonta o modelo: a memória, as partes do processador, seus registradores e os barramentos entre eles.
The Von Neumann model
- The Von Neumann architecture 冯·诺依曼体系结构 has a single memory, the Immediate Access Store 立即存取存储器 (IAS), holding both program instructions and data. That is the stored program 存储程序 concept.
- The processor 处理器 fetches each instruction from memory and executes it, one at a time, in address order unless a branch instruction changes the flow.
- Instructions, data and addresses all travel between processor and memory along shared buses 总线.
One memory, one processor, three buses
O modelo de Von Neumann
- A arquitetura de Von Neumann 冯·诺依曼体系结构 tem uma memória única, a Immediate Access Store 立即存取存储器 (IAS), armazenando tanto instruções de programa quanto dados. Esse é o conceito de programa armazenado 存储程序.
- O processador 处理器 busca cada instrução da memória e a executa, uma de cada vez, em ordem de endereço a menos que uma instrução de ramificação altere o fluxo.
- Instruções, dados e endereços viajam entre o processador e a memória ao longo de barramentos compartilhados 总线.

Uma memória, um processador, três barramentos
Why the stored program matters
- Change the program in memory and the same hardware does a different job. No rewiring, no new machine.
- A program is just data until it is fetched, so it can be loaded from a disk, sent over a network or written by another program.
- The exam wording: instructions and data are stored in the same memory, and instructions are fetched one at a time and executed by the processor.
Por que o programa armazenado importa
- Alterar o programa na memória e o mesmo hardware faz um trabalho diferente. Sem reencabamento, sem nova máquina.
- Um programa é apenas dados até ser buscado, portanto pode ser carregado de um disco, enviado por rede ou escrito por outro programa.
- A redação da prova: instruções e dados são armazenados na mesma memória, e as instruções são buscadas uma de cada vez e executadas pelo processador.
The stored-program (Von Neumann) idea means that: · A ideia de programa armazenado (Von Neumann) significa que:
One memory holds instructions and data together; changing the stored program changes what the computer does, with no rewiring. · Uma memória mantém instruções e dados juntos; alterar o programa armazenado muda o que o computador faz, sem reconfiguração de cabos.
ALU, control unit and clock
- The ALU 算术逻辑单元 (Arithmetic and Logic Unit) does the arithmetic (add, subtract) and the logic (AND, OR, comparisons), taking operands from registers and putting the result back in one.
- The control unit 控制单元 (CU) decodes each instruction and sends the control signals that carry it out: opening data paths, telling the ALU what to do, ordering memory reads and writes.
- The system clock 系统时钟 sends a steady stream of pulses. The control unit moves the cycle on one step per pulse, so every part changes state together; the clock speed 时钟频率, in GHz, is the number of pulses a second.
The whole processor is one small chip
ALU, unidade de controle e relógio
- A ALU 算术逻辑单元 (Arithmetic and Logic Unit) realiza operações aritméticas (soma, subtração) e lógicas (AND, OR, comparações), recebendo operandos dos registradores e devolvendo o resultado em um deles.
- A unidade de controle 控制单元 (CU) decodifica cada instrução e envia os sinais de controle que a executam: abrindo caminhos de dados, dizendo à ALU o que fazer, ordenando leituras e escritas na memória.
- O relógio do sistema 系统时钟 envia uma sequência contínua de pulsos. A unidade de controle avança o ciclo em um passo por pulso, para que todas as partes mudem de estado juntas; a velocidade do clock 时钟频率, em GHz, é o número de pulsos por segundo.

O processador inteiro é um único chip pequeno
The ALU is responsible for: · A ALU é responsável por:
The Arithmetic and Logic Unit performs calculations and logic/comparisons. Decoding is the control unit's job. · A Unidade Aritmética e Lógica realiza cálculos e lógica/comparações. A decodificação é tarefa da unidade de controle.
The ____ unit decodes each instruction and sends the control signals that carry it out. · A unidade ____ decodifica cada instrução e envia os sinais de controle para executá-la.
The control unit decodes and signals; the ALU does the arithmetic and logic; the clock keeps them in step. · A unidade de controle decodifica e sinaliza; a ALU faz a aritmética e lógica; o clock as mantém sincronizadas.
The registers
- Registers 寄存器 are tiny, very fast stores inside the processor. General-purpose registers 通用寄存器 hold the programmer's temporary values. Special purpose registers 专用寄存器 each have one fixed job in the cycle.
| Register | Job |
|---|---|
| Program Counter 程序计数器 (PC) | the address of the next instruction to be fetched |
| Memory Address Register 内存地址寄存器 (MAR) | the address of the location being read from or written to |
| Memory Data Register 内存数据寄存器 (MDR) | the data or instruction just read from, or about to be written to, that location |
| Current Instruction Register 当前指令寄存器 (CIR) | the instruction currently being decoded and executed |
| Accumulator 累加器 (ACC) | the result of the last arithmetic or logic operation |
| Index Register 变址寄存器 (IX) | an offset added to an address in indexed addressing |
| Status Register 状态寄存器 | the flags set by the last operation |
Registers, control unit and ALU, linked by the buses
Os registradores
- Registradores 寄存器 são pequenos e muito rápidos armazéns dentro do processador. Registradores de uso geral 通用寄存器 mantêm os valores temporários do programador. Registradores de propósito especial 专用寄存器 têm uma função fixa no ciclo.
| Registrador | Função |
|---|---|
| Program Counter 程序计数器 (PC) | o endereço da próxima instrução a ser buscada |
| Memory Address Register 内存地址寄存器 (MAR) | o endereço da localização sendo lida ou escrita |
| Memory Data Register 内存数据寄存器 (MDR) | o dado ou instrução recentemente lido ou prestes a ser escrito naquela localização |
| Current Instruction Register 当前指令寄存器 (CIR) | a instrução atualmente sendo decodificada e executada |
| Accumulator 累加器 (ACC) | o resultado da última operação aritmética ou lógica |
| Index Register 变址寄存器 (IX) | um offset adicionado a um endereço em endereçamento indexado |
| Status Register 状态寄存器 | as flags definidas pela última operação |

Registradores, unidade de controle e ALU, conectados pelos barramentos
Tap the parts of a Von Neumann computer · Toque nas partes de um computador Von Neumann
Explore each block. The CPU (control unit, ALU, registers) talks to a single main memory over the buses — and that one shared memory for instructions AND data is the Von Neumann idea. · Explore cada bloco. A CPU (unidade de controle, ALU, registradores) fala com uma única memória principal pelos barramentos — e esse único espaço de memória compartilhado para instruções E dados é a ideia de Von Neumann.
Match each special-purpose register to what it holds. · Combine cada registrador de uso específico ao que ele armazena.
PC points to the next instruction, CIR holds the current one, MAR/MDR are the address/data pair for memory, ACC holds the running result. · PC aponta para a próxima instrução, CIR segura a atual, MAR/MDR são o par endereço/dados para memória, ACC segura o resultado em andamento.
Worked example: "describe the role of each register"
- The table question wants one precise sentence per register, and the words that earn the marks are in bold.
- PC: holds the address of the next instruction to be fetched. MAR: holds the address of the location being accessed.
- MDR: holds the data just read from, or about to be written to, memory. CIR: holds the instruction currently being decoded and executed.
- ACC: holds the result of the last ALU operation. Notice that two registers hold addresses, two hold contents, and one holds a result.
Exemplo resolvido: "descreva a função de cada registrador"
- A questão de tabela pede uma frase precisa por registrador, e as palavras que garantem pontos estão em negrito.
- PC: mantém o endereço da próxima instrução a ser buscada. MAR: mantém o endereço da localização sendo acessada.
- MDR: mantém o dado recentemente lido da memória ou prestes a ser escrito. CIR: mantém a instrução atualmente sendo decodificada e executada.
- ACC: mantém o resultado da última operação da ALU. Note que dois registradores mantêm endereços, dois mantêm conteúdos e um mantém um resultado.
The status register's flags
- Each flag 标志 is one bit, set or cleared by the ALU after an operation: the zero flag when a result or comparison gives zero, the carry flag when an addition overflowed the register, the negative flag when a result is negative, the overflow flag when a signed result does not fit.
- A conditional jump reads a flag to decide whether to branch. That is how
IFand loops reach the hardware. - An overflow flag can also raise an interrupt, which the next lesson handles.
As flags do registrador de status
- Cada flag 标志 é um bit, definido ou limpo pela ALU após uma operação: a flag zero quando um resultado ou comparação dá zero, a flag carry quando uma adição transbordou o registrador, a flag negative quando um resultado é negativo, a flag overflow quando um resultado com sinal não cabe.
- Um jump condicional lê uma flag para decidir se deve desviar. É assim que
IFe loops atingem o hardware. - Uma flag de overflow também pode gerar uma interrupção, que a próxima lição abordará.
Which of these are flags in the status register? Select all · todos that apply. · Quais destes são flags no registrador de status? Selecione todas as aplicáveis.
Carry, zero, negative and overflow are one-bit flags set by the ALU. The program counter is a separate register holding an address. · Carry, zero, negativo e overflow são flags de um bit definidas pela ALU. O contador de programa é um registrador separado segurando um endereço.
The three buses
- The address bus 地址总线 carries the address the processor wants. It is one-way, processor to memory.
- The data bus 数据总线 carries the data or instruction itself. It is two-way, because reads and writes go in opposite directions.
- The control bus 控制总线 carries control signals such as read, write, clock and interrupt. It is two-way.
The three system buses connecting processor, memory and input/output
Os três barramentos
- O barramento de endereço 地址总线 carrega o endereço que o processador deseja. Ele é unidirecional, do processador para a memória.
- O barramento de dados 数据总线 carrega os dados ou a instrução em si. É bidirecional, porque leituras e escritas ocorrem em direções opostas.
- O barramento de controle 控制总线 carrega sinais de controle como leitura, escrita, clock e interrupção. É bidirecional.

Os três barramentos do sistema conectando processador, memória e entrada/saída
Which bus is one-way (carries information in only one direction)? · Qual barramento é unidirecional (carrega informação em apenas uma direção)?
The address bus is one-way (CPU → memory). The data and control buses are two-way. · O barramento de endereço é unidirecional (CPU → memória). Os barramentos de dados e controle são bidirecionais.
Worked example: how wide is wide enough?
- An $n$-bit address bus can address $2^{n}$ locations. A 16-bit bus reaches $2^{16} = 65\,536$ locations; a 32-bit bus reaches $2^{32}$, about four billion.
- "State one effect of increasing the width of the address bus": more memory locations can be addressed.
- "State one effect of increasing the width of the data bus": more bits move in each transfer, so fewer transfers are needed for the same data.
- Widen the address bus and you can have more memory; widen the data bus and you move it faster.
Exemplo resolvido: quão largo é suficiente?
- Um barramento de endereço de $n$ bits pode endereçar $2^{n}$ locais. Um barramento de 16 bits alcança $2^{16} = 65\,536$ locais; um de 32 bits alcança $2^{32}$, cerca de quatro bilhões.
- "Diga um efeito de aumentar a largura do barramento de endereço": mais locais de memória podem ser endereçados.
- "Diga um efeito de aumentar a largura do barramento de dados": mais bits são transferidos em cada transferência, então menos transfers são necessárias para os mesmos dados.
- Alargar o barramento de endereço permite mais memória; alargar o barramento de dados aumenta a velocidade de transferência.
How many memory locations can a 16-bit address bus reach? · Quantos locais de memória um barramento de endereço de 16 bits pode alcançar?
$2^{16} = 65\,536$ locations. · $2^{16} = 65\,536$ locais.
A wider address bus lets the CPU address more memory locations. · Um barramento de endereço mais largo permite que a CPU acesse mais locais de memória.
Each extra address line doubles the reach — n lines address 2ⁿ locations. · Cada linha de endereço extra dobra o alcance — n linhas endereçam 2ⁿ locais.
Register transfer notation
- Movements between registers and memory are written in register transfer 寄存器传送 notation:
MAR ← [PC]means "copy the contents of the PC into the MAR". - Square brackets mean "the contents of", and
[[MAR]]means "the contents of the location whose address is in the MAR". - The whole fetch-execute cycle is written this way in the next lesson; the notation is the same as the pseudocode assignment arrow.
Notação de transferência de registrador
- Movimentos entre registradores e memória são escritos em notação de transferência de registrador 寄存器传送:
MAR ← [PC]significa "copiar o conteúdo do PC para o MAR". - Colchetes significam "o conteúdo de", e
[[MAR]]significa "o conteúdo da localização cujo endereço está no MAR". - Todo o ciclo busca-executar é escrito assim na próxima lição; a notação é a mesma da seta de atribuição pseudocódigo.
What does MAR ← [PC] mean? · O que significa MAR ← [PC]?
The arrow points at the destination and the square brackets mean "the contents of". This is the first step of every fetch. · A seta aponta para o destino e os colchetes significam "o conteúdo de". Este é o primeiro passo de todo fetch.
Marks that slip away
- The PC holds the address of the next instruction, not the current one; the CIR holds the instruction, not an address.
- The MAR holds an address, the MDR holds data. Mixing them costs both marks.
- Only the address bus is one-way. Saying "all buses are one-way" or "the data bus is one-way" is a common slip.
- Registers are inside the processor, not part of RAM, and they are faster than any memory.
Marcas que escapam
- O PC mantém o endereço da próxima instrução, não da atual; o CIR mantém a instrução, não um endereço.
- O MAR mantém um endereço, o MDR mantém dados. Misturá-los custa ambas as notas.
- Apenas o barramento de endereço é unidirecional. Dizer "todos os barramentos são unidirecionais" ou "o barramento de dados é unidirecional" é um erro comum.
- Registradores estão dentro do processador, não fazem parte da RAM, e são mais rápidos que qualquer memória.
The program counter holds the instruction that is currently being executed. · O contador de programa segura a instrução que está sendo executada atualmente.
The PC holds the address of the next · próxima instruction. The current instruction sits in the CIR. · O PC segura o endereço da próxima instrução. A instrução atual fica no CIR.
You've got it
- Von Neumann: one memory (IAS) holds instructions and data; the processor fetches and executes them one at a time
- ALU computes, CU decodes and signals, the clock keeps the steps in time
- PC next address · MAR address being accessed · MDR data · CIR current instruction · ACC result · IX offset · status register flags
- address bus one-way, $2^{n}$ locations; data and control buses two-way;
MAR ← [PC]copies the contents of PC into MAR
Entendeu?
- Von Neumann: uma única memória (IAS) guarda instruções e dados; o processador as busca e executa uma de cada vez
- ALU calcula, CU decodifica e sinaliza, o clock mantém os passos no tempo
- PC próximo endereço · MAR endereço sendo acessado · MDR dados · CIR instrução atual · ACC resultado · IX offset · registrador de status flags
- barramento de endereço unidirecional, $2^{n}$ locais; dados e controle bidirecionais;
MAR ← [PC]copia o conteúdo do PC para o MAR