0% found this document useful (0 votes)
4 views50 pages

Unit 1 Bca 303 Group C & Group H

The document provides an overview of computer architecture and organization, detailing the components and their functions, including the CPU, memory hierarchy, and input/output devices. It explains basic computer instructions, the instruction set, and the interconnection of functional components through buses. Additionally, it discusses the role of various registers within the CPU and their significance in processing tasks efficiently.

Uploaded by

aayan01ku
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)
4 views50 pages

Unit 1 Bca 303 Group C & Group H

The document provides an overview of computer architecture and organization, detailing the components and their functions, including the CPU, memory hierarchy, and input/output devices. It explains basic computer instructions, the instruction set, and the interconnection of functional components through buses. Additionally, it discusses the role of various registers within the CPU and their significance in processing tasks efficiently.

Uploaded by

aayan01ku
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/ 50

Topic:BCA –303 Basics of

Computer Architecture UNIT


1

Prepared By:
Dr Tejinder Kaur
Associate Professor
Basics of Computer Architecture
Computer architecture is about designing a computer system
to balance performance, efficiency, cost, and reliability. It
describes how a system is built from its components. This can
be a high-level overview or a detailed explanation, including the
instruction set architecture, micro architecture, logic design,
and implementation

• Computer Organization is about how the components of a


computer system, like the CPU, memory, and input/output
devices, are connected and work together to execute programs.
It focuses on the operational aspects and how hardware
components are implemented to support the architecture.
continue
continue
continue
Continue
• Key Components
• The key components of computer organization include:
• Central Processing Unit (CPU): The brain of the
computer, responsible for executing instructions.
• Memory Hierarchy: Includes registers, cache, RAM, and
secondary storage.
• Input/Output Devices: Devices that allow interaction
with the computer, such as keyboards, mice, and printers.
• Interconnection System: Buses and communication
channels that allow these components to interact
effectively.
Continue

• Basic Computer Instructions


• Basic computer instructions are the elementary operations
that a computer system can perform. These instructions are
typically divided into three categories:
• Data Movement Instructions: Move data between different
parts of the computer system. Examples include load and
store instructions.
• Arithmetic and Logic Instructions: Perform mathematical
and logical operations on data. Examples include add,
subtract, multiply, divide, AND, OR, and NOT instructions.
• Control Instructions: Control the flow of instructions within
the computer system. Examples include branch and jump
instructions
.
Continue
• Instruction Set
• The instruction set of a computer is a collection of instructions
that the CPU can execute. Some examples of basic computer
instructions include:
• Load: Moves data from memory to a CPU register.
• Store: Moves data from a CPU register to memory.
• Add: Adds two values and stores the result in a register.
• Subtract: Subtracts two values and stores the result in a register.
• Multiply: Multiplies two values and stores the result in a
register.
• Divide: Divides two values and stores the result in a register.
• Branch: Changes the program counter to a specified address
based on conditions.
• Jump: Changes the program counter to a specified address
continue
• Examples of Computer Architecture
• Computer Architecture describes the
abstract behavior and the programming
model of a computer system. Some popular
architectures are:
• x86 (Intel/AMD processors): The x86
architecture is used in most desktops,
laptops and servers. It started as a 16-bit
architecture (Intel 8086), then evolved into
32-bit (IA-32) and 64-bit (x86-64) variations.
continue
• ARM (mobile): The ARM (Advanced
RISC Machine) is RISC-based; it has low
power, hence its dominance in
smartphones, tablets, and embedded
systems. The high-performance, high-
efficiency characteristics of ARM
processors mean that they are common
not just in almost every mobile device but
also in modern laptops (Apple M-series)
and servers.
continue
• Computer Organization
• Computer Organization deals with the physical implementation of
a computer system. It focuses on how the hardware components are
interconnected and how they work together to execute instructions
defined by the architecture.
• Key Aspects of Computer Organization
• Hardware Components: These include CPU, memory, buses, ALU
(Arithmetic Logic Unit), and control units.
• Data Path Design: How data moves between registers, ALU, and
memory.
• Control Signals: How instructions are decoded and executed at the
hardware level.
• Performance Optimization: Techniques like caching, branch
prediction, and clock speed adjustments.
• Physical Layout: How circuits and chips are designed (e.g.,
microarchitecture).
continue
• Examples of Computer Organization
• Computer Organization is the internal structure of an
architecture. Two (or a single) firms might make
chips of the same architecture but with different
internal structures. Some examples are:
• Intel Haswell, Skylake microarchitectures: They
are alternate implementations of the x86
architecture. Haswell (4th Gen Core) added
enhanced power efficiency, while Skylake (6th Gen)
added enhanced performance with enhanced branch
prediction and better cache management. Both share
the same x86 ISA but internal optimizations vary.
continue
Computer Architecture Computer Organization
Computer Architecture is Computer Organization is
concerned with the way hardware concerned with the structure and
components are connected behaviour of a computer system
together to form a computer as seen by the user.
system.
It acts as the interface between It deals with the components of a
hardware and software. connection in a system.
Computer Architecture helps us Computer Organization tells us
to understand the functionalities how exactly all the units in the
of a system. system are arranged and
interconnected.
continue

