Home » Boolean algebra: What is it and how to calculate it?

Boolean algebra: What is it and how to calculate it?

Algebra is a wide topic of mathematics that deals with algebraic expressions and terms. In computer and other branches of science, algebra is used for various purposes. Boolean algebra is a subtype of algebra used in machine language.

It is a widely used topic in computer systems as it takes the binary variables 0 & 1 for solving the problems and describing the expressions. In this article, we are going to explain Boolean algebra along with examples and solutions.

Boolean algebra – Definition

Boolean algebra also known as binary algebra is the division of mathematics that deals with various operations on logical values and includes binary numbers. The binary numbers are the base 2 numbers such as 0 & 1.

It is a widely used concept as it denotes the binary variables 0 & 1 as false & true respectively. For example, if the statement is true it is denoted by 1 and if the statement is false, it is denoted by 0. In set theory, Boolean algebra plays a vital role.

Gates of Boolean Algebra

Here are the gates of binary algebra.

The gates of the Boolean algebra denote the arithmetic operations such as addition & multiplications on the given values but it is rather different from the actual plus and multiplication.

The gates of the Boolean algebra can be described by using the truth table. Here is a brief introduction to the gates of Boolean algebra.

  1. Conjunction Gate

In this gate of binary algebra, when both the terms are true then the result is true otherwise it is false. Such as, the result must be 1 if both the terms are 1 and the if the terms are (0 & 1), (1 & 0), and (0 & 0) gives zero.

The conjunction gate is also known as the And gate and it gives the output by multiplying the numbers. It is generally denoted by a cap sign “^” and written as P ^ Q. Let X & Y are two numbers with binary variables then the conjunction gate is applied such as:

XYX.Y
000
010
100
111
  1. Disjunction Gate

In this gate of binary algebra, when both the terms are false then the result is false otherwise it is true. Such as, the result must be 0 if both the terms are 0 and if the terms are (0 & 1), (1 & 0), and (1 & 1) give one.

The disjunction gate is also known as the OR gate and it gives the output by adding the numbers. It is generally denoted by a sign “v” and written as P v Q. Let X & Y are two numbers with binary variables then the disjunction gate is applied such as:

XYX + Y
000
011
101
111
  1. Negation Gate

In the negation gate, the values are inverted such as if the value is true the negation inverts it as a false, and if the value of false it is inverted to true. In general, negation is used to reverse the process.

Such as if the value is 1 it gives 0 and if the value is 0 it gives 1. The negation gate is also known as the NOT gate.

InputOutput
01
10
  1. NAND Gate

In the NAND gate, the AND & NOT gates are involved in finding the values. In general, the NAND gate is the opposite of AND gate as it reverses the process that AND gate does. In this gate, when both the terms are 1 it gives 0 otherwise it gives 1.

Let X & Y are two numbers with binary variables then this gate is applied such as:

PQ(P.Q)
001
011
101
110
  1. XOR gate

In the XOR gate, the OR & NOT gates are involved in finding the values. In general, the XOR gate is the opposite of the OR gate as it reverses the process that the OR gate does. In this gate, when both the terms are 0 it gives 1 otherwise it gives 0.

Let X & Y are two numbers with binary variables then this gate is applied such as:

PQ(P + Q)
001
010
100
110

How to calculate the problems of Boolean algebra?

There are two ways of solving the problems of Boolean algebra, one is by using a calculator and the other is the manual method.

By using calculator

There are hundreds of online tools present online for helping students to solve their problems with steps. A Boolean calculator is a helpful tool that gives step-by-step solutions to problems.

Here are the steps to use this calculator.

Manually

Example 1

Find the truth table of the given expression by using the gates of Boolean algebra.

(X + Z) * (X + Y) + Z

Solution

Step 1: Write the algebraic expression.

(X + Z) * (X + Y) + Z

Step 2: By taking the total number of terms identify the rows of the truth table.

Term in the given expression = n = 3

According to formula

2m = 23 = 2 x 2 x 2 = 8

Hence, there will be 8 rows in the truth table.

Step 3: According to the given terms make the truth table for three variables.

XYZX + ZX + Y(X + Y) + Z(X + Z) * (X + Y) + Z 
0000000
0011011
0100110
0111111
1001111
1011111
1101111
1111111

Example 2

Find the truth table of the given expression by using the gates of Boolean algebra.

 ((P * Q) + R) + ((P + Q) * R)

Solution

Step 1: Write the algebraic expression.

((P * Q) + R) + ((P + Q) * R)

Step 2: By taking the total number of terms identify the rows of the truth table.

Term in the given expression = n = 3

According to formula

2n = 23 = 2 x 2 x 2 = 8

Hence, there will be 8 rows in the truth table.

Step 3: Make a truth table.

PQRP * QP + Q((P * Q) + R)((P + Q) * R)((P * Q) + R) + ((P + Q) * R)
00000000
00100101
01001000
01101011
10001000
10101011
11011000
11111111

Final Words

Now you are witnessing that this sub-type of algebra is not a difficult topic. You can easily find the solution to the problems of binary algebra with the help of logic gates. In this post, all the basics of binary algebra are covered with examples.

Leave a Reply

Your email address will not be published.