Skip to content

C# Feature - Unsigned right shift

The unsigned right shift operator >>> shifts bits right and fills the left side with zeros, even for signed operands.

C# 11.0 (2022)

int shifted = (int)((uint)value >> 2);
int shifted = value >>> 2;
  • Use >>> when bit-level behavior matters more than arithmetic sign preservation.
  • Prefer ordinary >> for arithmetic right shifts.