23 mod 2 == 1 so the rightmost bit is 1.
Here is 23, completely digested into bits:
The bits come out right to left, so the representation is:
10111
(Review: ) When do you stop?