0% found this document useful (0 votes)
41 views

Introduction To Computer Architecture

Uploaded by

SURYA SUMEET
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
41 views

Introduction To Computer Architecture

Uploaded by

SURYA SUMEET
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 17

INTRODUCTION TO COMPUTER ARCHITECTURE 2023

Computer Organization-CPU

Computer Organization is concerned with the way the hardware


components operate and the way they are connected together to form
computer system. It includes Hardware details transparent to the
programmer such as control signal and peripheral. It describes how the
computer performs. Computer Organization is realization of what is
specified by the computer architecture. It deals with how operational
attributes are linked together to meet the requirements specified by
computer architecture.

Computer Architecture-Microprocessor

Computer Architecture is concerned with the structure and behavior of


comp system as seen by the user. It includes information, formats,
instructions set and techniques for addressing memory. It describes
what the computer does. Computer Architecture deals with giving
operational attributes of the computer or Processor to be specific. It
deals with details like physical memory, ISA (Instruction Set
Architecture) of the processor, the no of bits used to represent the data
types, Input Output mechanism and technique for addressing
memories.

INTEL: Integrated Electronics


AMD
MOTOROLA
FETCH-----PRIMARY MEMORY

G. By: Amit Kumar Shukla, CIMAGE GROUP OF INSTITUTIONS, PATNA Page 1


INTRODUCTION TO COMPUTER ARCHITECTURE 2023

CACHE MEMORY (in between CPU and Primary memory)


DECODE----CONTROL UNIT (generate signals, initiated decision
making)
EXECUTE---SPECIFIC SECTION OF CPU-REGISTERS, ALU, and FPU
is utilized.
INPUT PROCESS (CPU)OUTPUT

MEMORY-

WORKING MEMORY-RAM

NON-WORKING MEMORY-HARD DISK

RELOCATABLE

Process management:

PCB: PROCESS CONTROL BLOCK

OR

TCB: TASK CONTROL BLOCK

States of Process---

New---ready----running-----waiting ----- terminating

New---ready ----- Job scheduled (Primary memory)

Ready---running ----- CPU

Scheduled -- CPU Scheduler-

Running----terminating (final

G. By: Amit Kumar Shukla, CIMAGE GROUP OF INSTITUTIONS, PATNA Page 2


INTRODUCTION TO COMPUTER ARCHITECTURE 2023

Execution Process) FCFS, SJF…..Running- waiting --- Medium term


scheduler

CPU (Central processing Unit):


As we know that, execution is the main function of the computer. The
program to be executed is a set of instructions that is stored in the
computer’s memory. Tasks are completed when the instructions of the
program are executed by the Central Processing Unit (CPU).It is the
brain of the computer.

It is responsible for control and coordinates entire operation of


the computer system. It generate control signals for initiating fetching
of instructions, after completion of fetching of instruction, it decodes
the instruction to finalize the execution process. It activates the
peripherals (input device, output device and storage devices) to
perform input/ output operations.

Components of CPU:
1. Control Unit
2. ALU
3. Registers
1. Control Unit:
The control unit is necessary if the CPU is to function efficiently and
information/data is to be transferred between the CPU and other
devices. It does not perform the actual processing of data, but
manages and coordinates the entire computer system, including the
input/output devices. It is the brain of the computer. It is responsible

G. By: Amit Kumar Shukla, CIMAGE GROUP OF INSTITUTIONS, PATNA Page 3


INTRODUCTION TO COMPUTER ARCHITECTURE 2023

for control and coordinates entire operation of the computer system.


It generate control signals for initiating fetching of instructions, after
completion of fetching of instruction, it decodes the instruction to
finalize the execution process.
2. ALU (Arithmetic and Logical Unit):
All Arithmetic and logical operations is accomplished by ALU. It
handles only integral operations. For handling floating point
operations, exponential operations, logarithmic operations and
trigonometric operations, additional math co-processor is added
known as FPU (Floating Point Unit).
e.g.
2.6
26x10-1 ----------- m=26
0.26x101-------m=0.26 ------ NFP
0.026x102 ---- m=0.026
0.0026x103 -- m=0.0026
mxbe ------0.1<m<=1 ---- NFP
m:mantissa
b:base
e:exponent
Mathematically,
In NFP (Normalized floating point) representation,
1/b<m<=1
Where b is base of any number system, m is mantissa.
For base b=10; for decimal number system
1/10<m<=1
i.e. 0.1<m<=1

G. By: Amit Kumar Shukla, CIMAGE GROUP OF INSTITUTIONS, PATNA Page 4


INTRODUCTION TO COMPUTER ARCHITECTURE 2023

