What is a Logical Right Shift?
What is a Logical Right Shift?
When shifting right with a Logical Right Shift, the least-significant bit is lost and a 0 is inserted on the other end.
// -5 with a logical right shift = 5
1011 >> 1 -> 0101 = 5
// -5 with 3 logical right shifts = 1
1011 >> 3 -> 0001 = 1