Bitwise Shift Operators (<<,>>)

The bitwise shift operators are used to shift the bits either to the left or to the right. The shift operator are : Left Shift (<<) and right shift

(>>). The general form of bitwise shift operators is:
op << n for left shift
op >> n for right shift
Here op is an integer expression which is to be shifted by n bit positions to the left or right. The left shift operator causes all the bits in op to be

shifted left by n position. The n leftmost bits of the original bit pattern are lost, and the n rightmost bits are filled with 0s.

No comments:

Post a Comment