Logical Operator Replacement: b1 XOR b2 and deMorgan's Laws

  • Thread starter Thread starter courtrigrad
  • Start date Start date
  • Tags Tags
    Operator
AI Thread Summary
The discussion centers on the logical operator replacement for b1 XOR b2. Participants confirm that b1 XOR b2 can be expressed as b1 != b2, which aligns with the truth table for the XOR operation. There is some clarification regarding the use of != in computer science versus mathematical logic, with a suggestion that it could also be represented as ~(b1=b2). The equivalence of b1 XOR b2 to "((NOT b1) AND (b2)) OR ((b1) AND (NOT b2))" is also noted. Overall, the participants agree on the validity of the replacement in the context of computer science.
courtrigrad
Messages
1,236
Reaction score
2
Hello all

What can you replace b1 XOR b2 ? I tried using deMorgan's Laws. Is it b1 != b2 ?

thanks
 
Physics news on Phys.org
That certainly gives the same truth table, but I'm not familiar with != as a logical operator (I know it means "not equal to" in Comp Sci, but not in mathematical logic). I would think it would be:

~(b1=b2)

But maybe your book uses different notation. Anyway, you're right.
 
b1 XOR b2 is True in one of the two is true and the other false. It is False if they are both true or both false. It is equivalent to "((NOT b1) AND (b2)) OR ((b1) AND (NOT b2))" which is exactly the same as 'b1 NOT EQUAL b2".
 
this is for comp sci. not logic.

thanks
 
Well, there you go! :smile:
 
Thread 'Variable mass system : water sprayed into a moving container'
Starting with the mass considerations #m(t)# is mass of water #M_{c}# mass of container and #M(t)# mass of total system $$M(t) = M_{C} + m(t)$$ $$\Rightarrow \frac{dM(t)}{dt} = \frac{dm(t)}{dt}$$ $$P_i = Mv + u \, dm$$ $$P_f = (M + dm)(v + dv)$$ $$\Delta P = M \, dv + (v - u) \, dm$$ $$F = \frac{dP}{dt} = M \frac{dv}{dt} + (v - u) \frac{dm}{dt}$$ $$F = u \frac{dm}{dt} = \rho A u^2$$ from conservation of momentum , the cannon recoils with the same force which it applies. $$\quad \frac{dm}{dt}...
Back
Top