[go: up one dir, main page]

0% found this document useful (0 votes)
6 views35 pages

CCS 1101 Lecture-02

The document provides an overview of computer systems, focusing on the von-Neumann architecture, which includes a processor, memory, and input/output devices. It discusses various components of a computer system, including hardware and software, and details the functions of the Central Processing Unit (CPU), memory types, and data representation. Additionally, it explains the roles of different types of registers and the significance of the system clock in processing operations.

Uploaded by

dokoth362
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)
6 views35 pages

CCS 1101 Lecture-02

The document provides an overview of computer systems, focusing on the von-Neumann architecture, which includes a processor, memory, and input/output devices. It discusses various components of a computer system, including hardware and software, and details the functions of the Central Processing Unit (CPU), memory types, and data representation. Additionally, it explains the roles of different types of registers and the significance of the system clock in processing operations.

Uploaded by

dokoth362
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/ 35

CCS 1101:

Introduction To Computer Science

Computer System
Components
1
Computer Systems Organization
The von-Neumann Architecture
 Named after John Von Neumann, who
proposed storing instructions in the
memory of a computer and using a control
unit to handle the fetch-decode-execute
cycle.
 Stored Program Concept - Storing
instructions in memory along with data
 There are 3 major units in this architecture
tied together by buses: Processor,
Memory, Input /Output devices
2
Computer Systems Organization

 The bottleneck in von-Neumann is the


fetch-decode-execute cycle.
 It is difficult to speed up operations due
to use of one processor.

Other architectures with improved


speeds:
 Synchronous processing: multiple
processors apply the same program to
multiple data sets.
 Pipelining: Arranges processors in
tandem, where each processor
contributes one part to an overall 3
Synchronous processing

• One approach to parallelism is to have


multiple processors apply the same
program to multiple data sets

Processors in a synchronous
computing environment
Pipelining
• Arranges processors in tandem,
where each processor contributes
one part to an overall computation

Processors in a
pipeline
Shared-Memory

Shared Memory

Processor Processor Processor Processor

Local Local Local Local


Memory1 Memory2 Memory3 Memory4

Different processors do different things


to different data.
A shared-memory area is used for
communication.
COMPONENTS OF A COMPUTER SYSTEM

A computer system is composed of


1. Hardware
2.Software

A computer is composed of hardware and


software, and can exist in a variety of sizes
and configurations.

7
Hardware components
Hardware- The physical parts of a
computer. Hardware components are the
physical, tangible pieces that we can see
and touch e.g. a CPU, a keyboard and a
monitor etc.
Internal hardware
 Located inside the main box (system unit) of the
computer
e.g. Memory card

External hardware
 Located outside the system unit
 Connect to the computer via a wired or
wireless connection 8
Hardware components
A computer consists of five primary hardware
components:
1.Input devices - Used to input data into the
computer
 Keyboards, mice, scanners, cameras,
microphones, joysticks, touch pads, touch
screens, fingerprint readers, etc.
2.Processing devices-Perform calculations and
control computer’s operation
 The central processing unit (CPU), and
Memory
3.Output devices- Present results to the user
 Monitors, printers, speakers, projectors, etc.
4.Storage devices- Used to store data on or access
data from storage media 9


Hardware components: system unit
System Unit is a case that contains electronic
components of the computer used to process
data.
 Made of metal or plastic to protects the
internal components from damage.
 All computers have a system unit. It is
available in variety of shapes & sizes.

The computer system consists of three units:


 Input device
10
 Central Processing Unit (CPU)
Hardware components: system unit

11
The Components of the system unit
1. Processor interprets & carries out the
basic instructions that operate a
computer.
2. Memory holds data waiting to be
processed & instruction waiting to be
executed.
3. Processor & Memory are connected to a
circuit board called the motherboard.
4. Adapter cards (expansion slots): are
circuit boards that provide connections
and functions not built into the
motherboard.
5. Devices outside the system unit often
attach to the ports.
12
6. A drive bay holds one or more disk drive.
The Components of the system unit

Motherboard, called system board.


It is a main circuit board of the system
unit.
Many electronic components attach to
the motherboard, others are built into it.
Ex: adapter cards, a processor chip and
a memory module.

13
Block diagram of a computer
The computer system consists of four units:
 Input devices
 Central Processing Unit (CPU)
 Output devices
 Storage devices
The various functions of these units can be
summarized as:
Unit Function
Input device: Reads information
from input media and enters to
the computer in a coded form
CPU
 Memory unit: Stores program and
data
 Arithmetic Logic unit: Performs arithmetic
and logical functions 14
 Control Unit: Interprets program
Block diagram of a computer

15
Central Processing Unit (CPU)
Its contain a control unit, registers &
an arithmetic logic unit (ALU).
These 3 components work together to
perform processing operations.

16
Central Processing Unit (CPU)
The CPU acts as the brain of the computer:
it fetches data and instructions from
memory
it executes the instructions
it stores results back to memory

The Arithmetic Logic Unit:


 Circuitry for arithmetic and logic
operations (e.g. addition, comparison,
OR).
 performs arithmetic, comparison and 17
Central Processing Unit (CPU)
The Control Unit
 fetches instructions from memory
decodes the instruction
executes the instruction
The control unit has two important registers:
PC- program counter - contains the
address in main memory of the next
instruction
IR- instruction register - holds the
instruction that is currently executing
18
Machine cycle
The control unit
 Fetches from main memory the
