# Boolean Algebra Rules You Need to Know NOW!

Manali Oak Apr 29, 2019
Boolean algebra, simply put, is the algebra of truth values, 1 and 0. Yes, there's a full-fledged 'algebra' on just these two numbers, that too, 1 and 0? Read on for a closer look at the Boolean algebra concepts and rules.
Boolean algebra rules are based on the Boolean logic that was proposed by George Boole in the 1840s. It is amazing in the sense that it is the algebra of just two values, 0 and 1 or 'true' and 'false'. Yet it forms the basis of many complex operations in Math, computers and digital electronics.
When we talk of mega and gigabytes of computer memory, we are actually referring back to concepts in Boolean algebra. Boolean algebra forms the basis of logic gates in electronics.
In fact, Boolean algebraic operations can be represented with the help of logic gates. Now, what are these operations? Well, they include operations like conjunction (AND), disjunction (OR) and complement (NOT), analogous to mathematical operations like multiplication, addition and negation respectively.
Apart from these basic operations, there are certain derived operations possible through combinations of the basic ones. Boolean algebra rules include Boolean laws as well as Boolean identities and properties that are similar to those in algebra.
As Boolean algebra is based on only two values, namely 0 and 1, any Boolean expression can be solved using a truth table, wherein each variable in the expression is assigned the values 0 and 1. This is another interesting thing about Boolean Math.
There are some analogies, which we will be referring to, further here. Boolean algebra is easier to understand if learned with the use of these analogies. One most logical analogy is that of Boolean operators, 'and', 'or' and 'not' with mathematical operators for multiplication, addition and negation.
The other analogy is with electric switches arranged in series and parallel. A circuit where the switches are in series is analogous to the AND operation while a parallel circuit is analogous to the OR operation.
The value of the switch should be considered 1 when it is ON or closed, and 0 when it is OFF or open. When the switch is in the ON position, it is closed, meaning the circuit is complete, while in the OFF position, it is open, which means the circuit is open. Also, it should be understood, that the value 1 indicates 'true' and 0 indicates 'false'.

### Basic Operations in Boolean Algebra

