A
B
out
0
0
1
0
0
1
1
1
A′B′
A
B′
AB
A′
B
C′D′
C
D′
CD
C′
D
0
1
0
0
AB′
Input variables
All 0s
All 1s
Compute
Product of Sums