A Boolean Expression (BEXP) is built from the constants 0 (= false) and 1 (= true), Boolean variables (a, b, c, etc.) using Boolean operators: conjunction (&&), disjunction (||), and complement (!).
Normally complement takes precedence of conjunction and conjunction takes precedence over disjunction. Parenthesis can be introduced to change this ordr.
Here are some examples:
(1) a && b || c && d || e && f
(2) (a || b) && (c || d) && (e || f)
(3) !a || b && c || (0 && !1)
We can evaluate a BEXP involving the variables a, b, c, and d using a 16 row truth table of the form:
a b c d BEXP
0 0 0 0
0 0 0 1
0 0 1 0
0 0 1 1
0 1 0 0
etc.
Here are the truth tables for the basic operations:
x y x && y
0 0 0
0 1 0
1 0 0
1 1 1
x y x || y
0 0 0
0 1 1
1 0 1
1 1 1
x !x
0 1
1 0
A Boolean expression is a tautology if its value is 1 for all values of its variables and a contradiction if its value is 0 for all values of its variables.
Draw truth tables for the sample Boolean expressions (1), (2), and (3) given above.
Boolean expressions can be simplified algebraically using Boolean laws. This is similar to the way that algebraic expressions can be simplified using the laws of algebra.
!!x = x
!x || x = 1
!(x && y) = !x
|| !y
!(x || y) = !x && !y
x && (y || z)
= (x && y) || (x && z)
x || (y && z) = (x || y) && (x || z)
x && y = y
&& x
x || y = y || x
x && (y && z) = (x && y) && (x && z)
x || (y || z) = (x || y) || (x || z)
Boolean expressions can be implemented as combinational circuits.