Have you ever had to use bit shifting in real programming projects? Most (if not all) high level languages have shift operators in them, but when would you actually need to
Yes, still it's needed.
Here in my job for example we develop softwares for comunication with PLC through the serial port COMx. It's necessary to handle bits within a byte, we use shift left / right, and logic operators OR,XOR,AND in day by day.
For example, let's suppose that we need turn on the bit 3 (right to left) of a byte:
It's much more efficient to do:
Byte B;
B := B XOR 4;
Instead of:
Byte B = 0;
String s; // 0 based index
s = ConvertToBinary (B);
s[5] = "1";
B := ConvertToDecimal (s);
Regards.