LANGUAGE
Signed and logical right shift
Signed int >> extends the sign; >>> inserts zero bits. Available in the teaching baseline.
Formal Syntax & Structure
csharp syntaxcsharp
value >> count; value >>> count;Working Example
Example Snippetcsharp
int n = -8; int a = n >> 1; int b = n >>> 1;