I understand the whole, it shifts the bits over
0000 0000 0000 0000 0000 0000 0000 0111 << 1
0000 0000 0000 0000 0000 0000 0000 1110
But why would you want to use these left and right shift operators instead of just typing out the number, where does using these operators actually have a benefit.
I see a lot of answers on Stackoverflow and what the operator accomplishes, but nobody ever says WHY they would use it over just typing out 12345
so like I said, why use them and what is their benefit over just typing the number out you're trying to get?
I came across this code while browsing a package on github:
// ClientVersion is the protocol version that Client implements.
const ClientVersion = 1<<16 | 3<<8 | 0
Which the number comes out to be: 66304
So if this is a constant why not just type const ClientVersion = 66304
why use the operators.