0% found this document useful (0 votes)
60 views25 pages

Lecture 04

The document summarizes the basic components and functions of a computer. It discusses the CPU which includes the ALU for arithmetic/logical operations, control unit for coordinating operations, and registers for temporary storage. It also describes the main memory and input/output devices. The CPU fetches instructions from memory and uses the ALU to perform operations on data based on the instructions. The control unit controls data movement and execution of instructions. Registers like the program counter, instruction register, and memory address register help transfer information within the computer.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
60 views25 pages

Lecture 04

The document summarizes the basic components and functions of a computer. It discusses the CPU which includes the ALU for arithmetic/logical operations, control unit for coordinating operations, and registers for temporary storage. It also describes the main memory and input/output devices. The CPU fetches instructions from memory and uses the ALU to perform operations on data based on the instructions. The control unit controls data movement and execution of instructions. Registers like the program counter, instruction register, and memory address register help transfer information within the computer.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 25

Saba institute of higher education

Faculty of Computer Science

Computer Fundamentals

Basic Computer
Architecture

Khalil Ahmad Faizi

1
Contents
● Functions of a Computer
● CPU
– ALU

– CU
–Registers

● Memory
● Cash Memory
● Simple Program
2
Introduction: What is a computer?
● Simply, a computer is an electronic machine that:
– Accepts input information,
– Processes the information according to a list
of internally stored instructions, and
– Produces the resulting output information.

3
Introduction: What is a computer?...

Functions performed by a computer are:
– Accepting information to be processed as input.
– Storing a list of instructions to process
the information.
– Processing the information according to the list
of instructions.
–Providing the results of the processing as output.

What are the functional units of a computer?

4
Organization of a Computer System

Central
Processing
Unit
Input Output
Device
Main Device
Memory

Secondary
Storage

Slide 1- 5
6
Functional units of a computer
Input unit accepts Arithmetic and logic unit(ALU):
information: •Performs the desired
• Human operators, operations on the input
• Electromechanical devices information as determined
• Other computers by instructions in the
memory
Memory
Arithmetic
Input & Logic
Instr1

Instr2
Output Instr3 Control

Data1
I/O Stores Processor
Data2
information: Control unit coordinates
Output unit sends various actions
• Instruction
results of processing: • Input,
• To a monitor display, s,
• Data • Output
• To a printer 8
• Processing
Input Devices
● Any type of device that provides data to a
computer from the outside world
● For example:
– Keyboard
– Mouse
– Scanner

Slide 1- 8
Output Devices

Any type of device that provides data from a computer
to the outside world

Examples of output data:
– A printed report
– An image such as a picture
– A sound
● Common output devices include:
– Monitor (display screen)
– Printer

10

Slide 1- 9
Central
Processing Unit
CPU Input/

Bus Output
Devices

RAM

10
CPU and System
Hardware

11
Processors (CPU)

● Component which executes a program.


● Most PCs have only one processor (CPU) – these
are “serial” or “scalar” machines.
● High-performance machines usually have many
processors – these are “vector” or “parallel”
machines.

12
Processor (CPU)...
● Fetches instructions from main memory
● Carries out the operations commanded by the instructions
● Each instruction produces some outcome

A sequence of instructions to perform a task is called
a program.

Instructions are stored in the memory as binary
numbers
➔ – Binary number - a sequence of 1’s
and 0’s
Processor fetches instructions that make up a program
from the memory and performs the operations stated in 14

those instructions.
Slide 1- 14
Information in a computer -- Instructions

Instructions specify commands to:

Transfer information within a computer (e.g., from
memory to ALU)

Transfer of information between the computer and I/O
devices (e.g., from keyboard to computer, or computer to
printer)

Perform arithmetic and logic operations (e.g., Add two
numbers, Perform a logical AND).


What do the instructions operate upon?

14
Information in a computer -- Data

Data are the “operands” upon which instructions operate.

Data could be:

Numbers,
● Encoded
characters.

Data, in a broad sense means any digital information.

Computers use data that is encoded as a string of
binary
digits called bits.

15
CPU and System
Hardware

16
CPU ..
● .The CPU consists of 3 main parts:
– ALU - where arithmetic and logical operations performed

– Control Unit (CU) - controls data movement and execution of


instructions

Fetch: Ask the RAM for the instruction whose address is stored
in IP.

Execution: There are only a small number of possible instructions.
Depending on which it is, do what is necessary to execute it.

– Registers - small high speed storage areas

17
Arithmetic Logic Unit (ALU)
● The actual processing of the data and instruction are
performed by Arithmetic Logical Unit
● The major operations performed by the ALU are
addition, subtraction, multiplication, division, logic and
comparison.
● Data is transferred to ALU from storage unit when
required

18
Arithmetic Logic Unit (ALU)...
– AC = accumulator holds results
– MQ = memory-quotient holds second portion of
long results
– MBR = memory buffer register holds data while
operation executes

19
Control Unit
(CU)
● The Control Unit acts like the supervisor
● It extracts instructions from memory and decodes and
executes them, and sends the necessary signals to the
ALU to perform the operation needed.

The control unit determines the sequence in
which computer programs and instructions are
● executed.
Processing of programs stored in the main memory,
interpretation of the instructions and issuing of signals
for other units of the computer to execute them.

20
Functioning of Control Unit
(CU)
Start

Is there No
instructions
any
awaiting
execution?

Yes

Fetch the Instruction

No Execute the Instruction

Transfer Control to
error handler Are there any errors?

22
Ye
s
Control Unit
(CU)...

Program control determines what computer does based
on instruction read from memory
– MAR = memory address register holds address of memory cell to be
– read PC = program counter; address of next instruction to be read
– IR = instruction register holds instruction being executed
– IBR holds right half of instruction read from memory

22
Registers:
• The CPU processes data and instructions
• It is necessary to transfer the processed data with
high speed.
• So the computer uses a number of special
memory units called registers.
• They are not part of the main memory but they
store data or information temporarily and pass it on
as directed by the control unit.

23
MAR,
MDR
• MAR (Memory Address Register) holds the
address of the memory location being read from or
written to memory
• MDR (Memory Data Register) holds the data that
is being read from or written to memory
– Bi-directional connection to bus for reading and
writing

25
Thank you for your attention!

25

You might also like