25ITC01 – MODERN COMPUTER ARCHITECTURE
MODULE I - INTRODUCTION
PART A
[Link] the basic functional units of computer?
The basic functional units of a computer are input unit, output unit, memory unit,
ALU unit and control unit
[Link] the functions of Control unit.
The control unit is a key component of a computer's central processing unit that
coordinates the operation of the processor. It tells the computer's memory,
arithmetic/logic unit and input and output devices how to respond to a program's
instructions.
The control unit is also known as the nerve center of a computer system
3. What are clock and clock cycles?
The timing signals that control the processor circuits are called as clocks. The
clock defines regular time intervals called clock cycles.
4, Define Registers (or) Processor registers. List the types of registers.
o Registers are a type of computer memory used to quickly accept, store, and
transfer data and instructions that are being used immediately by the CPU. The
registers used by the CPU are often termed as Processor registers.
o The special function registers include program counters (PC), instruction
registers (IR), memory address registers (MAR) and memory data registers
(MDR).
5. Define bus. List the types of buses.
A computer bus is a communication system used to transfer data between components
within a computer or between different computers
Types : Address bus, Data bus, Control bus
6. What is instruction register?
The instruction register (IR) holds the instruction that is currently being executed.
7. What is program counter?
The program counter (PC) keeps track of the execution of a program. It contains
the memory address of the next instruction to be fetched and executed.
8. What is RISC and CISC?
The processors with simple instructions are called as Reduced Instruction Set
Computers (RISC). The processors with more complex instructions are called as
Complex Instruction Set Computers (CISC).
[Link] : RISC and CISC
Feature RISC (Reduced Instruction Set CISC (Complex Instruction Set
Computer) Computer)
Instruction Size Fixed-length Variable-length
Cycles/Instruction Usually one cycle Multiple cycles
Memory Access Load/Store directly to registers Directly from memory
Power Low (efficient) High
Consumption
10. Define addressing modes and its various types.
The different ways in which the location of a operand is specified in an instruction
is referred to as addressing modes. The various types are Immediate Addressing,
Register Addressing, Indexed addressing, Relative Addressing, Direct Addressing
modes.
11. Define Instruction format
A form of representation of an instruction in binary bits in known as Instruction
[Link] specifies the address of the operand, the Opcode, the addressing mode of
the instruction
*I – Immediate addressing mode
12. Write down the five stages of Instruction Executions
Stage 1 (Instruction Fetch)
In this stage the CPU reads instructions from the address in the memory whose value
is present in the program counter.
Stage 2 (Instruction Decode)
In this stage, instruction is decoded and the register file is accessed to get the values
from the registers used in the instruction.
Stage 3 (Instruction Execute)
In this stage, ALU operations are performed.
Stage 4 (Memory Access)
In this stage, memory operands are read and written from/to the memory that is present
in the instruction.
Stage 5 (Write Back)
In this stage, computed/fetched value is written back to the register present in the
instructions
13. Draw the memory hierarchy.
14. Differentiate : Primary Memory and Secondary memory
15. Define : Endianess property in memory allocation
Endianness refers to the order in which bytes are arranged in memory.
Applications:
Storing Bytes
Programming Languages
Network Protocols
Processor Design
16. What is big-endian and little-endian?
Big-endian (BE): Stores the most significant byte first. This means that the first
byte (at the lowest memory address) is the largest, which makes the most sense to
people who read left to right.
Little-endian (LE): Stores the least significant byte first. This means that the first
byte (at the lowest memory address) is the smallest, which makes the most sense to
people who read right to left.
17. Differentiate : Computer Architecture and Computer Organization
Computer Architecture Computer Organization
Computer Architecture is concerned with Computer Organization is concerned
the way hardware components are connected with the structure and behaviour of a
together to form a computer system. computer system as seen by the user.
It acts as the interface between hardware and It deals with the components of a
software. connection in a system.
Computer Architecture helps us to Computer Organization tells us how
understand the functionalities of a system. exactly all the units in the system are
arranged and interconnected.
Computer Architecture deals with high-level Computer Organization deals with low-
design issues. level design issues.
18. List the I/O techniques.
Program controlled I/O
Interrupt driven I/O
Direct Memory Access
19. Define : Polling
Polling is a technique where the CPU repeatedly checks a device's status register to
determine if it is ready.
20. Define: Interupts & Interrupt Service routine (ISR)
Any Temporary halt during program execution is known as Interrupts. There are two
types of Interrupts : Hardware and Software Interupts.
The event that causes the interruption is called interrupt and the special routine
executed to service the interrupt is called Interrupt service Routine.
21. Differentiate : Hardware and Software Interrupt.
An interrupt caused by an external signal is referred as a hardware interrupt.
Conditional interrupts or interrupts caused by special instructions are called software
interrupts.
22. Define Direct Memory Access (DMA).
Direct Memory Access(DMA) is a special control unit that allows the transfer of large
block of data at high speed directly between the external device and main memory ,
without continuous intervention by the processor.
23. State Amdahl’s Law.
Amdahl’s law is a formula used to find the maximum improvement
improvement possible by improving a particular part of a system.
24. If computer A runs a program in 10 seconds and computer B runs the same
program in 15 seconds, how much faster is A than B?
Computer A execution time (TA): 10 seconds.
Computer A execution time (TB): 15 seconds
Ratio of performance between two computers is calculated by dividing the execution time of
the slower computer by the execution time of the faster computer.
Computer A is 1.5 times faster (or 50% faster) than computer B.
25. Define CPU execution time and list the types.
The actual time the CPU spends computing for a specific task. Also called CPU time.
Types:
User CPU time : The CPU time spent in a program itself.
System CPU time :The CPU time spent in the operating system performing tasks on
behalf of the program
26. Define response time
The total time required for the computer to complete a task, including disk access,
memory accesses, I/O activities, CPU execution time, and so on. Also called
execution time.
27. What is Throughput?
It is a measure of performance. It is the number of tasks completed per unit time.
28. What is processor time?
The sum of the periods during which the processor is active is called the processor
Time
29. Give the CPU performance equation.
CPU execution time for a program =Instruction Count X Clock cycles per
Instruction X Clock cycle time.
30. Define Interrupt latency
Saving registers also increases the delay between the time an interrupt request is
received and the start of the execution of the ISR. This delay is called the Interrupt
Latency.
PART B
1. Explain the Functional units of computer (Von Neuman Architecture).
o Functional units are a part of a CPU that performs the operations and
calculations called for by the computer program.
o A computer consists of five main components namely, Input unit, Central
Processing Unit, Memory unit Arithmetic & logical unit, Control unit and an
Output unit.
Input unit
o Input units are used by the computer to read the data. The most commonly used
input devices are keyboards, mouse, joysticks, trackballs, microphones, etc.
o However, the most well-known input device is a keyboard. Whenever a key is
pressed, the corresponding letter or digit is automatically translated into its
corresponding binary code and transmitted over a cable to either the memory or
the processor.
Central processing unit
o Central processing unit commonly known as CPU can be referred as an
electronic circuitry within a computer that carries out the instructions given by a
computer program by performing the basic arithmetic, logical, control and
input/output (I/O) operations specified by the instructions.
Memory unit
o The Memory unit can be referred to as the storage area in which programs are
kept which are running, and that contains data needed by the running programs.
o The Memory unit can be categorized in two ways namely, primary memory and
secondary memory.
o Primary storage is the fastest memory that operates at electronic speeds. Ex.
RAM. It is also known as the volatile form of memory, means when the
computer is shut down, anything contained is lost. The most common examples
of primary memory are RAM and ROM.
o Secondary memory is used when a large amount of data and programs have to
be stored for a long-term basis. It is also known as the Non-volatile memory
form of memory, means the data is stored permanently irrespective of shut
down.
o The most common examples of secondary memory are magnetic disks,
magnetic tapes, and optical disks.
Arithmetic & logical unit
o Most of all the arithmetic and logical operations of a computer are executed in
the ALU (Arithmetic and Logical Unit) of the processor. It performs arithmetic
operations like addition, subtraction, multiplication, division and also the logical
operations like AND, OR, NOT operations.
Control unit
o The control unit is a key component of a computer's central processing unit that
coordinates the operation of the processor. It tells the computer's memory,
arithmetic/logic unit and input and output devices how to respond to a program's
instructions.
o The control unit is also known as the nerve center of a computer system.
Output Unit
o The primary function of the output unit is to send the processed results to the
user. Output devices display information in a way that the user can understand.
o Output devices are pieces of equipment that are used to generate information or
any other response processed by the computer. These devices display
information that has been held or generated within a computer.
o The most common example of an output device is a monitor.
2. Explain the Basic Operational Concepts (Types of Registers)
o To perform the execution of an instruction, the processor contains a number of
registers used for temporary storage of data and some special function registers.
o Registers are a type of computer memory used to quickly accept, store, and
transfer data and instructions that are being used immediately by the CPU. The
registers used by the CPU are often termed as Processor registers.
o A processor register may hold an instruction, a storage address, or any data
(such as bit sequence or individual characters).
o The special function registers include program counters (PC), instruction
registers (IR), memory address registers (MAR) and memory and memory data
registers (MDR).
o General purpose registers (GPRs) are high-speed, temporary storage locations
inside a CPU used to store data, intermediate results, or memory addresses
actively processed during execution
Program Counter
o The Program counter is one of the most critical registers in CPU.
o The Program counter monitors the execution of instructions. It keeps track on
which instruction is being executed and what the next instruction will be.
Instruction Register
o The instruction register IR is used to hold the instruction that is currently being
executed.
o The contents of IR are available to the control unit, which generate the timing
signals that control, the various processing elements involved in executing the
instruction.
MAR and MDR
o The two registers MAR and MDR are used to handle the data transfer between
the main memory and the processor.
o The MAR holds the address of the main memory to or from which data is to be
transferred.
o The MDR contains the data to be written into or read from the addressed word
of the main memory.
3. Illustrate the types of buses.
A computer bus is a communication system used to transfer data between components
within a computer or between different computers. It plays an important role in
minimizing the number of connections needed by centralizing communication over
shared pathways.
It consists of physical connections like wires, circuits, or cables.
Components like the CPU, memory, and input/output (I/O) devices are
connected through a bus.
It simplifies data transfer and improves efficiency.
Types Of Buses
There are three main types of buses in a computer system:
Address Bus
A collection of wires used to identify particular location in main memory is
called Address Bus. Or in other words, the information used to describe the memory
locations travels along the address bus.
The address bus transports memory addresses which the processor wants to
access in order to read or write data..
The address bus is unidirectional.
The size of address bus determines how many unique memory locations can be
addressed.
Example:
A system with 4-bit address bus can address 24 = 16 Bytes of memory.
A system with 16-bit address bus can address 216 = 64 KB of memory
Data Bus
A collection of wires through which data is transmitted from one part of a computer to
another is called Data Bus.
The main objective of data bus is transfer of the data between microprocessor to input/
output devices or memory.
The data bus transfers instructions coming from or going to the processor.
The data bus is bidirectional because the data can flow in either direction from
CPU to memory(or input/output device) or from memory to the CPU.
The size (width) of bus determines how much data can be transmitted at one
time.
Example:
A 16-bit bus can transmit 16 bits of data at a time.
32-bit bus can transmit 32 bits at a time.
Control Bus
The connections that carry control information between the CPU and other devices
within the computer is called Control Bus. The control bus transports orders and
synchronization signal coming from the control unit and travelling to all other
hardware components
The main objective of control bus is all signals controller carried from processor
to other hardware device.
The Control bus is bidirectional because the data can flow in either direction
from CPU to memory(or input/output device) or from memory to the CPU.
Other classification of buses
[Link] the types of Instruction set in detail.
An instruction is a set of codes that the computer processor can understand. It contains
instructions or tasks that control the movement of bits and bytes within the processor.
Example of some instruction sets −
ADD − Add two numbers together.
LOAD − Load information from RAM to the CPU.
STORE - Used to move data from a CPU register to a specific memory location
JUMP − Jump to designated address.
Types of Instruction Set
Generally, there are two types of instruction set used in computers. RISC & CISC
Reduced Instruction set Computer (RISC)
A number of computer designers recommended that computers use fewer instructions
with simple constructs so that they can be executed much faster within the CPU
without having to use memory as often. This type of computer is called a Reduced
Instruction Set Computer.
Characteristics of RISC
The characteristics of RISC are as follows −
Relatively few instructions.
Relatively few addressing modes.
Memory access limited to load and store instructions.
All operations done within the register of the CPU.
Single-cycle instruction execution.
Fixed length, easily decoded instruction format.
A characteristic of RISC processors’ ability is to execute one instruction per clock
cycle. This is done by overlapping the fetch, decode and execute phases of two or
three instructions by using a procedure referred as pipelining.
Complex Instruction Set Computer (CISC)
CISC is a computer where a single instruction can perform numerous low-level
operations like a load from memory and a store from memory, etc. The CISC attempts
to minimize the number of instructions per program but at the cost of an increase in
the number of cycles per instruction.
Characteristics of CISC
The characteristics of CISC are as follows −
A large number of instructions typically from 100 to 250 instructions.
Some instructions that perform specialized tasks and are used infrequently.
A large variety of addressing modes- typically from 5 to 20 different modes.
Variable length instruction formats.
Instructions that manipulate operands in memory.
5. Explain the types of Instruction Formats
An instruction is a set of codes that the computer processor can understand.
Instruction formats are classified based on the number of address fields:
Three-Address Instructions: Include two source operands and one destination
address (e.g., ADD R1,R2,R3)
Two-Address Instructions: Use two fields; one acts as both a source and
destination, and the other as a source (e.g., ADD R1, R2)
One-Address Instructions: Utilize an implied accumulator register for all data
manipulation (e.g., LOAD A ).
Zero-Address Instructions: Stack-based; operands are popped from the stack,
and the result is pushed back (e.g., ADD)
6. Explain the Instruction sequencing and its types.
Every processor has some basic types of instructions such as
● Data transfer instructions
● Arithmetic instructions
● Logical instructions
● Branch instructions
The programmer has to write instructions in a proper sequence. This job of
programmer is known as instruction sequencing.
Straight line sequencing instruction:
The instructions of the program are in successive word locations, starting at
location i. since each instruction is 4 bytes long, the second and third
instructions start at addresses i + 4 and i + 8.
Ex: Addition of two numbers
Branching Instruction
Task can be accomplished in a compact way, by using the Branch instruction
(instruction that causes the computer to branch to another instruction.).
Ex: Sum of natural numbers
6. Explain the types of addressing modes
The operands of the instructions can be located either in the main memory or in the
CPU registers. The different methods/modes for specifying the operand address in the
instructions are known as addressing modes.
According to the instruction set, the addressing modes are classified into different
categories. They are
• Implementation of variables and constants
• Indirection and pointers
• Indexing and arrays
• Relative addressing
Types of Addressing Modes
There are various types of Addressing Modes which are as follows −
Immediate addressing Mode
In this mode, the operand is specified in the instruction itself. An immediate mode
instruction has an operand field rather than the address field.
For example: ADD 7, which says Add 7 to contents of accumulator.
7 is the operand here.
Register addressing Mode
The operand is specified with the processor register.
Instruction specifies the register in which the operand is stored.
Ex: MOV C , B
Moves the content from operand C to B register.
Direct Addressing mode
• The instruction specifies the address of the operand.
• The memory address is specified where the actual operand is.
Ex: ADD R2, A Adds the value stored at register R2 to memory location A
Indirect addressing Mode
• The effective address of the operand is the contents of a register or main
memory location whose address is given explicitly in the instruction.
• When the effective address of the operand is the contents of a register, this
addressing is known as register indirect addressing.
• Eg:- MOVE A,(R0)
• The above instruction copies the content of A to memory addressed by
the contents of register R0.
Indexed addressing mode
It is a technique where the CPU calculates the operand's effective address by adding a
constant displacement (or base address) to the contents of an index register
EA = A + (R), In this the address field holds two values, A(which is the base value)
and R(that holds the displacement), or vice versa.
Relative addressing mode
• In relative addressing mode, contents of Program Counter PC is added to
address part of instruction to obtain effective address.
• When the offset is added to the PC, the resultant number is the memory
location where the operand will be placed.
• EA = A + (PC), where EA is effective address and PC is program counter.
Ex : JMP +5
Autoincrement or Autodecrement Mode &minuend; This is similar to the register
indirect mode except that the register is incremented or decremented after (or before)
its value is used to access memory. When the address stored in the register defines a
table of data in memory, it is necessary to increment or decrement the register after
every access to the table. This can be obtained by using the increment or decrement
instruction.
Ex :PUSH and POP in stack
[Link] the Input and Output techniques.
Input/output (I/O) techniques manage data transfer between a CPU/memory and
peripheral devices, with the three primary types being Programmed I/O (CPU-
controlled, high overhead), Interrupt-driven I/O (device-initiated, efficient),
and Direct Memory Access (DMA) (direct transfer, high speed).
Programmed controlled I/O technique
In Programmed I/O technique, data item transfer is initiated by an instruction in
the program
I/O device does not have direct access to the memory unit. A transfer from I/O
device to memory requires the execution of several instructions by the CPU
Including an input instruction to transfer the data from device to the CPU and
store instruction to transfer the data from CPU to memory.
Input Registers : KBD_DATA, KBD_STATUS,KBD_CONT
Output Registers : DISP_DATA, DISP_STATUS, DISP_CONT
Interrupt driven I/O technique
⦿ Interrupt - Temporary halt during program execution.
⦿ The event that causes the interruption is called interrupt and the special routine
executed to service the interrupt is called Interrupt service Routine.
⦿ An interrupt caused by an external signal is referred as a hardware interrupt.
⦿ Conditional interrupts or interrupts caused by special instructions are called
software interrupts.
⦿ The processor first completes the execution of instruction i. When an interrupt
occurs, the current contents of PC which point to i+1 is put in temporary storage
in a known location.
⦿ A return from interrupt instruction at the end of ISR, reloads the PC from that
temporary storage location, causing the execution to resume at instruction i+1.
⦿ The processor saves only the contents of program counter & status register (ie)
it saves only the minimal amount of information to maintain the integrity of the
program execution.
⦿ Saving registers also increases the delay between the time an interrupt request is
received and the start of the execution of the ISR. This delay is called the
Interrupt Latency
Direct Memory Access
Peripherals directly communicate with each other using the memory buses, removing
the intervention of the CPU. This type of data transfer technique is known as DMA or
direct memory access.
DMA transfers are performed by a control circuit called the DMA Controller.
To initiate the transfer of a block of words , the processor sends: Starting address ,
Number of words in the block & Direction of transfer.
Direction of transfer:
⦿ R/W - Determines the direction of transfer.
◼ When R/W =1, DMA controller read data from memory to I/O device.
◼ R/W =0, DMA controller perform write operation.
⦿ Done Flag=1, the controller has completed transferring a block of data and is
ready to receive another command.
⦿ IE=1, it causes the controller to raise an interrupt (interrupt Enabled) after it has
completed transferring the block of data.