instruction whose address is in the
program counter.
The instruction is stored in the instruction
register and the program counter is
incremented to the next instruction
address.
 Decodes the instruction to understand
what needs to be done.
 Executes the instruction by performing
the operation on the data.
Central Processing Unit (CPU)

Registers
 The CPU contain special storage areas
called registers.
 Registers are high speed temporary data
storage area within the processor to
support execution activities.
 Their function is to hold instructions, data
values qnd memory addresses
 Both instructions or data can be stored in
registers for processing by the ALU.
 All processors have a certain number of
21
registers, the exact number varies
CPU: Types of registers
 Instruction Register (IR)
– It holds the instruction that is currently
being executed.
– Its output is available to the control unit
which generated the timing signals that
control the various processing elements
involved in executing the instruction
 General Purpose Register
– General purpose registers are used to store
temporary data within the microprocessor. It
is a multipurpose register.
 Program Counter (PC)
– It holds the address of the instruction to be
CPU: TYPES OF REGISTERS
 Stack Pointer (SP)
– It contains the address of a section of
memory known as stack which may be used
for temporary storage of data or addresses.
 Memory Address Register (MAR)
– It holds the address in memory to or from
which data are to be transferred.
 Memory Data Register (MDR)
– It contains the data to be written into or
read out of the addressed memory location.
– It is also known as memory buffer register
(MBR).
CPU: TYPES OF REGISTERS
 Status Register (SR) / Conditional Code
Register (CCR) / Status Flags
 A register with individual bits (flags) to
indicate condition of the processor as a
result of an arithmetic/logical operations.
 Common status flags:
– Carry (C)
– Positive result (P)
– Zero result (Z)
– Negative result (N)
– Arithmetic overflow (V)
CPU: THE ADVANTAGES OF USING REGISTERS

 Reducing instruction (program) length


– Memory address usually requires many bits,
– referencing registers requires only a few bits.
 Cutting down execution time
– Using register in complex expressions and
storing results instead of writing back to
memory, the number of CPU clock cycle
(time) can be reduced
 Ease of programming
– In processing a block of data consecutively in
memory, one can store starting address of
block in register. To retrieve data item, one
can simply increment the address in register,
Central Processing Unit (CPU)

The System Clock


Every CPU has a clock, It’s a small
quartz crystal circuit , which generates
regular clock pulses that control the
timing of all computer operations.
Processing actions occur at each “tick”
of the electronic clock.
The Speed of the clock determines the
speed at which the CPU can process
data.
Speed is measured in megahertz (MHz)
or (GHz). 26
Data Representation
How the CPU represents data
Binary system based on two digits 0 and
1. 0 : off 1 : on
Binary
Digit (bit)
Electronic
Charge
Electronic
State

Bit is a the smallest unit of data the


computer can process.
Byte a group of 8 bits.
A byte can be used to represent
characters. 27
Data Representation

How the CPU


represents data
The different
combinations of 0s
and 1s are defined
by patterns called
a coding schema.
There are tow popular
coding scheme:
1. ASCII stands for
American Standard 28
Code for
memory

Memory consist of electronic


components that store instructions
waiting to be executed by the processor,
data needed by those instructions, and
the results of processed data
( information).
Memory usually consist of one or more
chips on the motherboard.
Stores 3 basic categories of items:
1. The operations
2. Application programs
3. The data being processed by the 29
application programs and resulting
Memory

Memory sizes
It’s the number of bytes the chip or
devices has available for storage.
Approximate
Term Abb. Exact no. of byte
no. of byte

Kilobyte KB or K 1000 1,024

Megabyte MB 1Million 1,048,576

Gigabyte GB 1Billion 1,073,741, 824

Terabyte TB 1 Trillion 1,099,511,627,776


30
memory

A computer memory is of two types;


1.Primary Memory (Internal Storage)
2.Secondary Memory (External storage)
Primary Memory (Internal Storage)
 Primary memory is also called internal
memory and is an important part of a
computer. It is the main area in a computer
where the data is stored. The stored data
can be recalled instantly and correctly
whenever desired. This memory can be
quickly accessed by the CPU for reading or
storing information.
Primary memory is further classified 31
memory
RAM
 RAM is also known as read/write memory
as information can be read from and
written onto it.
 RAM is a place in a computer that holds
instructions for the computer, its
programs and the data.
 The CPU can directly access the data from
RAM almost immediately. However, the
storage of data and instructions in RAM is
temporary, the time the computer is
running.
 It disappears from RAM as soon as the32
Memory: RAM
DRAM = Dynamic RAM
 Dense but slow, must be refreshed
 Typical choice for main memory
SRAM: Static RAM
 Faster but less dense than DRAM
 Typical choice for cache memory
Cache
 A very fast type of RAM used to store
information that is most frequently or
recently used by the computer
 2-levels of cache; level 1 is faster but
smaller in size (internal cache), level 2 is 33
 It is called Read-only memory as
Memory: ROM
information can only be read from and not
written or changed onto ROM.
 ROM is the built-in-memory of a computer.
 It stores some basic input–output
instructions put by the manufacturer to
operate the computer.
 The storage of data and instructions in
ROM is permanent.
 It does not depend on the power supply
i.e. it is non-volatile memory.
 Manufacturers of ROM chips often record
data, instructions, or information on the
chip when they manufacture the chip.
 Computers almost always contain a small 34
amount of read-only memory that holds
Memory: ROM VS RAM

35

You might also like