Download as pdf or txt
Download as pdf or txt
You are on page 1of 31

Noida Institute of Engineering and Technology, Greater Noida

Micro operation

Unit:1,2&3

Computer Organization & Sanjay Kumar Nayak


Architecture
CSE
B Tech 3rd Sem Department

Sanjay Kumar Nayak KCS302 COA 3


1
9/23/2020
Combinational Circuit
Half Adder-

Half Adder is a combinational logic circuit.


It is used for the purpose of adding two single bit numbers.
It contains 2 inputs and 2 outputs (sum and carry).
0+0=0,,1+1=1 0

Half Adder Designing-

Half adder is designed in the following steps-

Step-01:

Identify the input and output variables-


Input variables = A, B (either 0 or 1)
Output variables = S, C where S = Sum and C = Carry

Step-02:

Sanjay Kumar Nayak KCS302 COA 3


9/23/2020 2
Half Adder

Sanjay Kumar Nayak KCS302 COA 3


9/23/2020 3
Instruction Types

Limitation of Half Adder-

Half adders have no scope of adding the carry bit resulting from the addition
of previous bits.
This is a major drawback of half adders.
This is because real time scenarios involve adding the multiple number of bits
which can not be accomplished using half adders.

To overcome this drawback, Full Adder comes into play.

Sanjay Kumar Nayak KCS302 COA 3


9/23/2020 4
Full Adder circuit

Full Adder is a combinational circuit that performs the addition of three bits
(two significant bits and previous carry).
It consists of three inputs and two outputs,
two inputs are the bits to be added, the third input represents the carry form
the previous position.

Sanjay Kumar Nayak KCS302 COA 3


9/23/2020 5
Full Adder Logic diagram

Sanjay Kumar Nayak KCS302 COA 3


9/23/2020 6
Micro operations
The operations performed on the data stored in registers known as
micro-operations. Example: Shift, Count Clear and Load. The micro-
operations are classified as follows.
1. Register transfer micro-operations: These type of micro
operations are used to transfer from one register to another binary
information.

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: A AND B, 1010 XOR 1111=0101
4.Shift micro operations: As their name suggests they are used to
perform shift operations in data store in registers.
Sanjay Kumar Nayak KCS302 COA 3
9/23/2020 7
Micro operations
1. Register transfer micro-operations: These type of micro operations
are used to transfer from one register to another binary
information.
2. Designate information transfer from one register to another by
R2 ← R1
If the transfer is to occur only under a predetermined control
condition, designate it by If (P = 1) then (R2 ← R1) or, P: R2 ← R1,
where P is a control function that can be either 0 or 1

Sanjay Kumar Nayak KCS302 COA 3


9/23/2020 8
Arithmetic Micro operations

Arithmetic Micro operations

Sanjay Kumar Nayak KCS302 COA 3


9/23/2020 9
Arithmetic Micro operations

Arithmetic Micro operations

Sanjay Kumar Nayak KCS302 COA 3


9/23/2020 10
Arithmetic Micro operations

Sanjay Kumar Nayak KCS302 COA 3


9/23/2020 11
Arithmetic Micro operations

Sanjay Kumar Nayak KCS302 COA 3


9/23/2020 12
Arithmetic Micro operations

Sanjay Kumar Nayak KCS302 COA 3


9/23/2020 13
Logic Micro operations

Logic Micro operations

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
1010 1100
Content of R1 0110
1100
Content of R2
0110 Content of R1 after P = 1

Sanjay Kumar Nayak KCS302 COA 3


9/23/2020 14
Logic Micro operations

Logic Micro operations

Sanjay Kumar Nayak KCS302 COA 3


9/23/2020 15
Logic Micro operations

Logic Micro operations

Sanjay Kumar Nayak KCS302 COA 3


9/23/2020 16
Logic Micro operations

Logic Micro operations

Sanjay Kumar Nayak KCS302 COA 3


9/23/2020 17
Logic Micro operations

Logic Micro operations

Example: compliment A, A=1100110,


A’=0011001 Ans

Sanjay Kumar Nayak KCS302 COA 3


9/23/2020 18
Logic Micro operations

Logic Micro operations

Sanjay Kumar Nayak KCS302 COA 3


9/23/2020 19
Micro operations

Shift Micro operations

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.
There are three types of shift micro operation-
1. Logic shift 2. Circular shift 3. Arithmetic shift

Logical Shift:- The symbol “shl” is used for logical shift left
and “shr” is used for logical shift right.

Sanjay Kumar Nayak KCS302 COA 3


9/23/2020 20
Micro operations

Sanjay Kumar Nayak KCS302 COA 3


9/23/2020 21
Micro operations

Sanjay Kumar Nayak KCS302 COA 3


9/23/2020 22
Micro operations

Sanjay Kumar Nayak KCS302 COA 3


9/23/2020 23
Micro operations

Example: Perform logical shift and circular shift on given data

R= 1100110
shl, shr, cil, cir
Ans.

Perform ashr shift micro operation


Example R: 1100110

1 1 1 0 0 1 1

Sanjay Kumar Nayak KCS302 COA 3


9/23/2020 24
Micro operations

Sanjay Kumar Nayak KCS302 COA 3


9/23/2020 25
Micro operations

Numerical

Sanjay Kumar Nayak KCS302 COA 3


9/23/2020 26
Micro operations

Numerical

Sanjay Kumar Nayak KCS302 COA 3


9/23/2020 27
Micro operations

Numerical

Sanjay Kumar Nayak KCS302 COA 3


9/23/2020 28
Micro operations

Sanjay Kumar Nayak KCS302 COA 3


9/23/2020 29
Micro operations

Numerical

Sanjay Kumar Nayak KCS302 COA 3


9/23/2020 30
Micro operations

Numerical

Sanjay Kumar Nayak KCS302 COA 3


9/23/2020 31

You might also like