Expressing logic operations as modular arithmetic

76 Views Asked by At

I came across a logic question that was easiest resolved by using arithmetic modulo $2.$ Is there a way to express basic logic operations, e.g. AND, OR, etc. in terms of arithmetic operations in $\mathbb{F}_2$?

2

There are 2 best solutions below

2
On BEST ANSWER

Sure:

$x\land y=xy $

and $ x\lor y=x+y-xy.$

0
On

Use min for $\land$ and max for $\lor$. For $\lnot$ you can use (1 - x).