Home | Projects | Notes > Computer Architecture & Organization > Boolean Algebra
Boolean algebra is an algebra with variables, the constants 0
and 1
, and the logical operations AND
, OR
, and inversion.
Boolean algebra can be used to simplify a logical expression, and convert it into a different form with fewer terms.
Simpler expression means less logic, fewer parts, faster testing and greater reliability.
Boolean algebra follows the laws of conventional algebra:
Closure
Results of operations performed on the set remain in the set.
Associative
Changing the order of the operation produces the same results.
e.g., `x + (y + z) = (x + y) + z
Commutative
Changing the order of the variable produces the same results.
e.g., xy = yx
Distributive
e.g., x(y + z) = xy + xz
Identity
Operations with the indentity do not change the value.
Inverse (Complement)
Operation with a variable and it's inverse produces the identity element.
Except that in Boolean algebra we consider:
The set S = {0, 1}
.
The operations +(OR)
and ·(AND)
The +
identity element is 0
, and the ·
identity element is 1
.
+
is the logical OR
, · (dot)
is the logical AND
.
xxxxxxxxxx
911. X + 0 = X (ORing a variable with 0 has no effect on the variable)
22. X + 1 = 1 (ORing a variable with 1 gives 1)
33. X + X = X (ORing a variable with itself has no effect on the variable)
44. X + X` = 1 (ORing a variable and its complement is 1)
55. X·1 = X (ANDing a variable with 1 has no effect on the variable)
66. X·0 = 0 (ANDing a variable with 1 gives 0)
77. X·X = X (ANDing a variable with itself has no effect on the variable)
88. X·X` = 0 (ANDing a variable with a complement gives 0)
99. X`` = X (The complement of a complement cancels out)
Boolean variables follow the normal commutative, associative, and distributive laws of conventional algebra.
xxxxxxxxxx
91X + Y + Z = Z + Y + X (commutative law)
2X·Y = Y·X (commutative law)
3X + (Y + Z) = (X + Y) + Z (associative law)
4X·(Y·Z) = (X·Y)·Z (associative law)
5X + Y·Z = (X + Y)·(X + Z) (distributive law)
6X·(Y + Z) = X·Y + X·Z (distributive law)
7(X + Y)' = X'·Y' (de Morgan's law)
8(X·Y)' = X' + Y' (de Morgan's law)
9X + X'·Y = X + Y