A Boolean encoding of arithmetic operations