# Boolean Algebra

Boolean algebra is a type of algebra that is created by operating the binary system. In the year 1854, George Boole, an English mathematician, proposed this algebra. This is a variant of Aristotle’s propositional logic that uses the symbols 0 and 1, or True and False. Boolen algebra is concerned with binary variables and logic operations.

Boolean Algebra is fundamental in the development of digital electronics systems as they all use the concept of Boolean Algebra to execute commands. Apart from digital electronics this algebra also finds its application in Set Theory, Statistics, and other branches of mathematics.

In this article, we will learn about, basic Boolean operations, Boolean expressions, Truth Tables, Boolean laws, and others in detail.

## Boolean Algebra Operations

There are various operations that are used in Boolean algebra but the basic operations that form the base of Boolean Algebra are,

• Negation or NOT Operation
• Conjunction or AND Operation
• Disjunction or OR Operation

These operations have their own symbols and precedence and the table added below shows the symbol and the precedence of these operators.

Operator

Symbol

Precedence

NOT

‘ (or) ⇁

First

AND

. (or) ∧

Second

OR

+ (or) ∨

Third

We can easily define these operations using two boolean variables. Let’s take two boolean variables A and B that can have any of the two values 0 or 1, i.e. they can be either OFF or ON. Then these operations are explained as,

### Negation or NOT Operation

Using the NOT operation reverse the value of the Boolean variable from 0 to 1 or vice-versa. This can be understood as:

• If A = 1, then using NOT operation we have (A)’ = 0
• If A = 0, then using the NOT operation we have (A)’ = 1

We also represent the negation operation as ~A, i.e if A = 1, ~A = 0

### Conjunction or AND Operation

Using the AND operation satisfies the condition if both the value of the individual variables are true and if any of the value is false then this operation gives the negative result. This can be understood as,

• If A = True, B = True, then A . B = True
• If A = True, B = False, Or A = false, B = True, then A . B = False
• If A = False, B = False, then A . B = False

### Disjunction (OR) Operation

Using the OR operation satisfies the condition if any value of the individual variables are true, it only gives a negative result if both the values are false. This can be understood as,

• If A = True, B = True, then A + B = True
• If A = True, B = False, Or A = false, B = True, then A + B = True
• If A = False, B = False, then A + B = False

## Boolean Expression and Variables

Boolean expression is an expression that produces a Boolean value when evaluated, i.e. it produces either a true value or a false value. Whereas boolean variables are variables that store Boolean numbers.

P + Q = R is a Boolean phrase in which P, Q, and R are Boolean variables that can only store two values: 0 and 1. The 0 and 1 are the synonyms for false and True and are used in Boolen Algebra, sometimes we also use “Yes” in place of True and “No” in place of False.

Thus, we can say that statements using Boolean variables and operating on Boolean operations are Boolean Expressions. Some examples of Boolean expressions are,

• A + B = True
• A.B = True
• (A)’ = False

## Boolean Algebra Terminologies

There are various terminologies related to Boolean Algebra, which are used to explain various parameters of Boolen Algebra. That includes,

• Boolean Algebra
• Boolean Variables
• Boolean Function
• Literal
• Complement
• Truth Table

Now, we will discuss the important terminologies of Boolean algebra in the article below,

### Boolean Algebra

The branch of algebra that deals with binary operations or logical operations is called Boolean Algebra.

### Boolean Variables

Variables used in Boolean algebra that store the logical value of 0 and 1 are called the boolean variables. They are used to store either true or false values.

### Boolean Function

A function of the Boolean Algebra that is formed by the use of Boolean variables and Boolean operators is called the Boolean function.

### Literal

A variable or the complement of the variable in Boolean Algebra is called the Literal.

### Complement

The inverse of the boolean variable is called the complement of the variable. The complement of 0 is 1 and the complement of 1 is 0. It is represented by ‘ over the variable.

### Truth Table

Table containing all the possible values of the logical variables and the combination of the variable along with the given operation is called the truth table. The number of rows in the truth table depends on the total boolean variables used in that function. It is given by using the formula,

Number of Rows in Truth Table = 2n

where “n” is the number of boolean variables used.

## Truth Tables in Boolean Algebra

A truth table represents all the combinations of input values and outputs in a tabular manner. All the possibilities of the input and output are shown in it and hence the name truth table. In logic problems, truth tables are commonly used to represent various cases. T or 1 denotes ‘True’ & F or 0 denotes ‘False’ in the truth table.

Example: Draw the truth table of the conditions A + B and A.B where A and b are boolean variables.

Solution:

The required Truth Table is,

A B

X = A + B

Y = A.B
T T

