You are on page 1of 20

UNIT – I

Topic: 3

Types of Microoperations

Ramesh Masuna-Associate professor-ACE engg College 22


Types of Microoperations

The operations executed on data stored in registers are called


microoperation.
A microoperation is an elementary operation performed on the
information stored in one or more registers.

The microoperations most often encountered in digital computers are


classified into four categories:
1. Register transfer microoperations
2. Arithmetic microoperations
3. Logic microoperations
4. Shift microoperations

Ramesh Masuna-Associate professor-ACE engg College 23


Register transfer microoperations

A B Transfer content of reg. B into reg. A

AR DR(AD) Transfer content of AD portion of reg. DR into reg. AR

A  constant Transfer a binary constant into reg. A

ABUS  R1, Transfer content of R1 into bus A and, at the same time
R2  ABUS Transfer content of bus A into R2

DR  M[AR] Memory read operation: transfers content of


memory word specified by AR into DR
M [AR] DR Memory write operation: transfers content of
DR into memory word specified by AR

Ramesh Masuna-Associate professor-ACE engg College 24


Arithmetic Microoperations

The basic arithmetic microoperations are


− Addition
− Subtraction
− Increment
− Decrement
The additional arithmetic microoperations are
− Add with carry
− Subtract with borrow
− Transfer/Load
− etc. …

Ramesh Masuna-Associate professor-ACE engg College 25


Arithmetic Microoperations

Symbolic designation Description

R3  R1 + R2 Contents of R1 plus R2 transferred to R3

R3  R1 - R2 Contents of R1 minus R2 transferred to R3

R2  R2 Complement the contents of R2 (1's complement)

R2  R2+ 1 2's complement the contents of R2 (negate)

R3  R1 + R2 + 1 Subtraction ( R1 plus the 2's complement of R2)

R1  R1 + 1 Increment content of R1 by 1

R1  R1 – 1 Decrement content of R1 by 1

Ramesh Masuna-Associate professor-ACE engg College 26


Arithmetic Microoperations

Binary Adder

• The digital circuit that forms the arithmetic sum of two bits and a
previous carry is called a full-adder.

• A binary adder is a digital circuit that generates the arithmetic sum of


two binary numbers of any length.

• A binary adder is constructed with full-adder circuits connected in


cascade.

•An n-bit binary adder requires n full-adders.

Ramesh Masuna-Associate professor-ACE engg College 27


Arithmetic Microoperations

Full Adder

• The digital circuit that forms the arithmetic sum of two bits and a
previous carry is called a full-adder.

Bi Ai

Carryout FA Carryin

SUM

Ramesh Masuna-Associate professor-ACE engg College 28


Arithmetic Microoperations

Binary Adder augend : A and addend:B

B3 A3 B2 A2 B1 A1 B0 A0

C3 C2 C1
FA FA FA FA C0

C4 S3 S2 S1 S0

Fig: 4-bit binary adder (connection of FAs)


FA: Full Adder

Ramesh Masuna-Associate professor-ACE engg College 29


Arithmetic Microoperations

Binary Adder augend : A and addend:B

B3 A3 B2 A2 B1 A1 B0 A0

C3 C2 C1
FA FA FA FA C0

C4 S3 S2 S1 S0

4-bit binary adder


FA: Full Adder

Ramesh Masuna-Associate professor-ACE engg College 30


Arithmetic Microoperations

Binary Adder-Subtractor

• The subtraction of binary numbers can be done most conveniently by means of


complements.

• The subtraction A-B can be done by taking the 2’s complement of B and adding it to A.

• The 2’s complement can be obtained by taking the 1’s complement and adding one to the
least significant pair of bits.

• The 1’s complement can be implemented with inverters and a one can be added to the sum
through the input carry.

• The addition and subtraction operations can be combined into one common circuit by
including an XOR gate with each full-adder.

Ramesh Masuna-Associate professor-ACE engg College 31


Arithmetic Microoperations

Binary Adder-Subtractor
B3 A3 B2 A2 B1 A1 B0 A0

M When M=0 the


circuit is an
adder

when M=1 the


circuit becomes
C3 C2 C1 C0 a subtractor
FA FA FA FA

C4 S3 S2 S1 S0

4-bit adder-subtractor ( FA: Full Adder )

Ramesh Masuna-Associate professor-ACE engg College 32


Arithmetic Microoperations

Binary Adder-Subtractor
B3 A3 B2 A2 B1 A1 B0 A0

M When M=0 the


circuit is an
adder

when M=1 the


circuit becomes
C3 C2 C1 C0 a subtractor
FA FA FA FA

C4 S3 S2 S1 S0

4-bit adder-subtractor

Ramesh Masuna-Associate professor-ACE engg College 33


Arithmetic Microoperations

Binary Incrementer

• The increment microoperation adds one to a number in a


register.

• For example, if a 4-bit register has a binary value 0110, it will


go to 0111 after it is incremented.

• This microoperation is easily implemented with a binary


counter.

Ramesh Masuna-Associate professor-ACE engg College 34


Arithmetic Microoperations

Half Adder

• The digital circuit that forms the arithmetic sum of two bits and
produces sum and carry is called a Half-adder.

Bi Ai

Carry HA

SUM

Ramesh Masuna-Associate professor-ACE engg College 35


Arithmetic Microoperations

Binary Incrementer

A3 A2 A1 A0 1

x y x y x y x y

HA HA HA HA

C S C S C S C S

C4 S3 S2 S1 S0

4-bit Binary Incrementer


HA: Half Adder

Ramesh Masuna-Associate professor-ACE engg College 36


Arithmetic Microoperations

Binary Incrementer

A3 A2 A1 A0 1

HA HA HA HA

C S C S C S C S

C4 S3 S2 S1 S0

4-bit Binary Incrementer

Ramesh Masuna-Associate professor-ACE engg College 37


Arithmetic Microoperations

Arithmetic Circuit

• The arithmetic microoperations can be implemented in one composite


arithmetic circuit.

• The basic component of an arithmetic circuit is the parallel adder.

•By controlling the data inputs to the adder, it is possible to obtain different
types of arithmetic operations.

• The output of the binary adder is calculated from the following arithmetic
sum:

D = A + Y + Cin

Ramesh Masuna-Associate professor-ACE engg College 38


Arithmetic Microoperations

TABLE : Arithmetic Circuit Function Table

Ramesh Masuna-Associate professor-ACE engg College 39


Cin

A0 X0 C0
S0 FA D0 =A0+Y0 + Cin
S1 Y0 C1
B0 0 4X1
1 MUX-0
0 2
1 3

Ramesh Masuna-Associate professor-ACE engg College 40


D = A + Y + Cin

Ramesh Masuna-Associate professor-ACE engg College 41


Fig: 4-bit Arithmetic Circuit

You might also like