+ 2
I cannot understand about shift operator in c#
They make me confuse. Can someone help me?
3 Answers
+ 1
Here 'what is output of this code?'
Int x = 4
x = x >> 3
0
Can you show some code ? What is it what you want to know ?
0
Shift is a bitwise operation.
https://www.dotnetperls.com/shift
https://code.sololearn.com/c4Mfiy5rg3ua
int x = 4; (in binary is 0100)
x = x >>1;
Result is 2; (in binary is 0010)