3/4/2016 10:06 AM | |
Posts: 43 Rating:
|
Thanks you, could you also tell me what the >> exactly means? |
3/4/2016 11:02 AM | |
Joined: 2/21/2014 Last visit: 8/13/2024 Posts: 652 Rating:
|
Hi, >> is the bitwise Right shift operator and << is the bitwise left shit operator. 1. >> will shift the bit represented value to one bit right. e.g. 12 is represented as 1100. right shift by 1 (12>>1) = 0110 i.e. 6. now one more shift 6>>1 = 0011 i.e. 3 2. << will shift the bit represented value to one bit left. 3 is represented as 0011. left shift by 1 (6<<1) = 0110 i.e. 6. now one more shift 6(0110)<<1 = 1100 i.e. 12 more details: https://msdn.microsoft.com/en-us/library/336xbhcz.aspx http://www.c4learn.com/c-programming/c-bitwise-right-shift/ Regards, HarrY |
You can always use "Rate" and "To Thank" button to appreciate my efforts in helping you :) |
|
This contribution was helpful to
3 thankful Users |
3/4/2016 3:16 PM | |
Posts: 43 Rating:
|
Thanks, i didnt knew what bitwise operators are, but now I know. Thanks for explaining!
|
This contribution was helpful to
1 thankful Users |
Follow us on