0% found this document useful (0 votes)
35 views22 pages

Computer - Archito - Lecture 3

The document discusses a lecture on micro-operations. It defines micro-operations as elementary operations performed on data stored in registers. It identifies four main types of micro-operations: 1) register transfer micro-operations which transfer data between registers or memory, 2) arithmetic micro-operations which perform calculations in the ALU, 3) logic micro-operations, and 4) shift micro-operations. Examples of common register transfer micro-operations are provided like load, store, transfer, increment, and decrement.

Uploaded by

Dennis Yartel
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
35 views22 pages

Computer - Archito - Lecture 3

The document discusses a lecture on micro-operations. It defines micro-operations as elementary operations performed on data stored in registers. It identifies four main types of micro-operations: 1) register transfer micro-operations which transfer data between registers or memory, 2) arithmetic micro-operations which perform calculations in the ALU, 3) logic micro-operations, and 4) shift micro-operations. Examples of common register transfer micro-operations are provided like load, store, transfer, increment, and decrement.

Uploaded by

Dennis Yartel
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 22

VALLEY VIEW UNIVERSITY

COURSE CODE: COSC 257


COMPUTER ARCHITECTURE AND MICROPROCESSOR SYSTEM

Lecture Three 16th Oct. 2023


Martin Doe
Call/WhatsApp: 0242780967
[email protected]
Department of Information Technology
Valley View University
COURSE CODE: COSC 257
COMPUTER ARCHITECTURE AND MICROPROCESSOR SYSTEM

Micro-operations

By the end of this lecture, learners will be able to:


✓Explain the concept of micro- operations
✓Explain the various examples of micro-operations(shift, load, increment,
count)
✓Identify four types of micro-operations in a computer system: register
transfer micro-operation, arithmetic micro-operation, logic micro-
operation and shift micro-operation.
Micro-operations

Operations executed on data stored in a register is called Micro-operation.


Microoperation is an elementary operation performed with/on the data stored
in the registers.
A microoperation is an elementary operation performed on the information
stored in one or more registers.
Eg. Load, count, increment, decrement.
Types of micro operations

1. Register transfer micro-operation: They are used to transfer


binary information from one register to another.
These operations involve the transfer of data between CPU
registers or between registers and memory. Examples include
load, move, store and exchange operations.
The availability of hardware logic circuits that can perform a stated
micro-operation and transfer the result of the operation to the same
or other register is called Register transfer micro-operation.
1. Register transfer micro-operation
1. Transfer (T): The transfer operation involves moving the content of one
register to another. For instance, transferring the data from Register A to
Register B.
2. Load (L): The load operation transfers data from memory to a register. For
example, loading a value from memory into a specific register.
3. Store (S): The store operation transfers data from a register to memory. It is
the opposite of the load operation.
4. Exchange (X): The exchange operation involves swapping the contents of
two registers. For instance, exchanging the contents of Register A and
Register B.
1. Register transfer micro-operation
5. Clear (C): The clear operation sets a register to zero by transferring zero into
the specified register.
6. Increment (I): The increment operation adds 1 to the value stored in a
register.
7. Decrement (D): The decrement operation subtracts 1 from the value stored in
a register.
8. Complement (CM): The complement operation changes all 0s to 1s and vice
versa in a register.
9. Add (A): The add operation involves adding the contents of two registers and storing the
result in another register.
10. Subtract (SUB): The subtract operation involves subtracting the contents of one register
from another and storing the result in another register.
Types of micro operations

2. Arithmetic micro-operations: They perform arithmetic operations


on the numeric data stored in various registers.
These operations involve basic arithmetic computations such as
addition, subtraction, multiplication, and division. The operations take
place in the ALU.
Types of micro operations

2. Arithmetic micro-operations

Arithmetic operations can be performed on the numeric data which is stored


inside the registers.
Example :
R3 R1 + R2
The value in register R1 is added to the value in the register R2 and then the sum
is transferred into register R3. Similarly, other arithmetic micro-operations are
performed on the registers.
Types of micro operations
2. Arithmetic micro-operations

•Addition
In addition micro-operation, the value in register R1 is added
to the value in the register R2 and then the sum is transferred
into register R3.
Types of micro operations
2. Arithmetic micro-operations

•Subtraction
In subtraction micro-operation, the contents of register R2 are
subtracted from contents of the register R1, and then the result
is transferred into R3.
Types of micro operations
2. Arithmetic micro-operations

•Increment
In Increment micro-operation, the value inside the R1 register
is increased by 1.
Types of micro operations
2. Arithmetic micro-operations

•Decrement
In Decrement micro-operation, the value inside the R1
register is decreased by 1.
Types of micro operations
2. Arithmetic micro-operations

•1’s Complement
•In this micro-operation, the complement of the value inside
the register R1 is taken.
Types of micro operations
2. Arithmetic micro-operations

•1’s Complement
•In one's complement representation, a negative number is denoted by
inverting all the bits (changing '0' to '1' and '1' to '0') in the binary
representation of the corresponding positive number. Additionally, the
leftmost bit (the most significant bit) indicates the sign of the number.

•However, a negative number is denoted in 1s complement


representation.
Types of micro operations
2. Arithmetic micro-operations

•2’s Complement
•In this micro-operation, the complement of the value inside
the register R2 is taken and then 1 is added to the value and
then the final result is transferred into the register R2. This
process is also called Negation. It is equivalent to -R2.
Types of micro operations
2. Arithmetic micro-operations

•2’s Complement
•The primary advantage of using two's complement over one's
complement is that two's complement eliminates the problem of
having two representations for zero (known as "two zero
representations"). In one's complement representation, there are
two ways to represent zero: all bits as '0' and all bits as '1'. This
redundancy can lead to inconsistencies and complexities in
arithmetic and logical operations.
Types of micro operations
2. Arithmetic micro-operations
Q&A
TEST YOUR MIND
TEST YOUR MIND
Q1. Which type of micro-operation involves adding 1 to the content of a
register?
a) Increment
b) Decrement
c) Transfer
d) Clear
Q2. The complement operation in micro-operations involves:
a) Reversing the bits in a register
b) Setting a register to zero
c) Adding two registers
d) Subtracting one register from another
TEST YOUR MIND
Q3. The arithmetic micro-operation that involves taking away one binary
number from another is called:
a) Addition
b) Multiplication
c) Subtraction
d) Division
Q4. Which type of micro-operation involves transferring data between
registers or between a register and memory?
a) Transfer micro-operation
b) Arithmetic micro-operation
c) Logic micro-operation
d) Shift micro-operation
TEST YOUR MIND
Q5. What is the primary advantage of using two's complement over one's
complement?
a) Two's complement eliminates the need for subtraction operations
b) Two's complement allows for faster addition and subtraction
c) Two's complement eliminates the problem of two zero representations
d) Two's complement requires fewer bits to represent negative numbers
TEST YOUR MIND
Q1. Explain the type of micro-operation involves transferring data
between registers or between a register and memory.

Q2. Consider an 8-bit 1’s complement representation to be decimal


number ‘5’ or binary: 00000101 (positive). Create 1s complement and
use micro-operation symbols to represent the logic flow.

END

You might also like