0% found this document useful (0 votes)
15 views

KCS302-01 (Microoperations)

The document discusses types of microoperations including arithmetic, logic, and shift operations. It provides examples of common microoperations like addition, subtraction, bitwise AND, OR, and XOR. Arithmetic microoperations manipulate whole words, while logic microoperations operate at the bit level. Shift microoperations can shift all bits in a register left or right. Examples are given to demonstrate how different operations would transform the values in registers.

Uploaded by

dp06vns
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views

KCS302-01 (Microoperations)

The document discusses types of microoperations including arithmetic, logic, and shift operations. It provides examples of common microoperations like addition, subtraction, bitwise AND, OR, and XOR. Arithmetic microoperations manipulate whole words, while logic microoperations operate at the bit level. Shift microoperations can shift all bits in a register left or right. Examples are given to demonstrate how different operations would transform the values in registers.

Uploaded by

dp06vns
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 8

Computer Organization and

Architecture (BCS302)

• Types of Microoperations
Microoperations
· Types of Microoperations are-
· Arithmetic operations · Logic operations
(word – wise) (bitwise)
+ Addition  Logical OR
–  Logical
Subtraction * AND 
Multiplication / Logical Exclusive OR ¯
Division
Shift Description Logical NOT
Microoperations

R1  shl R1 Shift Left


R2  shr R2 Shift Right

NOTE- Other shifts are also possible (i.e. circular and arithmetic).
Microoperations: Examples
· Add the content of R1 to the content of R2 and place the
result in R1.
R1  R1 + R2

· Multiply the content of R1 by the content of R6 and place the


result in PC.
PC  R1 * R6

· Exclusive OR the content of R1 with the content of R2 and


place the result in R1.
R1  R1  R2
Microoperations: Examples (Contd.)

PC  R2
· Take the 1’s Complement of the contents of R2 and place it in
the PC.

(K1 + K2): R1  R1  R3

· On condition K1 OR K2, Logical bitwise OR the content of R1


with the content of R3 and place the result in R1.

· Note: “+” (as in K1 + K2) and  both mean “OR” operation.


Arithmetic Microoperations
Symbolic Designation Description
R0  R1 + R2 Addition
R0  R1 One’s Complement
R0  R1 + 1 Two’s Complement
R0  R2 + R1 + 1 R2 - R1 (using 2’s Comp)
R1  R1 + 1 Increment (count up)
R1  R1 – 1 Decrement (count down)
· Note that any register may be specified for source1, source2, or
destination.
· These simple microoperations operate on the whole word – except
for 1’s complement which is a bitwise operation.
Logic Microoperations

Symbolic Designation Description

R0  R1 Bitwise NOT

R0  R1  R2 Bitwise OR

R0  R1  R2 Bitwise AND

R0  R1  R2 Bitwise EX-OR
Logic Microoperations (Examples)

· Let R1 = 10101010 and R2 = 11110000


· Then after “Operation”, R0 becomes-

R0 Operation

01010101 R0  R1

11111010 R0  R1  R2

10100000 R0  R1  R2

01011010 R0  R1  R2
Shift Microoperations
Symbolic Description
Designation
R1  shl R1 Shift Left
R1  shr R1 Shift Right

· Let initially, R1 = 11001001


· Then after “Operation”,
R1 Operation
R1 becomes:
10010010 R1  shl R1
01100100 R1  shr R1

· Other shifts are also possible (i.e. circular, arithmetic).

You might also like