Module-1 and 2 PPT
Module-1 and 2 PPT
Organization
Dr. Swagat Kumar Samantaray
School of Computing Science & Engineering
VIT Bhopal University
INSTRUCTIONS FOR CLASS
COURSE DETAIL
Course Code :CSE2003
Course Type :LT
Number of Unit:6
Credits:4
COURSE OBJECTIVES:
• To provide basic concepts of computer architecture
and organization
• To impart the knowledge of implementation of
arithmetic operations in the computer.
• To develop a deeper understanding of the hardware
environment upon which all processing are carried
out.
• To provide knowledge about internals of memory
system, interfacing techniques and subsystem
devices.
2
MODULE-1-2
3
MODULE-3
Memory System
Memory systems hierarchy-Main memory organization-Types of Main memory : SRAM ,
DRAM and its characteristics and performance – latency –cycle time -bandwidth- memory
interleaving
Cache memory: Address mapping-line size-replacement and policies- coherence
Virtual memory: Paging (Single level and multi-level) – Page Table Mapping – TLB
Reliability of memory systems: Error detecting and error correcting systems.
Tutorial on design aspects of memory system
4
MODULE-
4-5-6
External storage systems and Pipelining
Organization and structure of disk drives: Electronic- magnetic and optical technologies, RAID
Architectures.
Pipelining – Data Hazards – Instructional hazards – Performance Case Study on RAID
architectures used in Industry
Multiprocessor Architectures
Introduction – Characteristics – Multi core Architecture – Parallel Processing - Flynn
Classification – Inter Connection Structures –Memory Organization
5
Text Books
6
Reference Books
7
“
What is Computer Architecture and Organization?
8
“
⊡ What is Computer Organization ?
9
Two
Separate
Layers
Partition-I Partition-II
10
APPLICATION
HARDWARE SOFTWARE
SYSTEM
SOFTWARE
11
Computer Architecture Computer Organization
12
Benefits and Importance of studying Computer Organization and
Architecture.
• COA is necessary to understand the designing and functioning of the various components to
process information digitally.
• COA study focuses on the Interface between hardware and software.
• COA tells the way of operating hardware components and their interconnections in Computer.
• COA provides an organized way of working with different hardware components together in one
place.
• Computer organization says, “How to do?” and computer architecture says, “What to do?”.
• COA provides detailed knowledge of the system components, Circuit designs, Structure of
Instruction, Computer arithmetic, Assembly programming, processor control, logical design, and
performance method.
• COA proves that different computer organizations can use the same architecture. For example,
Intel and AMD make X86 CPU (processor is of 86 bits), but INTEL makes its organization on X86,
and AMD makes its own, which means the processor is 86 bits. Still, internal circuits, working,
interconnections will be different.
• COA subject helps the computer engineers to understand the components functioning, working,
characteristics, performance, and their interactions .
13
EVALUTION PATTERN
No of Tutorial- No of Attendance
No of Quiz-5 No of Activity-
5 Assignment-5
14
1
Introduction to Computer
Architecture
15
DIGITAL COMPUTER Fast electronic calculating machine that accepts
digitized input information , process it according to a
list of internally stored instructions and produces the
resulting output Information.
Program Memory
TYPES COMPUTER
16
Mainframes
Desktop Computer Workstations
Digital
Computer
MICRO Mini
Computer Computer
Super
Mainframes
Computers
18
Microcomputer
• The Commodore 64, also known as the C64 or the CBM 64, is an 8-bit home
computer introduced in January 1982 by Commodore International.
19
Mini Computer
1. Henderson, Rebecca M.; Newell, Richard G., eds. (2011). Accelerating Energy Innovation: Insights from Multiple Sectors. Chicago:
University of Chicago Press. p. 180. ISBN 978-0226326832.
20
Mainframes
21
Super Computer
1. "IBM Blue gene announcement". 03.ibm.com. 26 June 2007. Retrieved 9 June 2012.
2. "Intrepid". Argonne Leadership Computing Facility. Argonne National Laboratory. Archived from the original on 7 May 2013.
Retrieved 26 March 2020.
22
India Super Computer
India's Journey of Supercomputers began in the '80s when the USA refused to give supercomputer to
India.
The father of India’s supercomputer
first supercomputer PARAM 8000
23
Garry Kasparov
24
https://www.youtube.com/watch?v=KF6sLCeBj0s
On May 11, 1997, chess grandmaster Garry Kasparov resigns after 19 moves in a
game against Deep Blue, a chess-playing computer developed by scientists at
IBM. This was the sixth and final game of their match, which Kasparov lost two
games to one, with three draws.
https://www.youtube.com/watch?v=NP8xt8o4_5Q
25
“
Which is the Indian super
computer ?
Param shivay
26
Digital Computers
30
Functional Units
object Program
Compiler
source program
33
Input Unit
⊡ Computer accept coded information
⊡ Read the data
⊡ Example: keyboard, Joystick,
mouse,Micrphone.
⊡ In keyboard when a key is pressed , the
corresponding letter or digit is
automatically translated into its
corresponding binary code and transmitted
over a cable to the memory or processor.
34
Memory Unit
□ Store programs and data
□ Two classes of storage
□ Primary storage
■ Fastest
■ Programs must be stored in memory while they are
being executed
■ Large number of semiconductor storage cells
■ Processed in words Address : To provide easy access
to any word
■ RAM and memory access time (how long it takes for a
character in RAM to be transferred to or from the CPU)
■ Memory hierarchy – cache, main memory
□ Secondary storage Module-III Memory System
■ larger
■ cheaper
⊡ In Computing, a Word is the natural unit of
data used by a particular processor design.
⊡ Word addressing means that address of
memory on a computer uniquely identify
words of memory.
36
Arithmetic and Logic Unit
( ALU)
⊡ Most computer operations are executed in ALU of
the processor.
⊡ Load the operands into memory – bring them to
the processor – perform operation in ALU – store
the result back to memory or retain in the
processor.
⊡ Registers – High speed storage element
⊡ Fast control of ALU
⊡ Faster than other devices connected to a computer
which enables a single processor to control
external devices
37
Output Unit
38
Control Unit
⊡ All computer operations are controlled by the
control unit.
⊡ The timing signals that govern the I/O transfers
are also generated by the control unit.
⊡ Control unit is usually distributed throughout the
machine instead of standing alone.
39
Basic functional
units of a computer
40
Operations of a
computer
⊡ Accept information in the form of programs
and data through an input unit and store it in
the memory
⊡ Fetch the information stored in the memory,
under program control, into an ALU, where the
information is processed
⊡ Output the processed information through an
output unit
⊡ Control all activities inside the machine
through a control unit
41
Registers and register files-
Interconnection of components
42
Registers
⊡ In Computer Architecture, the Registers are very fast computer
memory which are used to execute programs and operations
efficiently.
⊡ The sole purpose of having register is fast retrieval of data for
processing by CPU.
⊡ Different registers in Processor
□ Instruction Register (IR) - holds the instruction currently
being executed
□ Program Counter ( PC) - contains the address (location) of
the instruction being executed at the current time.
□ General Purpose Register (R0 – Rn-1)
⊡ Different registers for Memory
□ Memory Address Register ( MAR) - the CPU register that either
stores the memory address from which data will be fetched to the CPU registers,
or the address to which data will be sent and stored via system bus.
□ Memory Data Register (MDR) - 43 holding information (either program
This instruction adds the operand at the memory location
LOCA with the operand at the register R0 in the processor and
place the sum result into the register R0.
44
Assignment Solution
Need to perform an Logical AND Operation between two data which is available at
memory location LOCX and loctaion LOCY. Write an assembly program to do the
logical AND operation and store the result in memory location LOCZ ( Hint: Use
Internal Registers). Also write down the stpes to do the operation.
R0
Address Data/operand
LOCY 10101111 R2
LOCX 11011101
LOCZ
45
Need to perform an Logical AND Operation between two
data which is available at memory location LOCX and
location LOCY.
Write an assembly program to do the logical AND operation
and store the result in memory location LOCZ
( Hint: Use Internal Registers).
Also write down the steps to do the operation
46
Processor and Memory
Interconnection
MEMORY
MAR MDR
CONTROL
PC R0 Processor
R1
.
.
IR ALU
.
Rn-1
47
Registers
⊡ Instruction Register (IR):
□ The IR holds the instruction which is just about to be executed.
□ The instruction from PC is fetched and stored in IR.
□ As soon as the instruction in placed in IR, the CPU starts
executing the instruction and the PC points to the next
instruction to be executed.
⊡ Program Counter (PC):
□ Program Counter (PC) is used to keep the track of 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.
□ PC also functions to count the number of instructions.
⊡ General Purpose Registers:
□ These are numbered as R0, R1, R2….Rn-1, and used to store temporary
data during any ongoing operation.
48
Memory Registers
⊡ Memory Address Registers (MAR):
It holds the address of the location to be
accessed from memory.
0x0000 23
MEMORY
50
⊡ Write a set of instruction to add three data
which is available at memory location
starting from LOC100 and store the
program in memory location LOC200.
51
Typical Operating
Steps
52
Typical Operating
Steps…
8. Get operands for ALU
• General-purpose register
• Memory (address to MAR – Read – MDR to ALU)
9. Perform operation in ALU
10.Store the result back
• To general-purpose register
• To memory (address to MAR, result to MDR –
Write)
11.During the execution, PC is incremented to
the next instruction
53
Typical Operating Steps…
PROGRAM
Input 0x1002 XXXX
UNIT
Device 0x1001 XXXX ALU
0x1000 ADD x y
Rea Ope Out
dO ut rand put
0x0000
99
MEMORY
0x1001 DECODE
0x1000 0x1000 ADD x y ADD x y &
EXECUTE
PC MAR MDR IR
54
Bus Structures
55
Bus is Pathway of Bits
56
57
58
⊡ A computer has main memory with 2048
location of each 16 bit calculate the total
memory capacity.
⊡ Word length= 16 bit = 2byte 1 byte = 8
bit
⊡ No of location = 2048 = 2 KB
⊡ Capacity = 2 K * 2 Byte = 4 KB
59
Single Bus Structure
66
67
• Memory buffer register (MBR): Contains a word to be stored in
memory or sent to the I/O unit, or is used to receive a word
from memory or from the I/O unit.
• Memory address register (MAR): Specifies the address in
memory of the word to be written from or read into the MBR.
• Instruction register (IR): Contains the 8-bit opcode instruction
being executed.
• Instruction buffer register (IBR): Employed to hold temporarily
the right-hand instruction from a word in memory.
• Program counter (PC): Contains the address of the next
instruction pair to be fetched from memory.
• Accumulator (AC) and multiplier quotient (MQ): Employed to
hold temporarily operands and results of ALU operations.
68
Data Flow
69
Indirect Cycle
70
execute cycle
71
interrupt cycle
⊡ The current contents of the PC must
be saved so that the processor can
resume normal activity after the
interrupt.
⊡ The contents of the PC are
transferred to the MBR to be written
into memory.
⊡ The special memory location
Data Flow, Interrupt Cycle
reserved for this purpose is loaded
into the MAR from the control unit.
It might, for example, be a stack
pointer.
⊡ The PC is loaded with the address
of the interrupt routine. As a result,
the next instruction cycle will begin
72
Data Flow, Fetch Cycle Data Flow, Indirect Cycle
73
Architecture Type
74
75
• A fundamental design approach first implemented in
the IAS computer is known as the stored-program
concept.
76
Von Newmann Architecture Havard Architecture
It is ancient computer architecture It is modern computer
based on stored program architecture based on Harvard
computer concept. Mark I relay based model.
Same physical memory address is Separate physical memory
used for instructions and data. address is used for instructions
CPU cannot access instructions and data. CPU can access
and read/write at the same time. instructions and read/write at the
same time.
There is common bus for data and Separate buses are used for
instruction transfer. It is cheaper in transferring data and instruction.
It is costly than van neumann
cost.
architecture.
Two clock cycles are required to An instruction is executed in a
execute single instruction. It is
single cycle. It is used in micro
used in personal computers and
controllers and signal processing
small computers.
77
Von Newmann Architecture Havard Architecture
78
Register
I/O main ALU
System memory Internal
Bus Bus
Control
CPU Unit
Computer
Sequencing
Logic
Control unit
registers and
Decoders
Control
Memory
The Computer: Top-Level Structure
79
Thank You
80
CSE2003– Computer Architecture and
Organization
Dr. Swagat Kumar Samantaray
School of Computing Science & Engineering
VIT Bhopal University
MODULE-2
82
Number
• All Computer deal with Number.
• Computer build using Logic Circuits.
83
Fixed Point Number
Representation 110101
53
Signed
and
magnitude
(+27
(11011)2 (00011011)2
)10
(-
(11011)2 (10011011)2
27)10
(+101 (01100101)2
)10
(- (11101010)2
106)10
85
Example- ( 1’s Complement
Representation)
Step-1: Find the Binary Equivalent of the Number
-67
(67) 10 1000011
(+67) 10
01000011
86
Example- ( 1’s Complement
Representation)
(+102) 10
01100110
87
TASK
(88) 10 1011000
Step-2: Write Positive Number using 8 bit
(+88) 10
01011000
Step-3: Find the 1’s Complement by replacing 0 by 1 and 1 by 0
88
Example- ( 2’s Complement
Representation)
Represent the Decimal Numbers in 2’s Complement representation using eight bits
90
Example- ( 2’s Complement
Representation)
-89
91
92
Binary ,signed-integer
Representation
Binary Unsigned Signed and Binary Unsigned Signed and
Decimal Magnitude Decimal Magnitude
Number Number
0111 7 +7 1000 8 -0
0110 6 +6 1001 9 -1
0101 5 +5 1010 10 -2
0100 4 +4 1011 11 -3
0011 3 +3 1100 12 -4
0010 2 +2 1101 13 -5
0001 1 +1 1110 14 -6
0000 0 +0 1111 15 -7
93
Binary Signed and 1’s Binary Signed and 1’s
Magnitude Complement Magnitude Complement
0111 +7 +7
1000 -0 -7
0110 +6 +6
1001 -1 -6
0101 +5 +5
1010 -2 -5
0100 +4 +4
1011 -3 -4
0011 +3 +3
1100 -4 -3
0010 +2 +2
1101 -5 -2
0001 +1 +1
1110 -6 -1
0000 +0 +0
1111 -7 -0
https://www.electronics-tutorials.ws/binary/signed-
binary-numbers.html
94
Convert the following decimal values into signed binary numbers using the sign-
+23magnitude
10as a 6-bitformat:
number ⇒ 010111 2
For example, +0 and -0 would be 0000 and 1000 respectively as a signed 4-bit
binary number.
95
1’s Complementation in
Signed Binary Representation:
96
Range
4 -7 to +7
8 -127 to +127
16 -32767 to +32767
32 -2147483647 to +2147483647
97
2’s Complementation in
Signed Binary number
Representation
Positive numbers are simply represented as simple Binary representation. But if the number is negative then
it is represented using 2’s complement. First represent the number with positive sign and then take 2’s
complement of that number.
Example − Let we are using 5 bits registers. The representation of -5 and +5 will be as follows
98
Two’s Complement
Simply invert each bit of given binary number, which will be 01010001. Then add 1 to the LSB of this
result, i.e., 01010001+1=01010010 which is answer.
99
Twos Complement ,8 Bits 00010010
+18
Twos Complement,16 Bits 00000000 00010010
100
Addition and Substraction
1 0 0 1
+
0 1 0 1
1 1 1 0
101
102
Addition and Subtraction
2’s Complement
Addition in twos complement
106
subtraction rule: To subtract one number
(subtrahend) from another (minuend), take the
twos complement (negation) of the subtrahend
and add it to the minuend.
107
108
3+2 = 5
-3 4
3
4+4 = 8
3+(-3) = 0
3+(-5) = -2
109 4
110
Binary
Addition
1 0 1 0 1
1 1 0 0 1
1 1 1 0 1 0
111
Advantages & Disadvantages
Advantage
It is quite convenient for the computer to perform arithmetic. To get
the correct answer after addition, the result of addition and final
carry has to be added up.
The other disadvantage is that there are two notations for 0 (0000
and 1111), which is very inconvenient when the computer wants to
test for a 0 result.
112
Binary number 1’s complement 2’s complement
113
Multiplication
A B AXB
1110
0 0 0 x
1011
0 1 0
1110
1110
1 0 0
0000
1 1 1 1110
10011010
114
Memory Location
Operand
? To store
Instruction ADD B, R0
ADD B Opcode R0 Operand
115
Memory is the electronic holding place for the instructions and data a computer needs to reach
quickly. It's where information is stored for immediate use. Memory is one of the basic functions
of a computer, because without it, a computer would not be able to function properly. Memory is
also used by a computer's operating system, hardware and software.
There are technically two types of computer memory: primary and secondary.
116
• Memory consists of many millions of storage cells.
• Each cell will store a bit of information having value 0 or 1.
• Group of n bit can be stored and retrieve in a single basic
operation.
• Each group of n bit is ---word of information
• n is called word length
• Modern processors, including embedded systems, usually
have a word size of 8, 16, 24, 32, or 64 bits, while modern
general purpose computers usually use 32 or 64 bits.
117
n bits
First word
Second word
bn-1 bn-2 … b2 b1 b0
i-th word
Last word
Memory Word
118
• Modern computers have word length is 32 bit or 64 bit .
• If word length of computer is 32 bit, a single word can store a 32
bit 2’s complement number.
• Or 4 ASCII characters , which occupying 8 bits.
b31 b0
32 bit
8 bit ASCII Character 8 bit ASCII Character 8 bit ASCII Character 8 bit ASCII Character
119
Address SPACE
120
Byte Addressability
big-endian little-endian
121
big-endian little-endian
Word Address
122
In computing, a word is the natural unit of data used by a
particular processor design. A word is a fixed-sized piece of data handled as a
unit by the instruction set or the hardware of the processor. The number
of bits in a word (the word size, word width, or word length) is an important
characteristic of any specific processor design or computer architecture.
Uses of words
The memory model of an architecture is strongly
influenced by the word size. In particular, the
Fixed point numbers resolution of a memory address, that is, the
smallest unit that can be designated by an
address, has often been chosen to be the word.
Floating point numbers
123
Block Diagram of Hardware for Addition and Subtraction
OF = OverFlow bit
SW = Switch (select addition or
subtraction)
124
ADDER
125
126
127
128
Multiplication
• Compared with addition and subtraction, multiplication is a
complex operation, whether performed in hardware or
software
• Multiplying two unsigned
• Multiplication of numbers in twos complement
representation
129
unsigned integers
130
1. Multiplication involves the generation of partial products, one for each
digit in the multiplier. These partial products are then summed to
produce the final product.
2.The partial products are easily defined. When the multiplier bit is 0, the
partial product is 0. When the multiplier is 1, the partial product is the
multiplicand.
3. The total product is produced by summing the partial products. For this
operation, each successive partial product is shifted one position to the
left relative to the preceding partial product.
134
Flowchart for Unsigned Binary Multiplication
135
Booth’s Algorithm
136
137
Division
138
Flowchart for Unsigned Binary Division
139
Example of Restoring Twos Complement Division (7/3)
140
The algorithm assumes that the divisor V and the dividend D are positive and that ∙V∙ 6 ∙D∙. If ∙V∙ = ∙D∙,
then the quotient Q = 1 and the remainder R = 0. If ∙V∙ 7 ∙D∙, then Q = 0 and R = D. The algorithm can
be summarized as follows:
1. Load the twos complement of the divisor into the M register; that is, the M
register contains the negative of the divisor. Load the dividend into the A, Q
registers. The dividend must be expressed as a 2n-bit positive number. Thus,
for example, the 4-bit 0111 becomes 00000111.
143
IEEE Standard 754 Floating
Point Numbers
144
IEEE 754 numbers are divided into two based on the above three
components:
• single precision
• double precision
145
BIASED NORMALISED
TYPES SIGN BIAS
EXPONENT MANTISA
1(63rd bit)
Double precision 11(62-52) 52(51-0) 1023
146
Example
85.125
85 = 1010101
0.125 = 001
85.125 = 1010101.001
=1.010101001 x 2^6
sign = 0
1.Single precision: biased exponent
127+6=133 133 = 10000101
Normalized mantissa = 010101001
we will add 0's to complete the 23 bits The IEEE
754 Single precision is: =
0 10000101 01010100100000000000000
This can be written in hexadecimal form 42AA4000
147
2. Double precision:
biased exponent 1023+6=1029
1029 = 10000000101
Normalised mantissa = 010101001
we will add 0's to complete the 52 bits The IEEE
754 Double precision is: =
0 10000000101
01010100100000000000000000000000000000000000000000
00 This can be written in hexadecimal form
4055480000000000
148
Special Values: IEEE has reserved some values that can ambiguity.
• Zero –
Zero is a special value denoted with an exponent and mantissa of 0. -0 and +0 are
distinct values, though they both are equal.
• Denormalised –
If the exponent is all zeros, but the mantissa is not then the value is a denormalized
number. This means this number does not have an assumed leading one before the
binary point.
• Infinity –
The values +infinity and -infinity are denoted with an exponent of all ones and a
mantissa of all zeros. The sign bit distinguishes between negative infinity and
positive infinity. Operations with infinite values are well defined in IEEE.
• Not A Number (NAN) –
The value NAN is used to represent a value that is an error. This is represented when
exponent field is all ones with a zero sign bit or a mantissa that it not 1 followed by
zeros. This is a special value that might be used to denote a variable that doesn’t
yet hold a value.
149
EXPONENT MANTISA VALUE
Similar for Double precision
0 0 exact 0 (just replacing 255 by 2049),
Ranges of Floating point
255 0 Infinity numbers:
0 not 0 denormalised
± approximately 10-44.85 to
Single Precision ± 2-149 to (1 – 2-23)×2-126 ± 2-126 to (2 – 2-23)×2127
approximately 1038.53
± approximately 10-323.3 to
Double Precision ± 2-1074 to (1 – 2-52)×2-1022 ± 2-1022 to (2 – 2-52)×21023
approximately 10308.3
150
Thank You
151