# logic circuit formula

• Mar 28th 2009, 09:05 PM
relyt
logic circuit formula
Given this circuit:

http://img9.imageshack.us/img9/7859/circa.jpg

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))$
• Mar 28th 2009, 10:30 PM
EmpSci
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).
• Mar 29th 2009, 08:16 AM
relyt
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)
• Mar 29th 2009, 05:54 PM
EmpSci
Quote:

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