bitwise shift operators, where does the bit go?

How are either of those examples any different in efficiency than the first example I gave?

They have two great advantages over your example.
(a) you can't access the overflow bit from C even if you use a left shift.
(b) they work.

In assembler you to a test under mask and then branch on a condition

If you are so desperate for speed you will have to use assembler, one way or another.

Pete