Logical Shift Article Index for
Logical
Shopping
Logical
Website Links For
Logical
 

Information About

Logical Shift




A logical shift is often used when its operand is being treated as a Sequence of bits rather than as a number.


Example

If the bit sequence
0110 1111 1010 0011
were subjected to a logical shift of four bit positions to the left, the resulting bit sequence would be
1111 1010 0011 0000

Note that the farthest-left quartet of bits, 0110, was lost in the operation, and the rightmost 4 bit positions were filled in with zeros.

For a simpler explanation, the bit sequence 0111 1001 which is subjected to a logical left shift of two bit position would yield the bit sequence 1110 0100.