Or, you can tell if a number is odd:
$x = 324152
....
$y = $x&1
$y = $x MOD 2

Or if it is even:
$y = NOT ($x&1)
$y = NOT ($x MOD 2)
$y = $x + 1 & 1

Brian