BINARY BOOLEAN

functions

"[the problems aren't always easy]... get over it..."
K. Holladay, 18 November 1998

"I have often noticed that when people come to understand a mathematical proposition in some other way than that of the ordinary demonstration, they promptly say, 'Oh, I see. That's how it must be.' This is a sign that they understand from within their own system."
Georg Christoph Lichtenberg
Binary Boolean Functions: The Sixteen Binary Boolean Functions
1. Show the truth table for each of the 16 binary Boolean functions
2. Identify the pairs of functions that are complementary.
Binary Boolean Functions: Properties
1. How many are commutative?
2. How many are associative?
3. How many are distributive?
The solutions
Binary Boolean Functions:
Binary Boolean Functions: The Sixteen Binary Boolean Functions

1. Show the truth table for each of the 16 binary Boolean functions
Two key ideas here: the functions are binary, so we are only looking at two variables: p and q; secondly, they're binary- so count in binary (0 ª false, 1 ª true) beginning with 0000 and ending with 1111.
 
    0 1 2 3 4 5 6 7
p q Const F AND   P   q XOR OR
T T 0 1 0 1 0 1 0 1
T F 0 0 1 1 0 0 1 1
F T 0 0 0 0 1 1 1 1
F F 0 0 0 0 0 0 0 0
 
    8 9 10 11 12 13 14 15
p q NOR IFF q'   p' IMPLIES NAND Const T
T T 0 1 0 1 0 1 0 1
T F 0 0 1 1 0 0 1 1
F T 0 0 0 0 1 1 1 1

F

F

1

1

1

1

1

1

1

1

 

Notice that all of them don't have common names.

2. Identify the pairs of functions that are complementary.

1) constant true and constant false,

2) NAND and AND,

3) OR and NOR,

4) XOR and IFF,

5) p and p',

6) q and q',

7) #2 and IMPLIES,

8) #11 and #4.

Binary Boolean Functions: Properties

The simplest, but most time-consuming strategy is to use truth tables (with the minimum number of variables) to determine the validity of each property for each function.

A smarter strategy would be to look at the table of functions and consider whether p true, q false has the same value as p false, q true. If the two values are the same, then the function is commutative.

1. How many are commutative? Eight (0, 1, 6, 7, 8, 9, 14, 15)

Only two variables are needed for each proof.

 

   

0

0

0

1

1

1

p q f0(p,q) f0(q,p) f0(p,q) » f0(q,p) f1(p,q) f1(q,p) f1(p,q) » f1(q,p)

T

T

0

0

T

1

1

T

T

F

0

0

T

0

0

T

F

T

0

0

T

0

0

T

F

F

0

0

T

0

0

T

 

   

2

2

2

3

3

3

p q f2(p,q) f2(q,p) f2(p,q) » f2(q,p) f3(p,q) f3(q,p) f3(p,q) » f3(q,p)

T

T

0

0

T

1

1

T

T

F

1

0

F

1

0

F

F

T

0

1

F

0

1

F

F

F

0

0

T

0

0

T

 

   

4

4

4

5

5

5

p q f4(p,q) f4(q,p) f4(p,q) » f4(q,p) f5(p,q) f5(q,p) f5(p,q) » f5(q,p)

T

T

0

0

T

1

1

T

T

F

0

1

F

0

1

F

F

T

1

0

F

1

0

F

F

F

0

0

T

0

0

T

 

   

6

6

6

7

7

7

p q f6(p,q) f6(q,p) f6(p,q) » f6(q,p) f7(p,q) f7(q,p) f7(p,q) » f7(q,p)

T

T

0

0

T

1

1

T

T

F

1

1

T

1

1

T

F

T

1

1

T

1

1

T

F

F

0

0

T

0

0

T

 

   

8

8

8

9

9

9

p

q

f8(p,q) f8(q,p) f8(p,q) » f8(q,p) f9(p,q) f9(q,p) f9(p,q) » f9(q,p)

T

T

0

0

T

1

1

T

T

F

0

0

T

0

0

T

F

T

0

0

T

0

0

T

F

F

1

1

T

1

1

T

 

   

10

10

10

11

11

11

p

q

f10(p,q) f10(q,p) f10(p,q) » f10(q,p) f11(p,q) f11(q,p) f11(p,q) » f11(q,p)

T

T

0

0

T

1

1

T

T

F

1

0

F

1

0

F

F

T

0

1

F

0

1

F

F

F

1

1

T

1

1

T

 

   

12

12

12

13

13

13

p

q

f12(p,q) f12(q,p) f12(p,q) » f12(q,p) f13(p,q) f13(q,p) f13(p,q) » f13(q,p)

T

T

0

0

T

1

1

T

T

F

0

1

F

0

1

F

F

T

1

0

F

1

0

F

F

F

1

1

T

1

1

T

 

   

14

14

14

15

15

15

p

q

f14(p,q) f14(q,p) f14(p,q) | f14(q,p) f15(p,q) f15(q,p) f15(p,q) » f15(q,p)

T

T

0

0

T

1

1

T

T

F

1

1

T

1

1

T

F

T

1

1

T

1

1

T

F

F

1

1

T

1

1

T

 

2 a. How many are associative? Eight (0, 1, 3, 5, 6, 7, 9, 15)

b. How many are distributive? (0, 1, 3, 5, 7, 12, 15)

You'll need a minimum of three variables for these: only the concluding columns for associative and distributive properties of f1 and f2 are shown.

 

p

q

r

f1(p, f1(q,r)) » f1(f1(p,q), r)

(is f1 associative?)

f1(p, f1(q,r)) » f1(f1(p,q), f1(p,r))

(is f1 distributive?)

T

T

T

T

T

T

T

F

T

T

T

F

T

T

T

T

F

F

T

T

F

T

T

T

T

F

T

F

T

T

F

F

T

T

T

F

F

F

T

T

Conclusion: f1 is both associative and distributive

 

p

q

r

f2(p, f2(q,r)) » f2(f2(p,q), r) f2(p, f2(q,r)) » f2(f2(p,q), f1(p,r))

T

T

T

T

T

T

T

F

F

T

T

F

T

T

F

T

F

F

F

F

F

T

T

T

T

F

T

F

T

T

F

F

T

T

T

F

F

F

T

T

Conclusion: f2 is neither associative nor distributive.