Boo Lean Logic

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

Boolean Operators and Truth Tables 1.

NOT P 0 1 NOT P 1 0

2. AND P 0 0 1 1 Q 0 1 0 1 P AND Q 0 0 0 1

3. OR P 0 0 1 1 Q 0 1 0 1 P OR Q 0 1 1 1

4. XOR P 0 0 1 1 Q 0 1 0 1 P XOR Q 0 1 1 0

Examples 1. S = P AND NOT Q P 0 0 1 1 Q 0 1 0 1 NOT Q 1 0 1 0 P AND NOT Q 0 0 1 0

S is 1 when P = 1 and Q = 0.

2. S = NOT (P OR Q) P 0 0 1 1 Q 0 1 0 1 P OR Q 0 1 1 1 NOT (P OR Q) 1 0 0 0

S is 1 when P = 0 and Q = 0.

3. M = NOT (NOT P AND Q) P 0 0 1 1 Q 0 1 0 1 NOT P 1 1 0 0 NOT P AND Q 0 1 0 0 NOT (NOT P AND Q) 1 0 1 1

M is 1 when P = 0 and Q = 0, P =1 and Q = 0, P=1 and Q = 1.

4. N = P OR NOT (NOT Q) P 0 0 1 1 Q 0 1 0 1 NOT Q 1 0 1 0 NOT (NOT Q) 0 1 0 1 P OR NOT (NOT Q) 0 1 1 1

N is 1 when P = 0 and Q = 1, P = 1 and Q = 0, P = 1 and Q = 1.

5. X = (P XOR Q) AND NOT P P 0 0 1 1 Q 0 1 0 1 P XOR Q 0 1 1 0 NOT P 1 1 0 0 (P XOR Q) AND NOT P 0 1 0 0

X is 1 when P = 0 and Q = 1.

You might also like