Implement integer math functions

In particular:

  • $logand, $logior, $logxor and $logsub
  • $rsh and $lsh.
Edited by Robin Templeton