Convert 00010000 to 11110000......how?



Hi,

This what I'm basically supposed to do. If i have a byte which looks
like this 00010000, i need to convert it to 11110000. That would mean
if any of the bit fields is 1....all the bit fields to the left of it
should be made 1.

I tried using left shift n right shift operators but that didnt
help...any other suggesstions pls?

Thanks,
Doubty

.