Unit 3 Micro Operations
Unit 3 Micro Operations
Unit 3: 1
@DC
1. Addition
2. Subtraction
3. Increment
4. Decrement
5. Shift
The following table shows the symbolic representation of various Arithmetic Micro-operations.
Unit 3: 2
@DC
The increment and decrement micro-operations are symbolized by '+ 1' and '- 1'
respectively.
Arithmetic operations like multiply and divide are not included in the basic set of micro-
operations.
Logic Microoperations
These are binary micro-operations performed on the bits stored in the registers. These
operations consider each bit separately and treat them as binary variables. These are useful for
bit manipulations on binary data and also useful for making logical decisions based on the bit
value.
Logic micro-operations can be used to change bit values, delete a group of bits, insert new bit
values into a register. There are different logic functions that can be defined over two binary
input variables. However, most systems only implement four of these:
AND (^), OR (∨), XOR (⊕), Complement (NOT)
For example, the exclusive-OR microoperation with the contents of two registers R 1 and R2 is symbolized by
the statement P: R1 ← R1 ⊕ R2
It specifies a logic microoperation to be executed on the individual bits of the registers provided that
the control variable P = 1. As a numerical example, assume that each register has four bits. Let the
content of R1 be 1010 and the content of R2 be 1100.
The exclusive-OR microoperation stated above symbolizes the following logic computation:
two binary variables as shown in Table below. In this table, each of the 16
columns F0 through F15 represents a truth table of one possible Boolean function
for the two variables x and y.
The functions are determined from the 16 binary combinations that can be
assigned to F. The 16 Boolean functions of two variables x and y are
expressed in algebraic form in the first column of Table below.
The 16 logic microoperations are derived from these functions by replacing
variable x by the binary content of register A and variable y by the binary
content of register B.
It is important to realize that the Boolean functions listed in the first
column of Table below represent a relationship between two binary
variables x and y.
Unit 3: 4
@DC
Unit 3: 5
@DC
Logic microoperations are very useful for manipulating individual bits or a portion of a word stored
in a register.
They can be used to change bit values, delete a group of bits, or insert new bit values into a register.
Shift Microoperations
These are used for serial transfer of data. That means we can shift the contents of the register
to the left or right. In the shift left operation the serial input transfers a bit to the right most
position and in shift right operation the serial input transfers a bit to the left most position.
There are 3 types of shift micro operations.
What differentiates them is the information that goes into the serial input:
1. Logical shift
2. Circular shift
3. Arithmetic shift
1. Logical Shift:
Logical shift is one that transfers 0 through the serial input. The logical shift can be of two types:
Unit 3: 6
@DC
Symbol Microoperation
shl logical shift-left
shr Logical shift-right
For example:
R1 ← shl R1
R1 ← shr R1
* The register symbol must be same on both sides of arrows
2. Circular shift
The circular shift rotates of the register around the two ends without loss of information.
This is accomplished by connecting the two ends of the shift register to each other. "cil" and
"cir" is used for circular shift left and right respectively.
R2← cir R2
R3← cil R3
3. Arithmetic Shift:
Arithmetic shift is a micro-operation that shifts a signed binary number to the left or right.
Arithmetic shift must leave sign bit unchanged.
The arithmetic shift right is considered divide by 2 and left shift is considered multiply by 2.
Unit 3: 7
@DC
This unit has 2 operands input ports and one output port and a number of select lines to help in
selecting different operations. The ALU is made of combinational circuit so that the entire
register transfer operation from the sources to the destination is performed in one clock cycle.
The arithmetic, logic, and shift circuits known previously will be combined in one ALU with
common selection inputs.
Unit 3: 8
@DC
Unit 3: 9
@DC
Unit 3: 10
@DC
- End of Unit 3 -
Unit 3: 11