RECURSIVE BOOLEAN EXPRESSION EXAMPLE
Verify that x + (yz)' is a boolean expression, where the variables x, y, and z are boolean variables.
SOLUTION:
Since y and z are boolean variables, they are boolean expressions by
the basis clause. Consequently, yz and hence (yz)' are boolean expressions
by the recursive clause. Since x is a boolean variable, x is also a boolean expression;
therefore, by the recursive clause, x + (yz)' is a boolean expression.
The following example shows how to evaluate boolean expressions for
given values of boolean variables.
Evaluate the boolean expression x+ (yz)' for the triplets (0, 1, 0) and (0, 1, 1).
SOLUTION:
When x = 0, y = 1, and z = 0:
x + (yz)' = 0 + (1 . 0)' = 0 + 0' = 0 + 1 = 1
When x = 0, y = 1 = z:
x + (yz)' = 0 + (1 9 1)' = 0 + 1' = 0 + 0 = 0
EQUALITY OF BOOLEAN EXPRESSION EXAMPLE
EXAMPLE
![Picture](/uploads/9/3/7/5/9375932/7501125.jpg)
Find a boolean expression that defines the boolean function
f in Table 12.6.
SOLUTION:
To find a boolean expression E that yields the same values as the function f, look at each row that corresponds to the functional value 1. From each suchrow construct a boolean subexpression that has the value 1, and has the value 0 for any other combination ofx andy. The desired boolean expressionis obtained by taking the sum of all such subexpressions.
■ When x = 0 and y - 1, the value of the function is 1 (see row 2); so thevalue of the expression must be 1 when x = 0 and y - 1, that is, whenx' - 1 = y. One such expression is E1 = x'y. When x - 0 -- y, or x - 1and y = 0, or x = 1 = y, its value is 0.
■ When x = 1 and y = 0, the value of the function is again 1 (see row 3).Therefore, the value of the expression must be I when x = I and y = 0,that is, when x = 1 = y'. Again, one such function is E2 = xy'. Whenx = 0 =y, orx = 0 andy = 1, orx = 1 =y, its value is 0.
The desired boolean expression E is the sum of subexpressions E1 andE2: E = E1 + E2 = x'y + xy'. Thus, f(x,y) = x'y + xy'.Let us now verify this. The subexpression E1 - x'y has the value 1 whenx = 0 and y = 1; otherwise, it is 0. The subexpression E2 = xy' has thevalue 1 when x = 1 and y = 0; otherwise, it is 0. Therefore, the expressionE = E1 + E2 has the value 1 either when x = 0 and y = 1, or when x - 1and y = 0. This is precisely when the function has the value 1. E = x'y + xy'does indeed work.
Notice that the boolean expression x'y + xy' is the sum of two booleansubexpressions x'y and xy', and each subexpression is of the form st', withs and t boolean variables.