Professional Documents
Culture Documents
Coa - Unit - 2 - 3 - 4 Notes
Coa - Unit - 2 - 3 - 4 Notes
Block Diagram:
Truth Table :
Amit 11/22/2023
Yadav , NIET Gr Noida AMIT YADAV Computer Organisation & Architecture Unit 2 5
Parallel Adder
• Parallel Adder is a digital circuit that efficiently adds more than 1 bit binary numbers.
• 4- bit Parallel Adder is designed using 4 Full Adders FA0, FA1, FA2, FA3 .
A carry Look-ahead adder is a fast parallel adder as it reduces the propagation delay by more
complex hardware, hence it is costlier.
Pi = Ai ⊕ Bi
Gi = Ai Bi
Si = Pi ⊕ Ci
C i+1 = Gi + Pi Ci
The carry output Boolean function of each stage in a 4 stage carry Look-ahead adder can be
expressed as
C1 = G0 + P0 C0
C2= G1 + P1 C1
= G1 + P1 G0 + P1 P0 C0
C3 = G2 + P2 C2
= G2 + P2 G1+ P2 P1 G0 + P2 P1 P0 C0
•The IEEE Standard for Floating-Point Arithmetic (IEEE 754) is a technical standard for floating-point
computation which was established in 1985 by the Institute of Electrical and Electronics Engineers
(IEEE).
• IEEE 754 numbers are divided into two based on the above three components: single
precision and double precision.
NORMALISED
TYPES SIGN BIASED EXPONENT BIAS
MANTISA
• Several types of multipliers are studied: array multipliers, Wallace tree multipliers, booth
multiplier.
• An array multiplier is a digital combinational circuit used for multiplying two binary
numbers by employing an array of full adders and half adders.
• Array multiplier is common in multiplier design due to its regular and compact structure.
• The structure of array multiplier is organized by several stages of adders and AND-gates.
• It generates all the partial products after only one AND-gate delay. Then, it sums up all partial
products sequentially.
• The multiplication of two 2-bit numbers as shown in figure. The multiplicand bits are b1 and b0, the
multiplier bits are a1 and a0, and the product is -
• (j x k) AND gates
• (j-1 )x k bit adders produce
• A product of j + k bits
• The Booth multiplication algorithm defines a multiplication algorithm that can multiply two signed
binary numbers in two’s complement.
• This increases the speed by reducing the total number of partial product sums that must take place.
• 00 no arithmetic operation
• 01 add multiplicand to left half of product
• 10 subtract multiplicand from left half of product
• 11 no arithmetic operation
▪ Control Unit is the part of the computer’s central processing unit (CPU), which directs the
operation of the processor.
➢It coordinates the sequence of data movements into, out of, and between a processor’s many sub-
units.
➢It controls data flow inside the processor.
➢It receives external instructions or commands to which it converts to sequence of control signals.
➢It also handles multiple tasks, such as fetching, decoding, execution handling and storing results.
➢It In the hardwired organization, the control logic is implemented with gates, flip-flops, decoders,
and other digital circuits.
➢ Because of the use of combinational circuits to generate signals, Hardwired Control Unit is fast.
➢In the micro programmed organization, the control information is stored in a control memory.
➢The control memory is programmed to initiate the required sequence of micro-operations
There are several types of instruction formats, including zero, one, two, and three-address instructions.
•The time period during which one instruction is fetched from memory and executed when a computer is
given an instruction in machine language.
•There are typically four stages of an instruction cycle that the CPU carries out:
1. Fetch instruction from memory : At the beginning of the fetch cycle, the address of
the next instruction to be executed is in the Program Counter(PC)
4. Execute the instruction(Microcode for the instruction, selected by the decoder output
line, is executed by the ALU.)
Example: Shift, Count Clear and Load. The micro-operations are classified as follows:
2. Arithmetic micro-operations :
These micro-operations are used to perform on numeric data stored in the registers some arithmetic operations.
3. Logic micro-operations:
These micro operations are used to perform bit style operations / manipulations on non numeric data.
Example Description
R3 ← R1 + R2 Addition
R3 ← R1 - R2 (R1 + R2' + 1) Subtraction
Complement (really a logic
R2 ← R2'
operation)
R2 ← -R2 (R2' + 1) Negation
R1 ← R1 + 1 Increment
R1 ← R1 - 1 Decrement
Logic Micro-Operations:
Individual bits of registers are operated with other corresponding register bits. Example:
the XOR of R2 and R1 is symbolized by
P: R1 ←R1 ⊕R2
Example: R1 = 1010 and R2 = 1100
1010
Content of R1
1100
Content of R2
0110
Content of R1 after P = 1
Shift Micro-Operations: – these operations are used for serial transfer of data. They are also used in
conjunction with arithmetic, logic, and other data-processing operation.
The content of register can be shifted to the left or to the right. At the same time the bits are shifted,
the flip flop receives the binary information from the serial input.
Logical Shift:- The symbol “shl” is used for logical shift left and “shr” is used for logical shift right.
Micro-programmed control unit can be classified into two types based on the type of
Control Word stored in the Control Memory.
• Horizontal micro-programmed control unit
• Vertical micro-programmed control unit
Horizontal micro-programmed control unit, the control signals are represented in the
decoded binary format, i.e., 1 bit/CS. Here ‘n’ control signals require n bit encoding.
Vertical Micro-programmed Control Unit, the control signals are represented in the encoded
binary format. Here ‘n’ control signals require log2n bit encoding
RESET – It reset the processor. This may include any or all setting registers to an initial
value or setting program counter to standard starting location.
TRAP – It is non-maskable edge and level triggered interrupt. TRAP has the highest priority
and vectored interrupt.
INTR – It is level triggered and maskable interrupt. It has the lowest priority. It can be
disabled by resetting the processor.
➢Pipelining is the process of accumulating instruction from the processor through a pipeline.
Pipeline Stages
RISC processor has 5 stage instruction pipeline to execute all the instructions in the
RISC instruction set.
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.
• A Memory Unit is a collection of storage cells together with associated circuits needed to transfer
information in and out of storage.
• The memory stores binary information(1's and 0's) in groups of bits called words. A storage
element is called a Cell.
• A group of eight bits is called a byte. Most computer memories use words whose number of bits
is a multiple of 8.
•RAM (Random Access Memory) is a part of computer’s Main Memory which is directly
accessible by CPU.
•RAM is used to Read and Write data into it which is accessed by CPU randomly. RAM is
volatile in nature.
• RAM is used to store the data that is currently processed by the CPU.
2D Memory organization
In 2D organization memory is divides in the form of rows and columns. Each row contains a
word now in this memory organization there is a decoder.
A decoder is a combinational circuit which contains n input lines and 2n output lines.
2D Memory organization
• In 2.5D Organization the scenario is the same but we have two different decoders one is column
decoder and another is row decoder.
• Column decoder used to select the column and row decoder is used to select the row. Address
from the MAR will go in decoders’ input.
• Page replacement is a process of swapping out an existing page from the frame of a main
memory and replacing it with the required page.
Page Replacement Algorithms-
• Page replacement algorithms help to decide which page must be swapped out from the main
memory to create a room for the incoming page.
• As the name suggests, this algorithm works on the principle of “First in First out“.
• It replaces the oldest page that has been present in the main memory for the longest time. It is
implemented by keeping track of all the pages in a queue.
Example:
A system uses 3 page frames for storing process pages in main memory. It uses the FIFO page
replacement policy. Assume that all the page frames are initially empty. What is the total number of
page faults, hit ratio and miss ratio and page reference string given below-
4 , 7, 6, 1, 7, 6, 1, 2, 7, 2