For base b=2;


1/2<m<=1
i.e. 0.5<m<=1

For base b=8;


1/8<m<=1
i.e. 0.125<m<=1

For base b=16;


1/16<m<=1
i.e. 0.0625<m<=1

FPU handles only the Normalized floating point value.

3. Registers
It is the memory cell used to store intermediate results obtained
during the execution of instructions. There are three types of
registers available with CPU.
a. Accumulator register
b. General Purpose register
c. Special purpose register
a. Accumulator register
It is used for temporarily storing the intermediate result of ALU
part of operation.
A=A+1 i.e. counter variable
S=S+A i.e. accumulator variable
For (A=1;A<=10;A++)
Print A
S=S+A;

G. By: Amit Kumar Shukla, CIMAGE GROUP OF INSTITUTIONS, PATNA Page 5


INTRODUCTION TO COMPUTER ARCHITECTURE 2023

Print S
S=0 Accumulator variable
A=1 to 10 Counter variable
AC ALU
S=55 Adder---A=10
S=S+A
Subtract or
Multiplier
Divide

b. General Purpose Registers


It is used to temporarily hold the partial result of instruction during
execution of the program.
c. Special Purpose Registers:

It is used for specific purpose within the system.

i. PCR (Program Counter Register)


The program counter keeps track of the address of the instruction
which is to be executed next. So, it holds the address of the memory
location which contains the next instruction to be fetched from the
memory. Its content is automatically incremented after an
instruction has been fetched assuming that instructions are normally
executed sequentially.
ii. Stack Pointer Register
The stack is a sequence of memory locations defined by the user. It is
used to save the contents of a register if it is required during the
execution of a program. The stack pointer holds the address of the
last occupied memory location of the stack. Thus, it indicates up to

G. By: Amit Kumar Shukla, CIMAGE GROUP OF INSTITUTIONS, PATNA Page 6


INTRODUCTION TO COMPUTER ARCHITECTURE 2023

what memory locations the stack is already filled up. In other words,
it indicates from which memory location onward the stack is vacant
for further storage.
iii. Status Register
The status register is also known as condition code or flag register. It
holds 1-bit flag to indicate certain conditions that arise during ALU
operations. Some of the status flag registers shown by computer are
as follows:
Carry-It indicates whether there is overflow or not.
Zero- It indicates whether the result is zero or nonzero.
Sign- It indicates whether the result is positive or negative.
Parity- It indicates whether the result contains odd number of 1s or
even number of 1s.
e.g.
EVEN PARITY: 1 0111000
ODD PARITY: 0 0111000
iv. Instruction Register
It holds an instruction until it is decoded. If there is more than one
CPU, then instruction register is also available as per availability of
CPU.
v. Index Register
Index registers are used for addressing. It is responsible for
generating the effective address of the instruction during execution
of an instruction. The address of an operand is the sum of the
contents of the index register and constant. This constant added to
the contents of index registers to form the effective address, i.e. the
address of the operand. It is automatically incremented or
decremented.

G. By: Amit Kumar Shukla, CIMAGE GROUP OF INSTITUTIONS, PATNA Page 7


INTRODUCTION TO COMPUTER ARCHITECTURE 2023

vi. Memory Address Register


It holds the address of the instruction or data to be fetched from the
memory. The CPU transfers the address of the next instruction from
the PCR to the MAR. From MAR it is sent to the memory through the
address bus. It is also known as Address Register.
vii. Memory Buffer Register
It holds the instruction code or data received from or sent to the
memory. It is connected to the data bus. The data which are written
into the memory are held in this register until the write operation is
completed. It is also known as DATA Registers. Thus, the flow of
data from the CPU to the memory or from the memory to the CPU is
always through MBR. It is within the CPU.

INSTRUCTION: A*B+C
AB*C+
AC ---- A
ALU-MULTIPLIER-B
PCR-holds the address of the next instruction to be
executed inside the system.
int a,b,c,d,e,f,g,h,i,j;
int a(10);
or
dim a(10) as Integer
dim i as Integer
Base Address=Address of FIRST element i.e. a(0)=1000

G. By: Amit Kumar Shukla, CIMAGE GROUP OF INSTITUTIONS, PATNA Page 8


INTRODUCTION TO COMPUTER ARCHITECTURE 2023

1000=a(0)=12
1002=a(1)=23
1004=a(2)=34
1006=a(3)=45
1008=a(4)=56
1010=a(5)=21
1012=a(6)=78
1014=a(7)=89
1016=a(8)=98
1018=a(9)=100

