Lecture 1
Lecture 1
by
Engr. B.S. Muhammad(BEng. BUK, MSc. ABU)
CPU design starts with the design of the instruction set that the processor will
execute and includes the design of the arithmetic and logic hardware that performs
computations, the register set that holds operands for computations, the control
unit that carries out the execution of instructions, and the internal buses, or
connections, that allow these components to communicate with each other.
Some examples of I/O devices are the computer keyboard, mouse, disk storage,
and graphical video displays. Other common I/O devices include network
interfaces, Wi-Fi and Bluetooth wireless interfaces, sound output to speakers,
and microphone input.
Fig.4 Central processing unit main components and interactions with the memory and I/O
The CPU fetches instructions from memory, reads and writes data from and to
memory, and transfers data from and to input/output devices.
Department of Computer Engineering
CPU
First, numbers are read from storage into the ALU’s data input port. Once inside
the ALU, they’re modified by means of an arithmetic calculation, and then
they’re written back to storage via the ALU’s output port.
In order to move data/instruction between the ALU and storage, some means of
transmission is required. Thus, the ALU reads from and writes to the data
storage area by means of the data bus, which is a network of transmission lines
for shuttling numbers around inside the computer. While the Instructions travel
into the ALU via the instruction bus.
The preceding example probably sounds simple, but it conveys the basic
manner in which computers operate. Computers are fed a sequence of
instructions one by one, and in order to execute them, the computer must first
obtain the necessary data, then perform the calculation specified by the
instruction, and finally write the result out. Those three steps are carried out
billions of times per second on a modern CPU, again and again and again.
It’s only because the computer executes these steps so rapidly that it’s able to
present the illusion that something complex is going on.
Register Set
Registers are essentially extremely fast memory locations within the CPU that
are used to create and store the results of CPU operations and other
calculations. Different computers have different register sets. They differ in the
number of registers, register types, and the length of each register.
The MDR and MAR are used exclusively by the CPU and are not directly
accessible to programmers.
In order to perform a write operation into a specified memory location, the
MDR and MAR are used as follows:
Similarly, to perform a memory read operation, the MDR and MAR are used
as follows:
1. The address of the location from which the word is to be read is loaded into the
MAR.
2. A read signal is issued by the CPU.
3. The required word will be loaded by the memory into the MDR ready for use by
the CPU.
Instruction Fetching Registers
Two main registers are involved in fetching an instruction for execution:
1. the program counter (PC) and
2. the instruction register (IR).
The IR is the register that holds the instruction currently being executed or
decoded. In a simple processors, each instruction to be executed is loaded
into the instruction register, which holds it while it is decoded, prepared and
ultimately executed
Data is transmitted from one part of a computer to another, connecting all major
internal components to the CPU and memory, by the means of Buses.
Control bus is part of the system bus, used by CPUs for communicating with other
devices within the computer.
Address bus carries the information about the device with which the CPU is
communicating, and
Data bus carries the actual data being processed.