0 or 1
N mod 2 is 0 if N is even.
N mod 2 is 1 if N is odd.
For example:
23 div 2 = 11 23 mod 2 = 1
div means integer division. mod means the remainder after integer division (also called modulo division).
Because 23 is odd, you know that its binary representation ends with a 1.
The mod
operation picks out this fact.
What is 24 mod 2?
Does the binary representation of 24 end with a 1 or with a zero?