Difference between revisions of "Computer Architecture"

From Coder Merlin
Line 16: Line 16:
== The ALU ==
== The ALU ==
== The CPU ==
== The CPU ==
== The Instruction Cycle ==
Digital computers generally follow a standard cycle, called the '''Fetch-Decode-Execute''' cycle. It is the basic operational process of a computer. From boot-up until shut down, the CPU (central processing unit) will retrieve a program instruction from memory, determine what the instruction means and how to fulfill that instruction, and then execute the necessary steps before repeating the cycle.
=== Fetch ===
The next instruction is fetched from the memory address that is currently stored in the
program counter (PC). The instruction is stored in the instruction register (IR). The PC is
then incremented.
=== Decode ===
The instruction is decoded by the instruction decoder.  If additional memory accesses are required to read operands, it happens here.
=== Execute ===
The instruction is executed by the control unit which sends a sequence of signals to
the relevant function units of the CPU such as reading values from registers, passing them to the ALU to perform mathematical or logical functions, and writing the results back to a register. The control unit may accept input from the ALU and update the program counter to a different address if so indicated before continuing to the next cycle.

== Key Concepts ==
== Key Concepts ==

Revision as of 08:58, 6 October 2019

Within these castle walls be forged Mavens of Computer Science ...
— Merlin, The Coder

(image on right)

Prerequisites[edit]

Introduction[edit]

Computers are amazing devices and play a significant role in nearly everything that we do. While seemingly complex, the basic architecture of a computer is straight-forward. In this experience, we'll take a look at memory, the central processing unit, the arithmetic logic unit, data and address buses, and examine how a computer processes instructions.

Overview[edit]

   Computer Architecture.png

Memory[edit]

The ALU[edit]

The CPU[edit]

The Instruction Cycle[edit]

Digital computers generally follow a standard cycle, called the Fetch-Decode-Execute cycle. It is the basic operational process of a computer. From boot-up until shut down, the CPU (central processing unit) will retrieve a program instruction from memory, determine what the instruction means and how to fulfill that instruction, and then execute the necessary steps before repeating the cycle.

Fetch[edit]

The next instruction is fetched from the memory address that is currently stored in the program counter (PC). The instruction is stored in the instruction register (IR). The PC is then incremented.

Decode[edit]

The instruction is decoded by the instruction decoder. If additional memory accesses are required to read operands, it happens here.

Execute[edit]

The instruction is executed by the control unit which sends a sequence of signals to the relevant function units of the CPU such as reading values from registers, passing them to the ALU to perform mathematical or logical functions, and writing the results back to a register. The control unit may accept input from the ALU and update the program counter to a different address if so indicated before continuing to the next cycle.


Key Concepts[edit]