First bit manipulation problem sorted