These rules include the application of the basic Boolean operations to values 0 and 1 in different combinations. Please note, the AND operator is denoted with a dot (.), the OR operator is denoted with a plus sign (+) and a NOT operator or negation is denoted by a bar over the value or a single inverted comma (') following it.
One operator we didn't mention about, before is XOR, also referred to as 'exclusive OR'. Simply stated, it means either 'this' or 'that', but not both, which implies, the answer will be 0 if both 'this' and 'that' operands are of the same value. XOR is denoted by a plus sign enclosed in a circle.
Now, here are three more operators in Boolean algebra. They are, NAND, NOR and XNOR. No, they are not difficult. Like we have plain negation, indicated by a NOT operator, we also have a 'NOT AND', 'NOT OR' and a 'NOT XOR'. Yes, negation of AND is NAND, that of OR is NOR and that of XOR is XNOR.
Let's see what are the outputs on applying different operators between 1 and 0. If you look at the answers carefully, you will find they are not very difficult to derive, as they are based on plain logic.
AND
• 1 AND 1 = 1
• 1 AND 0 = 0 AND 1 = 0
• 0 AND 0 = 0
OR
• 1 OR 1 = 1
• 1 OR 0 = 0 OR 1 = 1
• 0 OR 0 = 0
NOT
• NOT 0 = 1
• NOT 1 = 0
NAND
• 1 NAND 1 = 0
• 1 NAND 0 = 0 NAND 1 = 1
• 0 NAND 0 = 1
NOR
• 1 NOR 1 = 0
• 1 NOR 0 = 0 NOR 1 = 0
• 0 NOR 0 = 1
XOR
• 1 XOR 1 = 0
• 1 XOR 0 = 0 XOR 1 = 1
• 0 XOR 0 = 0
XNOR
• 1 XNOR 1 = 1
• 1 XNOR 0 = 0 XNOR 1 = 0
• 0 XNOR 0 = 1

### Identities in Boolean Algebra

X + 0 = X
This is simple to understand as the same rule applies to real number algebra. The sum of any number and 0 is the original number itself. This identity can also be understood considering the basic OR operations given here. As you must have seen, 0 + 0 = 0 while 1 + 0 = 1, which is like saying X + 0 = X.
X + 1 = 1
Again, if you look at the basic OR operation, you will find, 0 + 1 = 1 and 1+ 1 = 1, which means that anything added to 1 gives 1 as the output value. This identity can also be interpreted as, if the value of any one of the operands in an OR operation, is 1, the answer is 1.
X + X = X
Look at the basic OR operation given here. You will notice that 0 + 0 = 0 and 1 + 1 = 1, which also means that X + X = X. Simple, isn't it? Or look at this logically. When saying, 'this' OR 'that', you mean picking one from them.
Now, if the two values you wish to pick one from, are the same, here, X and X, whatever you pick, you are going to fetch X. And hence the identity, X + X = X.
X + X' = 1
Now imagine picking one between a value and its opposite. Since we are referring to Boolean logic, the only options are going to be 0 or 1.
Now see what is the output of the OR operation between 0 and its opposite, i.e. 1. Or see what 1 OR 0 yields. Both yield a 1, which means that the output of an OR operation between a value and its negative (opposite), is 1.
0.X = 0
Anything ANDed with 0 gives 0. Now consider the analogy of AND operation with a circuit containing switches in series. Even if one of them is in the OFF position, the circuit is not going to complete, thus leading to no or zero output. Thus goes the identity, X AND 0 = 0.
1.X = X
Imagine a circuit with one switch closed and the other, once closed, once open. Now whether the circuit is complete will depend solely on what position X is in, ON or OFF. This means 1 AND X is going to yield X.
X.X = X
Consider the value of X as 1. So, X AND X would mean 1 AND 1; the output is 1, i.e. X. Now consider X value as 0. Now, X AND X = 0 AND 0 = 0, which is X. Thus you can see, that X.X = X.
X.X' = 0
Now consider ANDing a value with its opposite. If X is 1, you would be ANDing 1 with its opposite or negative, which is 0. The end result, in this case would be 0. Now, take the value of X as 0. The AND operation between X and its negative, here the negative of 0, which is 1, will give 0. 0 AND 1 = 0. This proves the identity, X.X' = 0.

## Boolean Algebra Laws

### Associative Law

This law applies to both AND and OR operators in Boolean algebra. Consider the analogy of the multiplication and addition operations for AND and OR respectively.
In the algebra of real numbers, the product does not depend on the order in which the operands are multiplied. Also, the addition remains the same irrespective of the order in which two or more numbers are added.
The same applies to the AND and OR operations in Boolean algebra. Even if you consider a series circuit as analogous to AND and a parallel circuit analogous to OR, you will find that the end result is the same regardless of the order in which the switches are arranged in a circuit. Same is the case with both AND and OR operations.
Hence the rules:
A.(B.C) = (A.B).C
A + (B + C) = (A + B) + C

### Commutative Law

This law too, applies to both AND and OR operations in Boolean logic. We all know that the product of two numbers as also their sum, remains the same, regardless of the order in which they are multiplied or added. The same can be applied to the algebra of booleans.
In whatever order you AND two operands or in whichever order you OR them, their end result does not change. Hence the rules:
A.B = B.A
A + B = B + A

### Distributive Law

The distributive law in Boolean algebra is the same as that in the algebra of real numbers.
A. (B + C) can be written as A.B + A.C. Similarly, A + (B.C) can be written as (A + B).(A + C).
Note: In Boolean algebra, the AND operation takes precedence over the OR operation. This means, if there are three operands, wherein, there's an OR sign between the first and the second operands and an AND sign between the second and the third or the other way round.
In either case, the AND operation is performed before the OR operation. This is analogous to performing the multiplication before addition in normal arithmetic. Hence the rule:
A.B+C = (A.B)+C
A+B.C = A+(B.C)

### Rules for Simplification of Boolean Expressions

The expressions given below are solved based on the identities in Boolean algebra, we just saw. You will understand the simplifications as you read.
A + AB = A
= A (1 + B)
= A(1)
= A
A + A' = A + B
= A + AB + A'
= A + B(A + A')
= A + B(1)
= A + B
(A + B)(A + C) = A + BC
= AA + AC + BA + BC
= A + AC + B(A + C)
= A + AB + BC
= A (1 + B) + BC
= A (1) + BC
= A + BC
Once you understand the basic AND and OR operations and their association with the multiplication and addition operations in real numbers, you won't find it that difficult to grasp the concepts of Boolean algebra. Logical, isn't it?