Task

Test whether an integer is even or odd.

There is more than one way to solve this task:

 Use the even and odd predicates, if the language provides them.
 Check the least significant digit. With binary integers, i bitwise-and 1 equals 0 iff i is even, or equals 1 iff i is odd.
 Divide i by 2. The remainder equals 0 iff i is even. The remainder equals +1 or -1 iff i is odd.
 Use modular congruences:
 i ≡ 0 (mod 2) iff i is even.
 i ≡ 1 (mod 2) iff i is odd.


11110000000000100000000000000000   0. -15 to c
00000000000000110000000000000000   1. Test
11110000000001100000000000000000   2. c to 15
11110000000000100000000000000000   3. -15 to c
00001000000001100000000000000000   4. c to 16
00001000000000100000000000000000   5. -16 to c
01110000000000010000000000000000   6. Sub. 14
11110000000001100000000000000000   7. c to 15
10110000000000010000000000000000   8. Sub. 13
00000000000000110000000000000000   9. Test
01110000000000000000000000000000  10. 14 to CI
11110000000000100000000000000000  11. -15 to c
00000000000001110000000000000000  12. Stop
10000000000000000000000000000000  13. 1
01000000000000000000000000000000  14. 2