Sum=0
for(int i=0;i<10;i++)
scanf(“%d”, &a*i+);
sum=sum+a[i];
printf(“%d”, a*i+);

sum=0
for i=0 to 9
input a(i)
sum=sum+a(i)
next i
print sum

Base address=address of the first element=1000

G. By: Amit Kumar Shukla, CIMAGE GROUP OF INSTITUTIONS, PATNA Page 9


INTRODUCTION TO COMPUTER ARCHITECTURE 2023

Address of any location i.e. loc


=base address+ weight of data (i.e. size of each
individual data in the list)*loc

Address of a(1)
=base address+ 2*1
=1000+2*1
=1002

Address of a(5)
=base address+ 2*5
=1000+10
=1010
Microprocessor- Introduction
Microprocessor is an electronic chip that functions as the central
processing unit (CPU) of a computer. Microprocessor-based system
with limited resources is called microcomputer.
Available with almost all consumer electronic devices such as:
 Computer printers
 Washing machines
 Mobile phones
 Fax machines
 Photocopiers
 Advance applications such as radar, satellites, and flights.

G. By: Amit Kumar Shukla, CIMAGE GROUP OF INSTITUTIONS, PATNA Page 10


INTRODUCTION TO COMPUTER ARCHITECTURE 2023

Basically, microprocessor chips have ALU along with the associated


control logic to process the instruction execution. Almost all
microprocessors use the basic concept of stored-program execution.

Programs or instructions to be executed by the microprocessor are


stored sequentially in memory locations. The microprocessor fetches
the instruction one after another and executes them in its ALU.

Terminology related with microprocessor


Chip: It is an IC (Integrated Circuit), a small, thin piece of
silicon with the required circuits and transistors.
Bit: A bit means a binary digit. It is the smallest measuring unit of
computer. A bit can have only two values i.e. 0 or 1.

Bit size: The bit size of a microprocessor refers to the


number of bits that can be processed simultaneously by the
basic arithmetic circuits of the microprocessor.
Word: It is the number of bits grouped together for processing.
Memory word: The number of bits that can be stored in a register
or memory element is called memory word.

Byte: An 8-bit word is referred to as a byte.

Nibble: A 4-bit word is referred to as a nibble.

1 memory word= 8 bits

G. By: Amit Kumar Shukla, CIMAGE GROUP OF INSTITUTIONS, PATNA Page 11


INTRODUCTION TO COMPUTER ARCHITECTURE 2023

1 byte= 8 bits

1KB= 1024 byte= 210 bytes

1MB=1024 KB= 210 KB= 220 bytes

1GB=1024 MB= 210 MB= 230 bytes

1TB=1024 GB= 210 GB= 240 bytes

RAM: Volatile memory, Read/Write memory in which a particular


memory location can be erased and written with new data at any
time.

Volatile means that the contents of the memory are erased when
the power to the chip is disrupted. The access of the individual
memory location can be done randomly.

In microprocessor, RAM is used to store data temporarily.

DRAM: Dynamic Random Access Memory is a semiconductor


memory in which the stored contents need to be refreshed
repeatedly at about thousands of times per second. Without
refreshing, the stored data will be lost.

SRAM: Static Random Access Memory chips keep the data stored in
it as long as power is available. There is no need for refreshing. It is
faster than DRAM.

ROM: Read Only Memory devices are memory devices whose


contents are retained even after removing the power supply.

G. By: Amit Kumar Shukla, CIMAGE GROUP OF INSTITUTIONS, PATNA Page 12


INTRODUCTION TO COMPUTER ARCHITECTURE 2023

Microcontroller: A microcontroller is a chip that includes


microprocessor, memory, and I/O signal ports. It can be called single-
chip microcomputer.

Microcomputer: the system formed by interfacing the


microprocessor with the memory and I/O devices to execute the
required programs is called microcomputer.

Bus: It is a group of wires/lines that carry similar information.

System bus: It is a group of wires/lines used for communication


between the microprocessor and peripherals.

Firmware: It is the software written for a microprocessor which


replaces the hardware. These are stored in the permanent storage or
ROM of the computer system.

Input device: The devices that are used for providing data and
instructions to the microprocessor or microcomputer are called input
devices.

Output device: The devices that are used for transferring data out of
the microprocessor or microcomputer are called output devices.

Hard disk: Secondary memory used for permanently storing the


program for accession.

Computer Architecture: the design, internal configuration, and


accesses in a digital computer are together called computer
architecture.
Von-Neumann Architecture: In which the same memory is used for
storing program as well as data.

G. By: Amit Kumar Shukla, CIMAGE GROUP OF INSTITUTIONS, PATNA Page 13


