Professional Documents
Culture Documents
Unit Ii
Unit Ii
• SYLLABUS:-
2.1 Hardware Components of the Instruction Set Architecture
2.2 ARC - A RISC Computer
2.3 Pseudo Operations
2.4 Synthetic Instructions
2.5 Examples of Assembly Language Programs
2.6 Accessing Data in Memory-Addressing Modes
2.7 The Memory Hierarchy
2.8 Cache Memory.
• Introduction
• First we will see the simple C program
• In above program a=10 and b=20 these are data and C=a+b, printf( C ) these are instructions.
• We save these data & instruction in memory as per our Von Neumann Model / Architecture.
• Now our data and instructions are come into memory i.e in RAM or registers, but generally first we store it into memory
& then fetch that data & instruction in Register ( E.g. ALU to perform operations).
• We have different types of registers such as accumulator, data register, input register, output registers.
• Our CPU work with these different registers, right now our data is in the memory. And that data may be present in
continuous allocation or on different location of memory.
• Instruction format:
• Mode(Address of Operand): It indicate the addressing mode, basically it find the address
of operand, it’s mean to which operand you are finding and where it is located in memory
or in register.
• Opcode(Operation) : It indicate what to perform, as in our example operation is addition.
• Operand (Data): It indicate on which data we have to perform the operation.
• Instruction Register open the instruction and decode that particular instruction and find out
where the operand is present, then we take that operand into accumulator or data register
then ALU perform the addition operation and finally it store the result into output register.
• Length of instruction is depends on type of computer organization means AMD processor
or other type.
• If length of instruction increased then size of instruction register also increase, also size of
bus increases.
• Instruction Set Architecture (ISA)
• An Instruction Set Architecture (ISA) is part of the abstract model of a computer
that defines how the CPU is controlled by the software.
• The ISA acts as an interface between the hardware and the software, specifying
both what the processor is capable of doing as well as how it gets done.
• ISAs can be categorized into two main types:
• Complex Instruction Set Architecture (CISC): CISC ISAs have a large and diverse
set of complex instructions that can perform multiple operations in a single
instruction. These instructions often have variable-length encodings and can
perform operations that require multiple clock cycles to complete. Examples of
CISC ISAs include x86, which is widely used in desktop and server computers.
• Reduced Instruction Set Architecture (RISC): RISC ISAs have a smaller and
simpler set of instructions that are designed to execute in a single clock cycle.
These instructions have fixed-length encodings and perform basic operations, with
more complex operations being implemented through combinations of simple
instructions. Examples of RISC ISAs include ARM, MIPS, and RISC-V, which
are commonly used in embedded systems, mobile devices, and other specialized
applications.
2.1 Hardware Components of the Instruction Set Architecture
• The Instruction Set Architecture (ISA) is a crucial component of a computer
system that defines the set of instructions that a computer's central processing
unit (CPU) can understand and execute.
• The ISA includes various hardware components that work together to interpret
and execute instructions. Some of the key hardware components of an ISA are:
• Instruction Register (IR): The IR is a register that holds the currently fetched
instruction from the memory. It typically contains the opcode (operation code)
and operands (data or memory addresses) of the instruction being executed.
• Registers: Registers are small, high-speed storage locations within the CPU used
to hold data temporarily during instruction execution. Examples of registers
include the program counter (PC), which holds the address of the next instruction
to be fetched; the stack pointer (SP), which points to the top of the stack; and
general-purpose registers (e.g., AX, BX, CX, DX) used for temporary data
storage and manipulation.
• Memory Address Register (MAR) and Memory Data Register (MDR): The MAR
holds the memory address of the data or instruction being fetched from or written
to memory, while the MDR holds the actual data or instruction being read from or
written to memory.
• Bus Interface Unit (BIU): The BIU is responsible for managing data transfer
between the CPU and other parts of the computer system, such as memory and
input/output devices, using data buses and address buses.
• Cache: Cache is a high-speed memory that holds frequently accessed data and
instructions to reduce the time taken to fetch them from main memory. It is
typically organized in levels, such as L1, L2, and L3 cache, with decreasing
speeds and increasing sizes.
• Input/Output (I/O) Interfaces: These interfaces provide communication between
the CPU and various input/output devices, such as keyboards, mice, displays, and
storage devices, allowing data to be exchanged between the CPU and these
devices.
• These are some of the hardware components of an ISA that work together to
execute instructions and perform various operations in a computer system. The
specific implementation of these components may vary depending on the
architecture and design of the CPU and the ISA being used.
2.2 ARC - A RISC Computer
• The architectural design of CPU is Reduced Instruction Set Computing(RSIC)
and Complex instruction Set Computing(CISC).
• The John Coke of IBM research team developed RISC by reducing the number
of instruction required for processing computation faster than CISC
• RISC stands for Reduced Instruction Set Computer. A RISC computer is a type
of computer architecture that emphasizes a small set of simple instructions that
can be executed very quickly.
• The idea behind RISC is that by simplifying the instruction set, the computer can
execute instructions more quickly and efficiently, which can lead to faster overall
performance.
• The RISC computer uses a simplified instruction set, with each instruction performing
a single, low-level operation.
• This approach allows RISC computers to execute instructions more quickly and
efficiently than computers with more complex instruction sets.
• RISC computers also typically have a large number of registers, which are small,
high-speed memory locations that the processor can use to store data and intermediate
results.
• This allows RISC computers to perform operations on data in registers rather than
having to fetch data from memory, which can be slower.
• RISC computers also use pipelining [CPU can start working on the next
instruction before the previous instruction is fully completed, which reduces the
idle time of the CPU] , which allows multiple instructions to be executed at the
same time, increasing performance.
• In addition, RISC computers often have separate instruction and data caches,
which further improves performance.
• Instead, they provide instructions to the assembler on how to process the code,
such as defining constants or reserving memory space for variables.
• In general, pseudo-ops give the assembler information about data alignment, block
and segment definition, and base register assignment.
• Indirect addressing: In this mode, the operand contains a memory address that
points to the actual data in memory. The instruction uses the memory address
pointed to by the operand to read or write data from or to memory.
• Indexed addressing: In this mode, the operand contains a memory
address, which is modified by adding an index or offset to it. The
instruction uses the modified memory address to read or write data
from or to memory.
1.Registers: Registers are small, high-speed memory units located in the CPU.
They are used to store the most frequently used data and instructions. Registers
have the fastest access time and the smallest storage capacity, typically ranging
from 16 to 64 bits.
2.Cache Memory: Cache memory is a small, fast memory unit located close to
the CPU. It stores frequently used data and instructions that have been recently
accessed from the main memory. Cache memory is designed to minimize the time
it takes to access data by providing the CPU with quick access to frequently used
data.
3.Main Memory: Main memory, also known as RAM (Random Access Memory),
is the primary memory of a computer system. It has a larger storage capacity than
cache memory, but it is slower. Main memory is used to store data and instructions
that are currently in use by the CPU.
• This results in lower performance of the system and thus, enhancement was
required. This enhancement was made in the form of Memory Hierarchy Design
because of which the performance of the system increases.
• Cost per bit: As we move from bottom to top in the Hierarchy, the cost per bit
increases i.e. Internal Memory is costlier than External Memory.
• According to the memory Hierarchy, the system supported memory standards are
defined below:
2.8 Cache Memory
• Cache memory is a type of high-speed memory that is used to improve the
performance of a computer system.
• It is located between the main memory (RAM) and the processor (CPU) in the
computer architecture.
• The purpose of cache memory is to store frequently used data and instructions
that the CPU can access quickly, without having to access the slower main
memory.
• The cache closest to the CPU is the Level 1 (L1) cache, which is the fastest and smallest
but also the most expensive.
• The Level 2 (L2) cache is larger than L1 and slightly slower, and there may be
additional levels of cache beyond that.
• Cache memory is a vital component of modern computer systems, and its use can
greatly enhance the overall performance of a system.
• By storing frequently used data and instructions close to the CPU, cache memory
reduces the amount of time the CPU spends waiting for data from main memory.
Obtained
Roll No. Name of Student Duration
Marks
3 Asabe Aishwarya Bapu 1 min 36 secs 5.00
4 Atar Saniya Riyajahmad 3 mins 4 secs 6.00
9 Chavan Rohit Nanasaheb 3 mins 19 secs 5.00
10 CHAVARE PRADYUMNA PANDURANG 4 mins 33 secs 7.00
12 Shruti Narendra Divate 5 mins 59 secs 8.00
15 SNEHA ANNASAHEB GAIKWAD 11 mins 39 secs 9.00
25 Kadam Onkar Aappaso 1 min 39 secs 5.00
28 _Kamble 1 min 48 secs 7.00
30 KARANDE SANIKA RAJENDRA 7 mins 43 secs 6.00
32 Avishkar Sanjay Kolawale 9 secs 0.00
36 SAISH 36 secs 5.00
37 KULKARNI SAMARTH GIRISH 39 secs 2.00
38 KULKARNI_SHRADDHA_SHRIPAD 1 min 7 secs 3.00
41 Mali Pooja Vilas 37 secs 3.00
45 MASKE SHIVANI MARUTI 10 mins 21 secs 7.00
47 _MHAMANE RUSHIKESH SANTOSH 3 mins 12 secs 7.00
47 NAGANE PRATHMESH DATTATRAY 2 mins 45 secs 7.00
52 Nalawade 3 mins 57 secs 5.00
53 _Sarthak 4 mins 7 secs 6.00
54 OHAL SWAPNIL MOHAN 4 mins 38 secs 7.00
55 PATIL DNYANESHWAR DATTATRAY 2 mins 14 secs 6.00
55 PAWAR NITIN SHAMRAO 2 mins 43 secs 4.00
57 _ PAWAR NIKITA VIVEK 1 min 44 secs 3.00
59 PAWAR RENUKA VIKAS 3 mins 29 secs 5.00
60 _Sakshi 6 mins 43 secs 7.00
61 Phule_Dhanyata_Raghunath 1 min 12 secs 6.00
62 SOMDALE 4 mins 7 secs 8.00
64 Raut Rutuja Savata 14 mins 18 secs 8.00
65 Abhijit Bibhishan salunkhe 2 mins 53 secs 7.00
66 Shinde_Pranjali_Shivaji 3 mins 41 secs 5.00
69 TATHE PRATIKSHA 3 mins 20 secs 8.00
70 Tathe Samruddhi Chandrakant 3 mins 57 secs 6.00
71 TATHE UDAYAN RAJKUMAR 8 mins 4 secs 6.00
72 Umbarkar Vaibhav Vijay 2 mins 52 secs 6.00
73 Yadav Aniket Ramchandra 2 mins 18 secs 8.00