0% found this document useful (0 votes)
389 views14 pages

Shift Micro-Operations in Architecture

Micro operations

Uploaded by

tagesseabate887
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)
389 views14 pages

Shift Micro-Operations in Architecture

Micro operations

Uploaded by

tagesseabate887
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

WACHEM0 UNIVERSITY

(DURAME CAMPUS)
GROUP ASSIGNMENT
Course Title:Cmputer Organization
and architecture
Depa iment:Computer
Student name ………………………………..idno
Science
[Link] Deto………………………………1501230
[Link] selase……………………………1501314
[Link] Abate………………………….1501300
Shift micro-operation in 
computer architecture
shift micro-operation are those micro-operations
that are used for the serial transfer of information.
These are also used in conjunction with arithmetic micro-
operation, logical micro-operation, and circular micro-
operations.
There are three types of shift micro-operation:
Logical, arithmetic and circular shifts micro-operations.
1. Logical shift:- A logical shift moves bits to the left or
right, lling the vacated bit positon with zeros.
Used for unsigned bina numbers where the sign 
of the numbers is not a concern.
A. Left logical shift(<<):- Each bit is shifted to the left,
and zeros are lled in from the right.
Each bit is shifted towards left, MSB is discarded
and LSB becomes 0.
Example, Shifting 10101 left by one posetion 
results in 01010. added to left

B. Right logical shift(>>):- each bit is shifted to right, and
zeros are lled in from the left.
-Each bit shfted towards right ,LSB is discarded and MSB becomes 0
Example , shifting 10101 right by one position results in 010101
inse ed bit discarded
bit
2. Arithmetic shift:-An arithmetic shift also moves bits to the right
or left but prese es the sign of signed numbers.
Generally, arithmetic micro-operation moves the signed bina
number either to the left or to the right.
There are two types of arithmetic shifts. Those are:
Arithmetic left shift and Arithmetic right shift.
A. Right Arithmetic shift:- Bits are shifted to the right , but the leftmost bit
(the sign bit) is replicated to prese es the sign of the number.
An Arithmetic shift right divides the number by two.
Example, shifting 0100 (which represent 4 )
right by one position results in 0010 (which represents 2).
0 1 0 0 length of input is 4
inse ed 0 0 0 1 0 Length of output is 2
B. Left Arithmetic shift: - an arithmetic shift left multiplies a signed
bina number by 2.
To nd the value multiplied by 2 you have to change
shifted bit into two’s complements.
The empty least signi cant bit (LSB) is lled with zero and the MSB
is rejected. Functions is the same the left logical shift.
Unlikely to left logical shift, the input bit is signed bit.
Example, shifting 0010 (which represent 2)
shifting left by one position result in 0100(which represents 4)
1 0 1 0 length of input is 2
length
0 of output is 4
0 1 0 0
3. Circular shift(rotate) :- A circular shift moves bits around in a circular
manner.
When bits are shifted out on one end, they re-enter from the other end.
There are two types of circular shift right circular shift and left circular shift
A. Right circular shift:- Bits are shifted to right , and the bits that fall o
on the right end are re-enter around the left end .
Example, a right circular shift on 10101 the resulting bits after right
circular shift is 11010 . Shifting by one position.
B. Left circular shift :- Bits are shifted to the left , and the bits that fall
o on the on the left end are re-entered around to the left end.
Example, a left circular shift on 10101 is after left circular shift is 01011 shifting by
one position.
Applications of shift micro-operation
Applications of logical shift:
• Used in bit manipulation tasks such as clearing speci c bits.
• Commonly used in data serialization and deserialization processes.
•of two.
Useful in algorithms that require multiplication or division by powers
Applications of arithmetic shift
• Used for signed integer arithmetic operations.
• Useful in algorithms that require multiplication or division
by powers of two while maintaining the sign.
Applications of circular shift
• Often used in c ptographic algorithms and hashing functions.
• Useful in ce ain types of data structures like circular bu ers.
• Employed in rotating registers for speci c computational tasks.
Advantages and disadvantages of shift micro
operation
Advantages of logical shift:
• Prese es the sign of signed integers during right shifts.
• Suitable for arithmetic operations on signed numbers.
Disadvantages of logical shift:
• Can lead to ove low errors if not managed properly during left shifts.
• More complex than logical shifts due to sign prese ation.
Advantages of arithmetic shift
• Maintains all original bits without loss; eve bit remains in the register.
• Can be useful for ce ain algorithms requiring periodic data access patterns.
Disadvantages of arithmetic shift:
• Less intuitive than logical and arithmetic shifts.
• Implementation can be more complex depending on the architecture.
Cont........
Advantages of circular shift:
• Maintains all original bits without loss; eve bit remains in the register.
• Can be useful for ce ain algorithms requiring periodic data access patterns.
Disadvantages of circular shift:
• Less intuitive than logical and arithmetic shifts.
• Implementation can be more complex depending on the architecture.
Summa
Shift micro-operations are essential for manipulating bina data in digital system.
They can be classi ed into logical, arithmetic and circular shift, each se ing di erent
purposes depending on whether they maintain the sign of the number or wrap around bits.
Understanding these operations is crucial for designing e cient algorithms and hardware
in computer systems.
Referene
Computer Architecture:Quantitative Approach by John L.
Online Resourses:Google
A i tial intelligence
Tutorial:Bhanu Priya

You might also like