shiftright
Shiftright is a bitwise operation that moves each bit in the binary representation of a value to the right by a specified number of positions. The bits shifted out on the right are discarded, and the bits on the left are filled with zeros in logical shifts, or with the sign bit in arithmetic shifts. In many programming languages two related operators exist: a logical shift right and an arithmetic shift right; the symbols and exact rules vary.
For example, in Java, the operator >> performs an arithmetic shift (sign-extended for signed values), while >>> performs
Common examples: 0b11010100 >> 3 equals 0b00011010 (decimal 212 >> 3 = 26). For unsigned numbers the result is
Uses: shiftright is an efficient way to divide by powers of two, perform bit masking and bit-flag
Shiftright contrasts with left shift, which moves bits toward higher-order positions. Some languages also offer an