You are on page 1of 9

University Of Tikrit

College Of Petroleum Process Engineering


Department Of Petroleum System Control Engineering

Arithmetic and Logical Micro-operation.

Class: Third Year


Subject: Computer Architecture I
Lecturer: Dr. Jamal A. Hameed
Student: Mohammed Munther Abed
Introduction
In computer central processing units, micro-operations (also
known as a micro-ops or μops, historically also as micro-
actions) are detailed low-level instructions used in some designs
to implement complex machine instructions (sometimes
termed macro-instructions in this context).
Usually, micro-operations perform basic operations on data stored
in one or more registers, including transferring data between
registers or between registers and external buses of the central
processing unit (CPU), and performing arithmetic or logical
operations on registers. In a typical fetch-decode-execute cycle,
each step of a macro-instruction is decomposed during its
execution so the CPU determines and steps through a series of
micro-operations. The execution of micro-operations is performed
under control of the CPU's control unit, which decides on their
execution while performing various optimizations such as
reordering, fusion and caching.
Arithmetic Micro-operations
In general, the Arithmetic Micro-operations deals with the
operations performed on numeric data stored in the registers.

The basic Arithmetic Micro-operations are classified in the following


categories:

1. Addition.
2. Subtraction.
3. Increment.
4. Decrement.
5. Shift.
Some additional Arithmetic Micro-operations are classified as:

1. Add with carry.


2. Subtract with borrow.
3. Transfer/Load, etc.

The following table shows the symbolic representation of various


Arithmetic Micro-operations.
In addition to, 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.

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 diagram of a 4-bit arithmetic circuit is shown in Fig. below. It
has four full-adder circuits that constitute the 4-bit adder and four
multiplexers for choosing different operations. There are two 4-bit
inputs A and B and a 4-bit output D.
Arithmetic circuit function table:

Logical Micro-operations
Logic micro-operations specify binary operations for strings of bits
stored in registers. These operations consider each bit of the
register separately and treat them as binary variables.
For example, the exclusive-OR micro-operation with the contents
of two registers R1 and R2 is symbolized by the statement

It specifies a logic micro-operation to be executed on the


individual bits of the registers provided that the control variable
P = 1.
List of Logic Micro-operations
There are 16 different logic operations that can be performed with
two binary variables.
They can be determined from all possible truth tables obtained
with two binary variables as shown in Table below.
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 micro-operations 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.
The logic micro-operations listed in the second column represent
a relationship between the binary content of two registers A and
B.
Hardware Implementation
The hardware implementation of logic micro-operations requires
that logic gates be inserted for each bit or pair of bits in the
registers to perform the required logic function. Although there are
16 logic micro-operations, most computers use only four--AND,
OR, XOR (exclusive-OR), and complement from which all others
can be derived.
Figure below shows one stage of a circuit that generates the four
basic logic micro-operations.
It consists of four gates and a multiplexer. Each of the four logic
operations is generated through a gate that performs the required
logic. The outputs of the gates are applied to the data inputs of
the multiplexer. The two selection inputs S1 and S0 choose one
of the data inputs of the multiplexer and direct its value to the
output.

Concussion
In computer central processing units, micro-operations are the
functional or atomic, operations of a processor. These are low
level instructions used in some designs to implement complex
machine instructions. They generally perform operations on data
stored in one or more registers. They transfer data between
registers or between external buses of the CPU, also performs
arithmetic and logical operations on registers.
In executing a program, operation of a computer consists of a
sequence of instruction cycles, with one machine instruction per
cycle. Each instruction cycle is made up of a number of smaller
units – Fetch, Indirect, Execute and Interrupt cycles. Each of
these cycles involves series of steps, each of which involves the
processor registers. These steps are referred as micro-
operations. the prefix micro refers to the fact that each of the step
is very simple and accomplishes very little. Figure below depicts
the concept being discussed here.
References
1. “Computer Organization and Architecture, Chapter 15.
Control Unit Operation”
2. “Computer System Architecture, Chapter 4. Register
Transfer and Micro-operations”

You might also like