# Using Associativity to Reduce Number of OR Gates

EDIT: I think I'm probably more confused than I realise. My question could also be phrased as "how was the given diagram constructed from the expression, particularly with reference to the OR gates?"

Say I have the logic expression X = A AND ((B AND C) OR (B AND D) OR (C AND D))

It looks like I need 3 OR gates to handle the possible conditions for the second input to the AND gate.

However, if I add brackets to the expression, like so:

X = A AND (((B AND C) OR (B AND D)) OR (C AND D))

it looks like I can reduce the number of OR gates to just 2.

Is this correct? Is this a standard method of simplifying expressions using the associative property of Boolean algebra?

• I see in both expressions only 2 OR gates Jan 6 '20 at 16:43
• yeah, it's unclear how you came to three OR gates. Care to elaborate? Jan 6 '20 at 17:15