added more solutions to illustrate bit manipulation.