15-110 Spring 2011
Class
Notes: Boolean Logic
|
|
|
|
|
|
|
|
Operator | Meaning | Rewritten using and/or/not |
A xor B | Exactly one of A or B is true | (A and not B) or (B and not A) |
A -> B | A implies B | not A or B |
A = B | A is equivalent to B | (A and B) or (not A and not B) |
A | B | A and B | not A and not B | (A and B) or (not A and not B) |
0 | 0 | 0 | 1 | 1 |
0 | 1 | 0 | 0 | 0 |
1 | 0 | 0 | 0 | 0 |
1 | 1 | 1 | 0 | 1 |
A | B | C1: A and B |
C2: not A and not B |
C3: C1 or C2 |
0 | 0 | 0 | 1 | 1 |
0 | 1 | 0 | 0 | 0 |
1 | 0 | 0 | 0 | 0 |
1 | 1 | 1 | 0 | 1 |
A | B | C | B or not C | A and (B or not C) |
0 | 0 | 0 | 1 | 0 |
0 | 0 | 1 | 0 | 0 |
0 | 1 | 0 | 1 | 0 |
0 | 1 | 1 | 1 | 0 |
1 | 0 | 0 | 1 | 1 |
1 | 0 | 1 | 0 | 0 |
1 | 1 | 0 | 1 | 1 |
1 | 1 | 1 | 1 | 1 |
A | B | A or B | C1: not (A or B) |
not A | not B | C2: not A and not B |
C1 = C2 |
0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 |
0 | 1 | 1 | 0 | 1 | 0 | 0 | 1 |
1 | 0 | 1 | 0 | 0 | 1 | 0 | 1 |
1 | 1 | 1 | 0 | 0 | 0 | 0 | 1 |
A | B | C | B or not C | C1: A and (B or not C) |
(not A or B) | C2: not C and (not A or B) |
C1 and C2 |
0 | 0 | 0 | 1 | 0 | 1 | 1 | 0 |
0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 |
0 | 1 | 0 | 1 | 0 | 1 | 1 | 0 |
0 | 1 | 1 | 1 | 0 | 1 | 0 | 0 |
1 | 0 | 0 | 1 | 1 | 0 | 0 | 0 |
1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 |
1 | 1 | 0 | 1 | 1 | 1 | 1 | 1 |
1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 |