Arduino sketch from truth table

Also, each 'if' or 'if else' requires a boolean expression, so that doesn't remove the need.