Unit-1_Slides_COA_updated
Unit-1_Slides_COA_updated
Unit-1_Slides_COA_updated
Organization
And Architecture
DR. M. RAMPAVAN
Syllabu
s
Text Books
1. Computer System Architecture - Morris Mano, Third
edition, Pearson publications.
2. Computer Organization - Carl Hamacher, Zvonko
Vranesic and Safwat Zaky, V Edition, McGraw-Hill
publications, Fifth Edition, Oxford University Press.
Continuous Evaluation
End Semester
Control Unit : The Control unit coordinates and controls the data flow in and out of
CPU and also controls all the operations of ALU, memory registers and also
input/output units. It is also responsible for carrying out all the instructions stored in
the program. It decodes the fetched instruction, interprets it and sends control signals
to input/output devices until the required operation is done properly by ALU and
memory.
Memory Registers : A register is a temporary unit of memory in the CPU. These are used to
store the data which is directly used by the processor.
Registers can be of different sizes(16 bit, 32 bit, 64 bit and so on) and each register inside the CPU
has a specific function like storing data, storing an instruction, storing address of a location in
memory etc.
The user registers can be used by an assembly language programmer for storing operands,
intermediate results etc.
Accumulator (ACC) is the main register in the ALU and contains important operands of an
operation to be performed in the ALU.
MEMORY UNIT: It stores the programs and data.
Primary Responsible for temporarily holding the data and instruction that CPU
Storage: needs to process
Memory in which any location can be reached in short and fixed amount
RAM: of time after specifying its address is called RAM.
Time required to access 1 word is called Memory Access Time.
The small, fast, RAM units are called Cache. They are tightly coupled with
Cache
processor and are often contained on the same integrated circuit chip to
Memory:
achieve high performance.
Main Memory: The largest and the slowest unit is called the main memory.
Secondary
Magnetic disks, optical disks are secondary storage devices
Storage:
Bus Structures
The term "bus" refers to a communication system that allows various
components within a computer system to exchange data. It serves as a
pathway for information flow between the different parts of a computer,
enabling seamless communication and coordination.
A “bus structure” refers to the arrangement and organization of buses
within a computer system. The bus structure defines how these buses are
interconnected and how they facilitate data transfer and control within the
system.
There are many ways to connect different parts inside the computer
together. First way is Single Bus Structure and second is Multi-Bus
structure.
Functions of Bus Structure:
1. Data Transfer
2. Addressing
3. Control and Coordination
4. Peripheral Communication
Single Bus Structure:
Address Bus:
The address bus carries information about the memory location or I/O port
where data needs to be read from or written to.
Its width determines the maximum addressable memory space. A wider
address bus can access a larger memory.
Control Bus:
The control bus carries control signals that coordinate and
regulate the activities of various components.
Control signals include read and write signals, interrupt requests,
clock signals, and bus control signals.
System Bus:
The system bus encompasses the data, address, and control
buses, providing a comprehensive communication pathway for
the entire system.
Advantages of Multi-Bus Structure:
1. Improved Performance: By segmenting the buses, a multi-bus
structure can increase the data transfer bandwidth and reduce
contention, improving overall system performance.
2. Scalability: Multi-bus architectures are more scalable than
single bus architectures. As the system’s complexity grows,
additional buses can be added to accommodate more devices
and higher data transfer rates.
3. Reduced Bus Contention: With dedicated buses for specific
purposes or peripheral devices, bus contention is minimized,
resulting in smoother and more efficient data transfers.
4. Specialized Communication: I/O buses allow for specialized
communication between the CPU and peripheral devices,
optimizing data exchange for specific tasks like graphics
rendering or data storage.
Disadvantages of Multi-Bus Structure:
1. Complexity: Multi-bus structures are more complex to design
and implement than single bus structures, which can increase
system cost and complexity.
2. Higher Hardware Costs: The use of multiple buses may require
additional hardware components, increasing the overall cost of
the computer system.
Multi-bus structures are often found in high-performance computing
systems, workstations, and servers.
Fixed Point and Floating-Point Operation
Reading the remainders from bottom to top, the binary representation of 2234 is
100010110010.
2) Convert the fractional part (0.3144) to binary:
Multiply the fractional part by 2, and take the integer part as the next binary digit.
Repeat with the fractional part:
0.3144 × 2 = 0.6288 (integer part: 0)
0.6288 × 2 = 1.2576 (integer part: 1)
0.2576 × 2 = 0.5152 (integer part: 0)
0.5152 × 2 = 1.0304 (integer part: 1)
0.0304 × 2 = 0.0608 (integer part: 0)
0.0608 × 2 = 0.1216 (integer part: 0)
0.1216 × 2 = 0.2432 (integer part: 0)
0.2432 × 2 = 0.4864 (integer part: 0)
0.4864 × 2 = 0.9728 (integer part: 0)
0.9728 × 2 = 1.9456 (integer part: 1)
Original: 100010110010.0101
1's Complement: 011101001101.1010
2's Complement
011101001101.1010
+ 1
___________________
011101001101.1011
Finally: For the number 2234.3144
Binary Representation: 100010110010.0101
1's Complement: 011101001101.1010
2's Complement: 011101001101.1011
This representation assumes a fixed number of bits for the integer and fractional
parts. In practice, the binary representation and complements might be handled
differently depending on the precision and format used.
Booth's Algorithm
1. Efficient Multiplication: It reduces the number of required
additions/subtractions by identifying patterns of consecutive ones or zeros.
2. Signed Number Multiplication: It correctly handles multiplication of both
positive and negative numbers in two's complement form.
3. Optimized Hardware Implementation: It helps in simplifying hardware
multipliers by reducing unnecessary additions, making it faster and more
efficient.
How Booth's Algorithm Works
(-1)s × M × (B)E-Bias
Normalization
E -127 = 10
E = 137, Next Convert the 137 into binary using LCM method
E = (10001001)2
Sign = 0(1 bit), Mantissa =00111000110010000000000(23 bit), Exponent =
10001001(8 bit)
Step 4: Double Precision Format
(1.N) 2E-1023 = 1.0011100011001 x 210
E-1023 = 10 , So E = 1033
Convert 1033 into binary using the LCM method
1033 = (10000001001)2
Sign = 0(1 bit), Mantissa =0011100011001……(52 bit), Exponent =
10000001001(11 bit)
Double Precision Format
0 10000001001 0011100011001……
The IEEE 754 standard defines several special cases for floating-
point numbers beyond just the regular values
Floating Point Arithmatic
Addtion:
Subtraction:
Introduction to ALU
Definition: An ALU is a digital circuit within the CPU that performs
arithmetic and logical operations. It's a crucial component of the
processor, enabling it to perform calculations and make logical
decisions.
• ALU can be designed with the help of simple logic gates, multiplexer
and adder etc.
• Divide and Conquer strategy
• Once the functions of AU and LU are identified the next thing is to
prepare the function table.
• Once the function table is prepared, Arithmetic and Logical units are
implemented logically.
• Then this function table is mapped such a way that arithmetic and
logic unit can be integrated together.
Principle of ALU Design
Arithmetic Operations:
Addition: Adds two binary numbers.
Subtraction: Subtracts one binary number from another.
Multiplication: Multiplies two binary numbers (basic ALUs may not include this).
Division: Divides one binary number by another (basic ALUs may not include
this).
Logical Operations:
AND: Performs a bitwise AND operation.
OR: Performs a bitwise OR operation.
XOR: Performs a bitwise XOR operation.
NOT: Performs a bitwise NOT operation (inverting bits).
Shift Operations:
Logical Shift: Shifts bits left or right, filling with zeros.
Arithmetic Shift: Shifts bits left or right, preserving the sign bit.
Rotate: Rotates bits left or right, wrapping around the bits that
fall off.
Comparison Operations:
Equality: Checks if two numbers are equal.
Less Than/Greater Than: Compares two numbers to determine
their relative magnitude.
Components of an ALU:
An ALU typically consists of the following components:
Adder/Subtractor:
Implements addition and subtraction operations.
Subtraction is often implemented using two's complement arithmetic.
Logic Unit:
Implements logical operations like AND, OR, XOR, and NOT.
Shifter:
Implements shift and rotate operations.
Multiplexer (MUX):
Selects the output from different units (adder, logic unit, shifter) based on control
signals.
ALU Design
ALU Design(1-bit ALU Design)
ALU Design(1-bit ALU Design)
Let's design a simple 4-bit ALU that can perform basic arithmetic and logic operations.
Components:
Inputs: Two 4-bit operands (A and B), operation selection control signals, and carry-in.
Outputs: 4-bit result, carry-out, and zero flag.
Operation Selection:
Use control signals to select the operation (e.g., 00 for addition, 01 for subtraction, 10 for AND, 11 for OR).
Adder/Subtractor:
Implement a 4-bit adder using full adders.
For subtraction, use the two's complement method by inverting the bits of B and adding 1.
Logic Unit:
Use basic logic gates to implement AND, OR, and XOR operations.
Multiplexer:
Use multiplexers to select the appropriate output from the adder/subtractor or logic unit based on the
operation selection control signals.
Division
Binary division follows the same long division process as decimal division, but with
binary digits (0 and 1)
Divide 1011 (11) by 11 (3).
Restoring division algorithm