T

T
T F

T

F
F T

T

F
F F

F

F

## Laws for Boolean Algebra

The basic laws of the Boolean Algebra are added in the table added below,

Law OR form AND form
Identity Law P + 0 = P  P.1 = P
Idempotent Law P + P = P P.P = P
Commutative Law P + Q = Q + P P.Q = Q.P
Associative Law P + (Q + R) = (P + Q) + R P.(Q.R) = (P.Q).R
Distributive Law P + QR = (P + Q).(P + R) P.(Q + R) = P.Q + P.R
Inversion Law (A’)’ = A (A’)’ = A
De Morgan’s Law (P + Q)’ = (P)’.(Q)’ (P.Q)’ = (P)’ + (Q)’

Let’s learn about these laws in detail.

### Identity Law

In the Boolean Algebra, we have identity elements for both AND(.) and OR(+) operations. The identity law state that in boolean algebra we have such variables that on operating with AND and OR operation we get the same result, i.e.

• A + 0 = A
• A.1 = A

### Commutative Law

Binary variables in Boolean Algebra follow the commutative law. This law states that operating boolean variables A and B is similar to operating boolean variables B and A. That is,

• A. B = B. A
• A + B = B + A

### Associative Law

Associative law state that the order of performing Boolean operator is illogical as their result is always the same. This can be understood as,

• ( A . B ) . C = A . ( B . C )
• ( A + B ) + C = A + ( B + C)

### Distributive Law

Boolean Variables also follow the distributive law and the expression for Distributive law is given as:

• A . ( B + C) = (A . B) + (A . C)

### Inversion Law

Inversion law is the unique law of Boolean algebra this law states that, the complement of the complement of any number is the number itself.

• (A’)’ = A

Apart from these other laws are mentioned below:

### AND Law

AND law of the Boolean algebra uses AND operator and the AND law is,

• A . 0 = 0
• A . 1 = A
• A . A = A

### OR Law

OR law of the Boolean algebra uses OR operator and the OR law is,

• A + 0 = A
• A + 1 = 1
• A + A = A

De Morgan’s Laws are also called Demorgan’s Theorem. They are the most important laws in Boolen Algebra and these are added below under the heading Boolean Algebra Theorem

## Boolean Algebra Theorems

There are two basic theorems of great importance in Boolean Algebra, which are De Morgan’s First Laws, and De Morgan’s Second Laws. These are also called De Morgan’s Theorems. Now let’s learn about both in detail.

### De Morgan’s First laws

De Morgan’s Law states that,

Statement: The complement of the product (AND) of two Boolean variables (or expressions) is equal to the sum(OR) of the complement of each Boolean variable (or expression).

(P.Q)’ = (P)’ + (Q)’

The truth table for the same is given below:

P Q  (P)’  (Q)’ (P.Q)’ (P)’ + (Q)’
T T F F F F
T F F T T T
F T T F T T
F F T T T T

We can clearly see that truth values for (P.Q)’ are equal to truth values for (P)’ + (Q)’, corresponding to the same input. Thus, De Morgan’s First Law is true.

### De Morgan’s Second laws

Statement: The Complement of the sum (OR) of two Boolean variables (or expressions) is equal to the product(AND) of the complement of each Boolean variable (or expression).

(P + Q)’ = (P)’.(Q)’

Proof :

The truth table for the same is given below:

P Q (P)’ (Q)’ (P + Q)’ (P)’.(Q)’
T T F F F F
T F F T F F
F T T F F F
F F T T T T

We can clearly see that truth values for (P + Q)’ are equal to truth values for (P)’.(Q)’, corresponding to the same input. Thus, De Morgan’s Second Law is true.

## Solved Examples on Boolean Algebra

Example 1: Draw Truth Table for P + P.Q = P

Solution:

The truth table for P + P.Q = P

P Q P.Q P + P.Q
T T T T
T F F T
F T F F
F F F F

In the truth table, we can see that the truth values for P + P.Q is exactly the same as P.

Example 2: Draw Truth Table for P.Q + P + Q

Solution:

The truth table for P.Q + P + Q

P Q P.Q P.Q + P + Q
T T T T
T F F T
F T F T
F F F F

## FAQs on Boolean Algebra

### 1. What is Boolean Algebra?

Boolean Algebra also called Logical Algebra is a branch of mathematics that deals with Boolean Varaibles such as, 0 and 1.

### 2. What are Main Boolean Operators?

There are three main Boolean Operators that are,

• AND (Conjunction)
• OR (Disjunction)
• NOT (Negation)

### 3. What are Applications of Boolean Algebra?