Architecture involves Logic Organization involves Physical


(Instruction sets, Addressing Components (Circuit design,
modes, Data types, Cache Adders, Signals, Peripherals)
optimization)
Functional units Organization,
The functional components of a digital
computer include the Input Unit, which
takes in data; the CPU, which processes data
with its Control Unit (CU), Arithmetic
Logic Unit (ALU), and Registers;
the Memory Unit, which stores data
temporarily (RAM) or permanently (HDD/SSD);
the Output Unit, which displays results; and
the Bus System, which connects and transfers
data between components. These parts work
together to execute tasks and provide results.
Continue
Continue
• The functional components of a computer are the key parts that
work together to process and manage data. These include the Input
Unit for receiving data, the CPU for processing it, the Memory
Unit for storing information, the Output Unit for displaying results,
and the Bus System that connects all parts. These components help
the computer perform tasks efficiently.
• 1. Input Unit
• Purpose: Captures data and instructions from users or external
sources.
• Function: Converts user input into binary signals that the computer
can process.
• Common Devices (2025):
▫ Keyboard, Mouse, Touchscreens
▫ Scanners, Sensors, Stylus pens
▫ Voice Assistants (e.g., Siri, Alexa)
▫ Biometric devices (face/fingerprint recognition)
▫ Iot-based inputs from smart devices
continue
• . Central Processing Unit (CPU) – The Brain of the Computer
• The CPU executes instructions and controls all internal operations.
In 2025, CPUs will often have multiple cores and threads to handle
parallel processing efficiently.
• Components of CPU:
• a. Arithmetic Logic Unit (ALU)
• Performs arithmetic operations (add, subtract, multiply, divide).
• Handles logical operations (comparison, decision-making).
• Supports AI/ML tasks using built-in vector/matrix operations (in
modern CPUs).
• b. Control Unit (CU)
• Directs the operations of all computer parts.
• Decodes instructions and coordinates data flow.
• Sends control signals to memory and I/O devices.
continue
• c. Registers
• High-speed memory locations within the CPU.
• Temporarily store instructions, addresses, and intermediate data.
• Examples: Accumulator, Instruction Register, Program Counter, Address
Register.
• Modern CPUs include 64-bit or even 128-bit registers for faster processing.
• 3. Memory / Storage Unit
• The memory unit holds data and instructions before, during, and after
processing.
• a. Primary Memory (Main Memory):
• RAM (Random Access Memory): Temporarily stores data during execution.
▫ Types in 2025: DDR5, LPDDR5X, and emerging MRAM.
• ROM (Read-Only Memory): Stores boot-up instructions and firmware.
• Cache Memory: Ultra-fast memory between CPU and RAM (L1, L2, L3 levels).
• b. Secondary Storage:
• Used for long-term data storage.
• Examples: SSDs (NVMe drives), HDDs, flash drives, and cloud storage.
• Modern Trend: Use of Cloud Integration and hybrid storage models.
continue
• 4. Output Unit
• Purpose: Converts processed data (binary)
into a form users can understand.
• Examples:
▫ Visual: Monitors (LED, OLED, 4K/8K displays)
▫ Print: Printers (Inkjet, Laser, 3D Printers)
▫ Audio: Speakers, Headphones
▫ Haptic: Vibration feedback devices
• Emerging Tech: AR/VR headsets, voice-based
output, Braille displays for accessibility
continue
• Interconnection between Functional Components
• A computer consists of an input unit that takes input, a
CPU that processes the input and an output unit that
produces output. All these devices communicate with
each other through a common bus. A bus is a
transmission path, made of a set of conducting wires
over which data or information in the form of electric
signals is passed from one component to another in a
computer. The bus can be of three types – Address
bus, Data bus and Control Bus.

