Skip to main content
Logo image

Exercises 19.6 Programming Exercises

1.

A Boolean or switching function on n variables is a map f:{O,I}nβ†’{0,I}. A Boolean polynomial is a special type of Boolean function: it is any type of Boolean expression formed from a finite combination of variables x1,…,xn together with O and I, using the operations ∨, ∧, and β€². The values of the functions are defined in Table 19.34. Write a program to evaluate Boolean polynomials.
Table 19.34. Boolean polynomials
x y xβ€² x∨y x∧y
0 0 1 0 0
0 1 1 1 0
1 0 0 1 0
1 1 0 1 1