Algorithms for Performing Multiplication and Division with "Logical" Operands