# Boolean Functions

The binary variables and logic operations are used in Boolean algebra. The algebraic expression is known as **Boolean Expression**, is used to describe the **Boolean Function**. The Boolean expression consists of the constant value 1 and 0, logical operation symbols, and binary variables.

**Example 1: F=xyâ€™ z+p**

We defined the Boolean function **F=xyâ€™ z+p** in terms of four binary variables x, y, z, and p. This function will be equal to 1 when x=1, y=0, z=1 or z=1.

**Example 2:**

The output Y is represented on the left side of the equation. So,

Apart from the algebraic expression, the Boolean function can also be described in terms of the truth table. We can represent a function using multiple algebraic expressions. They are their logically equivalents. But for every function, we have only one unique truth table.

In truth table representation, we represent all the possible combinations of inputs and their result. We can convert the switching equations into truth tables.

**Example: F(A,B,C,D)=A+BCâ€™+D**

The output will be high when A=1 or BCâ€™=1 or D=1 or all are set to 1. The truth table of the above example is given below. The 2^{n} is the number of rows in the truth table. The n defines the number of input variables. So the possible input combinations are 2^{3}=8.

## Methods of simplifying the Boolean function

There are two methods which are used for simplifying Boolean function. These functions are as follows:

### Karnaugh-map or K-map

De-Morganâ€™s law is very helpful for manipulating logical expressions. The logic gates can also realize the logical expression. The k-map method is used to reduce the logic gates for a minimum possible value required for the realization of a logical expression. The K-map method will be done in two different ways, which we will discuss later in the **Simplification of Boolean expression** section.

### NAND gates realization

Apart from the K-map, we can also use the NAND gate for simplifying the Boolean functions. Letâ€™s see an example:

Example 1: F(A,B,C,D)=Aâ€™ Câ€™+ABCDâ€™+Bâ€™ Câ€™ D+BCDâ€™+Aâ€™Bâ€™