Boolean Algebra has various applications. It is used to simplify logical circuits that are the backbone of modern technology.

### 4. What does “0” Represent in Boolean Algebra?

The “0” in Boolen Algebra represent a False condition or it represent the Switch Off condition.

### 5. What does “1” Represent in Boolean Algebra?

The “1” in Boolen Algebra represent a Truecondition or it represent the Switch On condition.

### 6. What is Boolean Algebra laws?

Boolean algebra laws are fundamental rules for working with true/false or binary variables. Key laws include:

– Identity: A AND 1 = A, A OR 0 = A

– Null: A AND 0 = 0, A OR 1 = 1

– Complement: A AND A’ = 0, A OR A’ = 1

– Commutative: A AND B = B AND A, A OR B = B OR A

– Distributive: A AND (B OR C) = (A AND B) OR (A AND C), A OR (B AND C) = (A OR B) AND (A OR C)

– De Morgan’s: (A AND B)’ = A’ OR B’, (A OR B)’ = A’ AND B’

These laws are vital for simplifying logical expressions and designing digital circuits.

### 7. What is Boolean Algebra laws?

Boolean algebra typically encompasses 12 fundamental rules, which are:

1. Identity Law for AND: A AND 1 = A

2. Identity Law for OR: A OR 0 = A

3. Null Law for AND: A AND 0 = 0

4. Null Law for OR: A OR 1 = 1

5. Complement Law for AND: A AND A’ = 0

6. Complement Law for OR: A OR A’ = 1

7. Idempotent Law for AND: A AND A = A

8. Idempotent Law for OR: A OR A = A

9. Inverse Law for AND: A AND A’ = 0

10. Inverse Law for OR: A OR A’ = 1

11. Commutative Law for AND: A AND B = B AND A

12. Commutative Law for OR: A OR B = B OR A

### 8. What are the 5 laws of Boolean algebra?

Boolean algebra is governed by five primary laws, which serve as the foundation for manipulating logical expressions:

1. Identity Law for AND: The AND operation with true (1) leaves a variable unchanged.

– A AND 1 = A

2. Identity Law for OR: The OR operation with false (0) leaves a variable unchanged.

– A OR 0 = A

3. Complement Law for AND: The AND operation with false (0) results in false.

– A AND 0 = 0

4. Complement Law for OR: The OR operation with true (1) results in true.

– A OR 1 = 1

5. Idempotent Law: Repeated operations on a variable with itself do not change its value.

– A AND A = A

– A OR A = A

### 9. What are the 3 laws in Boolean logic?

Boolean logic, also known as Boolean algebra, is governed by three fundamental laws:

Commutative Law: This law states that the order of operands in an operation does not affect the result.

For AND: A AND B = B AND A

For OR: A OR B = B OR A

Associative Law: This law dictates that the grouping of operands in an operation does not change the result.

For AND: (A AND B) AND C = A AND (B AND C)

For OR: (A OR B) OR C = A OR (B OR C)

Distributive Law: This law describes how one operation (AND or OR) distributes over the other operation.

For AND over OR: A AND (B OR C) = (A AND B) OR (A AND C)

For OR over AND: A OR (B AND C) = (A OR B) AND (A OR C)

### 10. What is De Morgan’s theorem?

De Morgan’s theorem is a fundamental principle in Boolean algebra that provides a way to simplify the complement (negation) of a logical expression involving both AND and OR operations. There are two forms of De Morgan’s theorem, one for negating an AND operation and another for negating an OR operation. These theorems are named after the British mathematician and logician Augustus De Morgan.

De Morgan’s Theorem for AND Operations:

The theorem states that the complement of the AND operation between two or more variables is equivalent to the OR operation of their complements.

Mathematically, for variables A and B (and possibly more):

– NOT (A AND B) = (NOT A) OR (NOT B)

This means that if you want to find the complement of the AND operation of two or more variables, you can take the complement of each variable individually and then use the OR operation between their complements.

De Morgan’s Theorem for OR Operations:

The theorem states that the complement of the OR operation between two or more variables is equivalent to the AND operation of their complements.

Mathematically, for variables A and B (and possibly more):

– NOT (A OR B) = (NOT A) AND (NOT B)

This means that if you want to find the complement of the OR operation of two or more variables, you can take the complement of each variable individually and then use the AND operation between their complements.

Whether you're preparing for your first job interview or aiming to upskill in this ever-evolving tech landscape, GeeksforGeeks Courses are your key to success. We provide top-quality content at affordable prices, all geared towards accelerating your growth in a time-bound manner. Join the millions we've already empowered, and we're here to do the same for you. Don't miss out - check it out now!

Previous
Next