0
How does (int name) >> (number); works?
Few times when I was doin' a challenge there was a question that looked like this: int x = 12; x>>2; Console.Write(x); So there's a question, how does those ">>" works?
1 Antwort
+ 8
it's a binary operator works like this:
12 = 00001100
12 >> 2 = 00001100 >> 2 = 00000011 = 3
another example:
12 >> 1 = 00001100 >> 1 = 00000110 = 6
it shifts binary numbers to right.