INTRODUCTION TO COMPUTER ARCHITECTURE 2023

Harvard Architecture: In which programs and data are stored in two


separate memory units.
CISC Processor: supports many machine language instructions.
RISC Processor: supports limited machine language instructions.
HLL: In which programs are written without the knowledge of the
processor in which the program will be executed.
Assembly Language: In which programs are written using mnemonics
or instruction set of a particular microprocessor. It is microprocessor
specific.
Machine Language: It refers to binary code programs that are specific
to the processor and can be directly executed by the processor.
Translator: used for conversion of source code into object code. Where
source code is the language other than the machine language and
object code is the machine language.
Assembler: converts assembly language into machine language.
Compiler: converts HLL into machine language.
Interpreter: converts HLL into machine language.
BIOS: Basic I/O System is a set of programs that handles the input and
output functions and interact with the hardware directly.
Clock: The circuit in the computer that generates the sequence of
evenly spaced pulse to synchronize the activities of the processor and
its peripherals is called clock.
Clock Speed: The clock speed determines the speed of the operation of
the computer.
MIPS: Million Instructions per Second is a measure of the speed at
which the instructions are executed in a processor.
Tri-state Logic:
Logic Level High (1): source current

G. By: Amit Kumar Shukla, CIMAGE GROUP OF INSTITUTIONS, PATNA Page 14


INTRODUCTION TO COMPUTER ARCHITECTURE 2023

Logic Level Low (0): sink current


Logic level High Impedance (Z): neither source nor sink current, so the
other devices connected to it are not affected.
Operating System: The program that controls the entire computer and
its resources and enables users to access the computer and its
resources is called operating system.
Microprocessors and Microcontrollers
As we know that, the microprocessor is the principal element of a
computer as it executes lists of instructions. There are two types of
processors manufactured i.e. microprocessor and microcontroller.
Microprocessor: multiple task executors.
Microcontrollers: specific task executor.

Microprocessor-Based System or VON NEUMANN ARCHITECTURE:


A computer system which handles multiple task is called
microprocessor based system or microcomputer system. It consists of
CPU, memory, and I/O ports.
CPU MEMORY INPUT OUTPUT

ADDRESS BUS
DATA BUS

CONTROL BUS
BUS: It is set of wires used for transfer the contents
(i.e. data address or control signals) from one location
to another.

G. By: Amit Kumar Shukla, CIMAGE GROUP OF INSTITUTIONS, PATNA Page 15


INTRODUCTION TO COMPUTER ARCHITECTURE 2023

The interfacing of the processor with the other parts of the


microcomputer system needs 3-bus architecture. These 3-buses
are data bus, address bus, and control bus.

Classification of microprocessors
Microprocessors can be classified based on-
1. Size or Specification
2. Application
3. Hardware and Architecture
1. Size or Specification
Based on the size of the data that the microprocessor can
handle, they are classified as-
4-bit, 8-bit, 16-bit, 32-bit, 64-bit and 128-bit
microprocessors.
2. Application
Based on the Application of the processors, they are
classified as follows:
a. General-Purpose Microprocessors
b. Microcontrollers
c. Special-Purpose Microprocessors
a. General-Purpose Microprocessors
Those processors that are used in general computer
system integration and can be used by the programmer for
any application comes under General-Purpose
Microprocessor category. e. g. Intel 8086 and its family.

G. By: Amit Kumar Shukla, CIMAGE GROUP OF INSTITUTIONS, PATNA Page 16


INTRODUCTION TO COMPUTER ARCHITECTURE 2023

b. Microcontrollers
It is a microprocessor chips with built-in hardware for the
memory and ports. These chips are programmed by the
user for any generic control application. e.g.
microcontrollers are used in computer keyboards,
monitors, printers, copiers, fax machines, and telephone
systems etc.
c. Special-Purpose Microprocessor
It is designed specifically to handle special functions
required for an application. Digital Signal Processors (DSP)
is example of special-purpose microprocessors. e. g. GPU
(Graphics Processor Unit), FPU (Floating Point Unit) etc.
3. Hardware and Architecture
Based on the hardware and architecture of the processors,
they are classified as follows:
a. RISC (Reduced Instructions Set Computers ) Processors
b. CISC (Complex Instructions Set Computers) Processors
c. VLIW (Very Large Instruction Word) Processors
d. Superscalar Processors
e. EPIC (Explicit Parallel Instruction Computing)
a. RISC Processors
It supports limited machine language instructions and
executes programs faster than CISC processors.
b. CISC Processors
G. By: Amit Kumar Shukla, CIMAGE GROUP OF INSTITUTIONS, PATNA Page 17

You might also like