Search code examples
booleanlogicboolean-logicboolean-expressionboolean-operations

Convert function with only AND Boolean operations


I have some function like

(A and ( B or c)) or (D and E and (F or H or R or P )))

and I want to convert that function to function with only and operations (of course if possible) I find that with DeMorgan's Laws can be done some kind of transformations but I didn't manage to conver this function any ideas ?

I know that function

!(A or B) is equal to function !A and !B

but I could not find the equal function to the one above


Solution

  • The function you mentioned:

    !(A or B) = !A and !B
    

    is the same as:

    A or B = !(!A and !B)
    

    So let's start by splitting your problem into two parts of ABC and DEFHRP.

    (A and (B or C)) = (A and !(!B and !C))
    (D and E and (F or H or R or P)) = (D and E and !(!F and !H and !R and !P))
    

    Since these two parts are joined by an 'or', we can apply the equivalence again to get:

    !(!(A and !(!B and !C)) and !(D and E and !(!F and !H and !R and !P)))