Represent boolean OR opperator in non-boolean math notation

52 Views Asked by At

I'm trying to represent the boolean opperation OR in a regular formula, I am familiar with the boolean algebra notation, I came up with this (A+B)/(A+B) this works for all binary values except if both A=0 and B=0
is there a simple alternative that also works if all inputs are 0

1

There are 1 best solutions below

1
On BEST ANSWER

Notice that for AND, we could use the formula: $$ A \land B \equiv A \times B $$

Likewise for NOT, we could use the formula: $$ \neg A \equiv 1 - A $$

By using double negation and applying DeMorgan's Law, we can combine these together to get: \begin{align*} A \lor B &= \neg(\neg(A \lor B)) \\ &\equiv \neg(\neg A \land \neg B) \\ &\equiv 1-(1 - A)\times(1-B)\\ &\equiv \boxed{A + B - (A \times B)}\\ \end{align*}