The following figure shows the connection of various


functional components:
continue
continue
The address bus carries the address location of
the data or instruction. The data bus carries
data from one component to another, and the
control bus carries the control signals. The
system bus is the common communication path
that carries signals to/from the CPU, main
memory and input/output devices. The
input/output devices communicate with the
system bus through the controller circuit, which
helps in managing various input/output devices
attached to the computer.
Arithmetic Logical unit,
ALU is a digital circuit that provides arithmetic and logic
operations. It is the fundamental building block of the
central processing unit of a computer. A modern
central processing unit(CPU) has a very powerful ALU
and it is complex in design. In addition to ALU modern
CPU contains a control unit and a set of registers. Most
of the operations are performed by one or more ALUs,
which load data from the input register. Registers are a
small amount of storage available to the CPU. These
registers can be accessed very fast. The control unit
tells ALU what operation to perform on the available
data. After calculation/manipulation, the ALU stores
the output in an output register.
continue
continue
• The CPU can be divided into two sections: the data section and
the control section. The data section is also known as the data path.
• An Arithmetic Logic Unit (ALU) is a key component of the CPU
responsible for performing arithmetic and logical operations. The
collection of functional units like ALUs, registers, and buses that move
data within the processor. together are known as Data Path, they
execute instructions and manipulate data during processing tasks.
• BUS
• In early computers BUS were parallel electrical wires with multiple
hardware connections. Therefore a bus is a communication system
that transfers data between components inside a computer, or
between computers. It includes hardware components like wires,
optical fibers, etc and software, including communication protocols.
The Registers, ALU, and the interconnecting BUS are collectively
referred to as data paths.
continue
• Types of the bus
• There are mainly three type of bus:-
• Address bus: Transfers memory addresses from
the processor to components like storage and
input/output devices. It's one-way communication.
• Data bus: carries the data between the processor
and other components. The data bus is
bidirectional.
• Control bus: carries control signals from the
processor to other components. The control bus
also carries the clock's pulses. The control bus is
unidirectional.
Central processing unit.
A Central Processing Unit (CPU) is the
primary component of a computer that
executes instructions and performs
calculations, effectively acting as the
"brain" of the computer. It is responsible
for managing and controlling the
operations of all other parts of the system,
including running software and handling
input/output.
Computer registers
• In computer architecture, a register is a small,
high-speed storage location within the CPU
(Central Processing Unit) used to hold data and
instructions that are actively being used. They
are crucial for fast data access and manipulation
during program execution. Registers are like the
CPU's short-term memory, enabling rapid
processing by holding frequently accessed data
and instructions.
continue
Different Types Of CPU Registers

• There are several types of registers available in the CPU for different
purposes let's discuss each one by one:
• Accumulator : This is the most frequently used register used to store data
taken from memory. It is indifferent numbers in different microprocessors.

• Memory Address Registers (MAR) : It holds the address of the location to


be accessed from memory. MAR and MDR (Memory Data Register) together
facilitate the communication of the CPU and the main memory.

• Memory Data Registers (MDR) : It contains data to be written into or to be


read out from the addressed location.

• General Purpose Registers : These are numbered as R0, R1, R2....Rn-1, and
used to store temporary data during any ongoing operation. Its content can be
accessed by assembly programming. Modern CPU architectures tend to use
more GPR so that register-to-register addressing can be used more, which is
comparatively faster than other addressing modes .
continue
• Program Counter (PC) : Program Counter (PC) is used to keep the track of the
execution of the program. It contains the memory address of the next instruction to be
fetched. PC points to the address of the next instruction to be fetched from the main
memory when the previous instruction has been successfully completed. Program
Counter (PC) also functions to count the number of instructions. The incrementation of
PCs depends on the type of architecture being used. If we are using a 32-bit
architecture, the PC gets incremented by 4 every time to fetch the next instruction.

• Instruction Register (IR): The IR holds the instruction which is just about to be
executed. The instruction from the PC is fetched and stored in IR. As soon as the
instruction is placed in IR, the CPU starts executing the instruction, and the PC points
to the next instruction to be executed.

