# Math Help - logic circuit formula

1. ## logic circuit formula

Given this circuit:

I need to find a logical formula.

I came up with this:

$(\neg (\neg p \wedge q)) \wedge (\neg (\neg p \wedge r) \vee s)))$

Is this correct? Can you simplify it to this?

$(p \wedge \neg q) \wedge ((p \wedge \neg r) \vee s))$

2. We have the following:

A1 = p' /\ q
A2 = p' /\ r
N3 = A1' = p v q'
N2 = A2' = p v r'
O1 = N2 v s = p v r' v s

A3 = N3 /\ O1 = (p v q') /\ (p v r' v s).

3. Ok, so coming out of N3....if ~(~p $\wedge$ q) = p $\vee$ ~q ??

A1 = ~p $\wedge$ q
A2 = ~p $\wedge$ r
N3 = ~(~p $\wedge$ q) = p $\vee$ ~q
N2 = ~(~p $\wedge$ r) = p $\vee$ ~r
O1 = p $\vee$ ~r $\vee$ s
A3 = p $\vee$ ~q $\wedge$ p $\vee$ ~r $\vee$ s

(p $\vee$ ~q) $\wedge$ (p $\vee$ ~r $\vee$ s)

4. Originally Posted by relyt
Ok, so coming out of N3....if ~(~p $\wedge$ q) = p $\vee$ ~q
Yes, you negate each proposition and reverse the junction - if it is AND it becomes OR and vice-versa.

For instance, let p = "Today is sunny" and q = "Today is raining".

Then, ~p/\q implies: "Today is NOT sunny AND Today is raining".

So, ~(~p/\q) means: NOT (Today is not sunny and today is raining), or, equivalently "Today is NOT-NOT sunny OR Today is NOT raining). That is, "Today is sunny OR NOT raining". It might be a cloudy weather...