A logical right shift moves the bits of a number to the right by a given amount. Bits that move past the right edge are discarded, and zeros are inserted on the left. This is different from arithmetic shifting, which may preserve a sign bit.
A logical right shift by 1 position is usually the same as dividing an unsigned binary number by 2 and keeping only the integer part. This makes a good quick check for reasonableness.
If a binary number is shifted right by 1, every bit moves one place right, the last bit is removed, and a 0 is added at the front. Always verify that the total length is handled correctly and that no sign is preserved unless the exercise explicitly says so.
© 2023-2026 AI MATH COACH