• Stack Pointer (SP): The stack PCs pointer points to the top of the stack, which is a
part of the memory used to store function calls and other operations.

• Flag Register: A flag register , also known as a status register or condition code
register, is a special type of register in a computer's central processing unit (CPU) used
to indicate the status of the CPU or the outcome of various operations such as Zero
Flag, Carry flag, Sign Flag, Overflow Flag, Parity Flag, Auxiliary Carry Flag, and
Interrupt Enable Flag.
continue
• Size of CPU Register
• The number and size of the register in the CPU depend on the
processor design and can have an important impact on its
performance and capabilities on the CPU. Now, let's discuss the
different sizes of the register available in the CPU:
• 8-bit registers: These can store 8 bits of data, which is the same as 1
byte. They are used for simple arithmetic and data manipulation.
• 16-bit registers: These hold 16 bits of data, or 2 bytes. These
registers are found in older processors or certain systems that need
16-bit operations.
• 32-bit registers: These can store 32 bits of data or 4 bytes. They are
common in many processors and can handle larger data sizes and
more complex calculations than 8-bit or 16-bit registers.
• 64-bit registers: These hold 64 bits of data, or 8 bytes. Modern
processors often use these, providing more computational power and
better memory-addressing capabilities.
General Register Organization
continue

or example:
MULT R1, R2, R3
This is an instruction of an arithmetic multiplication written in assembly language. It uses three address fi
this instruction is:
R1 <-- R2 * R3
This instruction also can be written using only two address fields as:
MULT R1, R2
In this instruction, the destination register is the same as one of the source registers. This means the oper
R1 <-- R1 * R2
continue
• When we are using multiple general-purpose
registers, instead of a single accumulator register, in
the CPU Organization then this type of organization is
known as General register-based CPU Organization.
In this type of organization, the computer uses two or
three address fields in their instruction format. Each
address field may specify a general register or a
memory word. If many CPU registers are available for
heavily used variables and intermediate results, we
can avoid memory references much of the time, thus
vastly increasing program execution speed, and
reducing program size.
continue
• Features of a General Register based CPU organization:
• Registers: In this organization, the CPU contains a set of registers, which are
small, high-speed memory locations used to store data that is being processed by
the CPU. The general-purpose registers can be used to store any type of data,
including integers, floating-point numbers, addresses, and control information.
• Operand access: The CPU accesses operands directly from the registers, rather
than having to load them from memory each time they are needed. This can
significantly improve performance, as register access is much faster than
memory access.
• Data processing: The CPU can perform arithmetic and logical operations
directly on the data stored in the registers. This eliminates the need to transfer
data between the registers and memory, which can further improve performance.
• Instruction format: The instruction format used in a General Register based
CPU typically includes fields for specifying the operands and operation to be
performed. The operands are identified by register numbers, rather than memory
addresses.
• Context switching: Context switching in a General Register based CPU involves
saving the contents of the registers to memory, and then restoring them when the
process resumes. This is necessary to allow multiple processes to share the CPU.
CONTINUE
• The advantages of General register-based CPU
organization -
• The efficiency of the CPU increases as large number of
registers are used in this organization.
• Less memory space is used to store the program since
the instructions are written in a compact way.
• The disadvantages of General register based CPU
organization -
• Care should be taken to avoid unnecessary usage of
registers. Thus, compilers need to be more intelligent in
this aspect.
• Since a large number of registers are used, thus extra
cost is required in this organization.
Computer instructions
• Basic Computer Instructions
• Basic computer instructions are commands given
to a computer to perform specific tasks. These
instructions are typically divided into three
categories:
• Data Transfer Instructions: Move data between
memory and registers (e.g., Load, Store).
• Arithmetic and Logic Instructions: Perform
math or logic operations (e.g., Add, Subtract, AND,
OR).
• Control Instructions: Guide the flow of the
program (e.g., Jump, Branch, Call).
continue
• Data Transfer Instructions
• These instructions deal with moving data from one
location to another within the computer. Think of it
as copying or transferring information between
various components like memory, registers, or
storage.
• Common Data Transfer Instructions:
• Load: Copies data from memory to a register
(temporary storage inside the CPU).
• Store: Transfers data from a register to memory.
• Move: Transfers data from one register to another.
continue
• Arithmetic and Logic Instructions
• These instructions are used to perform
mathematical and logical operations. They
enable computers to handle calculations and
make decisions based on certain conditions.
• Arithmetic Instructions:
• Add: Adds two numbers.
• Subtract: Subtracts one number from another.
• Multiply: Multiplies two numbers.
• Divide: Divides one number by another.
continue
• Logic Instructions:
• AND: Compares two bits and returns 1 if
both are 1; otherwise, returns 0.
• OR: Compares two bits and returns 1 if at
least one is 1.
• NOT: Inverts a bit (1 becomes 0, and 0
becomes 1).
• XOR (Exclusive OR): Returns 1 if the
bits are different, 0 if they are the same.
continue
• Control Instructions
• Control instructions determine the flow of execution in a
program. They guide the computer on which instruction to
execute next, allowing flexibility in decision-making and
repeated actions.
• Common Control Instructions:
• Jump (JMP): Directs the program to execute a specific
instruction elsewhere in the code.
• Conditional Branch: Jumps to another instruction only if a
specific condition is true. Example: Branch if zero (BZ) or
branch if not zero (BNZ).
• Call: Transfers control to a subroutine (a set of instructions
performing a specific task) and returns afterward.
• Return: Brings back control to the main program after a
subroutine is executed.
Instruction Cycles,
Each phase of Instruction Cycle can be
decomposed into a sequence of elementary
micro-operations. In the above examples,
there is one sequence each for the Fetch,
Indirect, Execute and Interrupt Cycles.
continue
• Fetch cycle: This cycle retrieves the instruction from memory and
loads it into the processor's instruction register. The fetch cycle is
essential for the processor to know what instruction it needs to
execute.
• Decode cycle: This cycle decodes the instruction to determine
what operation it represents and what operands it requires. The
decode cycle is important for the processor to understand what it
needs to do with the instruction and what data it needs to retrieve
or manipulate.
• Execute cycle: This cycle performs the actual operation specified
by the instruction, using the operands specified in the instruction or
in other registers. The execute cycle is where the processor
performs the actual computation or manipulation of data.
• Store cycle: This cycle stores the result of the operation in memory
or in a register. The store cycle is essential for the processor to
save the result of the computation or manipulation for future use.
Memory reference instruction,
Memory reference instructions (MRIs)
are a type of machine language instruction
that allows a program to access and
manipulate data stored in memory. These
instructions provide the memory address
where the data resides or where the data
should be stored. They are crucial for
operations like loading data into registers,
storing data from registers into memory,
and performing arithmetic and logical
continue
• Data Access:
• Memory reference instructions are crucial for fetching data
needed for computations or storing the results of calculations
back into memory.
• Program Control:
• They can also be used to control the flow of execution by
branching to different memory locations based on conditions.
• Key Components:
• Opcode: Specifies the operation to be performed (e.g., load,
store, add, branch).
• Address: Indicates the specific memory location the
instruction refers to.
• Addressing Mode: Determines how the address is calculated
(e.g., direct or indirect).
continue
• Common Examples:
• Load (LDA): Transfers data from a memory location to a register
(often the accumulator).
• Store (STA): Transfers data from a register to a memory location.
• Add (ADD): Adds the contents of a memory location to the
accumulator.
• Branch (BUN, BSA): Changes the program's flow by jumping to a
different memory address.
• Increment and Skip if Zero (ISZ): Increments a memory location
and skips the next instruction if the result is zero.
• Importance:
• Memory reference instructions are fundamental to the operation of
any computer system, enabling it to work with data stored in
memory.
• They are essential for executing complex programs and performing
various tasks.
Input / Output instructions.
Input/output (I/O) instructions in computer
architecture are used to transfer data
between the C Input / Output instructions
PU and peripheral devices like keyboards,
monitors, and storage devices. These
instructions facilitate communication
between the computer system and the
external world, enabling the system to
receive data from users and send data to
users or other systems.
continue
• I/O instructions allow the CPU to
communicate with peripheral devices, like
keyboards, printers, or hard drives.
• 🧩 Types of I/O Techniques
• Programmed I/O: CPU waits and checks the
device status until it’s ready.
• Interrupt-driven I/O: Device notifies CPU via
an interrupt when ready.
• Direct Memory Access (DMA): Device
transfers data directly to memory without CPU
intervention.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy