Uploaded by Sai Chandra

Chapter 1 Lecture Notes

advertisement
Chapter 1: Computer Systems Overview (Lect. Slides 1-14)
● A computer consists of 4 main structural elements:
○ 1. Processor
■ It is also termed as the Central Processing Unit (CPU).
■ It controls the operation of the computer and performs its data
processing functions.
○ 2. Main Memory
■ It is also termed as the Random Access Memory (RAM).
■ This memory is volatile, meaning it erases its storage once the
computer power turns off.
■ It stores the current data and programs.
○ 3. I/O Modules
■ These modules move data between the computer and its external
environment.
■ This external environment consists of external disks and other
terminals.
○ 4. System Bus
■ Provides for communication among processors, main memory, and
I/O modules.
■ The Bus is a subsystem that is used to transfer data and other
information between devices.
○ Processor in Detail:
■ Every processor has 3 parts to it:
● Control Unit (CU) - It determines the sequence of operations
including branch instructions that transfer control from one
part of a program to another.
● Arithmetic Logic Unit (ALU) - Carries out basic arithmetic
and logical operations.
● Registers - Registers usually consist of a small amount of
fast storage and is a quickly accessible location available to
a computer’s processor.
■ The CPU contains the following Registers:
● 1. Program Counter (PC) - holds the address of the next
instruction to be executed.
● 2. Instruction Registry (IR) - holds the instruction currently
being executed.
● 3. Accumulator (AC) - intermediate arithmetic logic unit
results are stored in this register.
● 4. Memory Address Register (MAR) - stores the memory
address from which data will be fetched to the CPU or the
address to which data will be sent and stored.
● 5. Memory Buffer Register (MBR) - Contains the data to be
written into memory or receives the data read from memory.
● 6. I/O Address Register (I/O AR) - holds the address of a
particular I/O device.
● 7. I/O Buffer Register (I/O BR) - holds the data to be
exchanged between the I/O module and the processor.
● Instruction Cycle is a program to be executed by a processor consists of a set of
instructions stored in the memory.
○ Instruction processing consists of 2 steps:
■ Read instructions from memory (fetch stage)
■ Execute each instruction (execute stage)
○ Program Execution consists of a repeating process of instruction fetch and
instruction execution. The processing required for a single instruction is
called an Instruction Cycle.
■ Program Counter (PC) holds the address of the next instruction to
be fetched.
■ After each instruction, the Program Counter (PC) is incremented.
○ The processor interprets the instruction and performs the required actions.
These actions fall into 4 categories:
■ The processor to memory (and vice versa) [Sending Data]
■ Processor to I/O device (and vice versa) [Sending Data]
■ Data processing.
■ Control: This alters the sequence of execution.
Instruction Cycle
Fetch
Start
Execute
Stop
● Most modern processors include instructions that contain more than one
address. Thus the execution stage for a particular instruction may involve more
than one reference to memory.
○ However, we will restrict ourselves to instructions with one address only.
● Instruction format:
Op-code
0
Address
34
Operation to be performed
13
Address of the operand
● Interrupts are provided primarily as a way to improve processor utilization. I/O
modules interrupt normal processing of the CPU. With interrupts, the processor
can be engaged in executing other instructions while an I/O operations is in
progress.
Related documents
Download