+ 1
Can anyone explain the usage(not the definition) of binary shift operators?? How and where do you use them in a code??
usage of binary shift operators
1 Answer
+ 6
They are used for bit level manipulation. For example you could shift a value to count how many bits are set in a register. See an example here: https://code.sololearn.com/c96KnEcilBQ2/?ref=app. In embedded programming bit shifting is also used for creating bit masks to read/write values to registers.