What is the difference between the >> and >>> operators?

Q

What is the difference between the >> and >>> operators?

✍: Guest

A

The >> operator carries the sign bit when shifting right. The >>> zero-fills bits that have been shifted out.

2012-09-26, 1981👍, 0💬