Computer - Archito - Lecture 3
Computer - Archito - Lecture 3
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.
•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.
END