Is it possible to write a boolean expression with algebraic sums and products?

92 Views Asked by At

Hello i want your opinion on this doubt: given a boolean expression (for example $A \lor B$) is it possible to write an equivalent algebraic expression that can involves sums and products (not AND,OR)?

I would like to know your opinions about this example:

$A \lor B = (A\land\lnot B) \lor (\lnot A\land B) \lor (A\land B)$ (disjunctive form)

If we restrict $A$ and $B$ to be $0$ or $1$, the above expression is equivalent to: $$\begin{align}\equiv~ &A\cdot(1-B)+(1-A)\cdot B + A\cdot B \\[1ex]=~& A - A\cdot B + B - A\cdot B + A\cdot B \\[1ex] =~& A + B - A\cdot B\end{align}$$ It's easy to see that the boolean expression "$A \lor B$", is equivalent to the algebraic expression $(A+B-A\cdot B)$ when $A,B$ can be $\{0,1\}$.

Is there something wrong in what i wrote?

Another example, for XOR:

$$\begin{align} A \oplus B ~=~& (A\land\lnot B) \lor (\lnot A\land B) \\[1.5ex]\equiv~& A\cdot (1-B) + (1-A)\cdot B \\[1ex]=~& A - A\cdot B + B - A\cdot B \\[1ex]~=~& A + B - 2\cdot A\cdot B\end{align}$$

If it is correct, are there some references where i can find these kind of results?

Thank you very much

Gianni