+ 18
shift operator in c# (<<) and (>>)
hello can someone please explain the shift operator? I don't get it.
6 odpowiedzi
+ 17
It moves the bits of a binary number in a certain direction.
So 1101 >> 2 becomes 0011 and 1101 << 2 becomes 0100
+ 7
<< is use when printing out something to the console
>> is use when you reading whatever the user enter
+ 4
new code about the shift operators just posted on my profile take a look to learn about the shift operators
+ 3
@jafca is correct, in c# it shifts the binary number to the right or to the left.
it's different from what @chris has explained which is about c++ language.
0
<< and >> are also called casceding of operators which is explained by chris..
- 1
Hello