Question

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

Was it helpful?

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)))

OTHER TIPS

The key substitution you're looking for is A OR B => !(!A AND !B). Using this you can expand the expression.

a and (b or c)

is the same as

a and not (not b and not c)

You can test it here


And for the more complex one:

d and e and (f or h or r)

is the same as

d and e and not(not f and not h and not r)

which is tested here

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top