Start with 1 bit, then shift it left 3 times. Next shift right 1 and add 8 to fill on the return journey. Finally shift right 1 until all bits are empty.
The upper 4 bits replicate the lower by taking the value and shifting up 4 bits, and then adding the value again. This means that both rows mirror each other on the board.
Link to this comment:
All Comments (0)