Unit 2 Boolean algebra and Logic Gates(1)
Unit 2 Boolean algebra and Logic Gates(1)
True False
1 0
On Off
High Low
Yes No
Unit 2: Boolean algebra and Logic Gates
Truth Table
A truth table is a table that shows the relationship between the Boolean values when used
together with the Boolean operator and gives a particular output. A truth table is widely used for proving
Boolean expression and show the relationship between the Boolean values. A truth table with N inputs
requires 2N rows to list all possible input combinations.
Boolean expression and Boolean function
A Boolean function is a Boolean expression that is a combination of Boolean variables and operators
combined together to perform a particular task. The variables in a Boolean function as expression could
be single variables or a complement of a variable. The output achieved from one function could be used
as an input for another and so on to achieve any particular output.
F= (a + b).(b + c) ___________ (i)
F= (a.b).(b.c) ___________ (ii)
1. Commutative Laws
This law says the order in which Boolean variables are added is immaterial
i. A + B = B + A
ii. A. B = B. A
where a and b are the Boolean variables
Proof of (i)
A B A+B B+A
0 0 0 0
0 1 1 1
1 0 1 1
1 1 1 1
All the values of third column of above table is equal to values in fourth column. Hence (i) part of the law
is proved.
Proof of (ii)
Unit 2: Boolean algebra and Logic Gates
A B A.B B.A
0 0 0 0
0 1 0 0
1 0 0 0
1 1 1 1
All the values of third column of the above table is equal to value in fourth column. Hence (ii) part of law
is proved.
2. Associative law
This law says that in the process of logically multiplying three variables, A, B, C it is immaterial whether
we do this by multiplying C to the product of A and B or by multiplying A to the product of B and C.
i.e. A.(A.C) = (A.B).C
A B C A.B B.C A.(B.C) (A.B)C
0 0 0 0 0 0 0
0 0 1 0 0 0 0
0 1 0 0 0 0 0
0 1 1 0 1 0 0
1 0 0 0 0 0 0
1 0 1 0 0 0 0
1 1 0 1 0 0 0
1 1 1 1 1 1 0
The values of column A.(B. C) is equal to (A. B).C. Hence the first statement of associative law is proved.
Also this law has another statement which says in the process of logically adding two variables, it is
immaterial whether we do this by adding C to the sum of A and B or by adding A to sum of B and C i.e
A+(B+C) = (A+B)+C
3. Distributive law
Distributive law says that if Boolean expression is a sum of two or more than two terms having a common
variable then that common variable can be taken common like ordinary variable
Unit 2: Boolean algebra and Logic Gates
i.e. A.(B+C) = A.B + A.C
A B C A.B A.C B+C A.(B+C) A.B+A.C
0 0 0 0 0 0 0 0
0 0 1 0 0 1 0 0
0 1 0 0 0 1 0 0
0 1 1 0 0 1 0 0
1 0 0 0 0 0 0 0
1 0 1 0 1 1 1 1
1 1 0 1 0 1 1 1
1 1 1 1 1 1 1 1
The values of column A(B+C) is equal to values of column A. B + A. C. hence 1st statement of distributive
law is proved.
Similarly, this law also states that Boolean expression can be expanded term by term.
i.e. A +(B.C) = (A + B) . (A + C)
A B C A+B A+C B.C A+(B.C) (A+B).(A+C)
0 0 0 0 0 0 0 0
0 0 1 0 1 0 0 0
0 1 0 1 0 0 0 0
0 1 1 1 1 1 1 1
1 0 0 1 1 0 1 1
1 0 1 1 1 0 1 1
1 1 0 1 1 0 1 1
1 1 1 1 1 1 1 1
The value in column A+(B+C) are equal to values in column (A + B).(A + C). Hence statement is proved.
4. Idempotent law
This law says if a Boolean variables is multiplied with itself, we get that variable only.
i.e. A. A=A
A A. A
0 0
1 1
Here values of column A and A.A are equal. Hence statement proved.
similarly, this law also states that if we add a Boolean variables with itself we get that variable only.
i.e. A+A=A
A A+A
0 0
1 1
5. Involution law
Unit 2: Boolean algebra and Logic Gates
This law states that double complement of a Boolean variable is equal to the variable itself.
i.e. (A')' = A.
Proof
A A' (A')'
0 1 0
1 0 1
6. Boundedness law
This law says if 1 is added to a Boolean variable we get output 1.
i.e. A + 1= 1
A A+1
0 1 1
1 1 1
Also this law says that if 0 is multiplied to a Boolean variable we get output 0.
i.e. A.0 = 0
A A.0
0 0 0
1 0 0
7. Absorption law
If two Boolean variables A and B are given then if we add A to the product of A and B we get Boolean
variable A as the result.
i.e. A+(A. B) =A
A B A. B A+(A .B)
0 0 0 0
0 1 0 0
1 0 0 1
1 1 1 1
All values of column A+(A. B) are equal to values in column A. Hence statement proved.
Similarly, the other statement of absorption law says if two Boolean variables, A and B are given, then if
we multiply A to the sum of A and B then we get A.
i.e. A.(A + B) = A
A B A+B A.(A + B)
Unit 2: Boolean algebra and Logic Gates
0 0 0 0
0 1 1 0
1 0 1 1
1 1 1 1
In above table the values in column A.(A + B) are equal to column A. Hence statement proved.
8. Identity law
This law says of 0 is added to any Boolean variable 'a' then we obtain that variable only.
i.e. A+0=A
A A+0
0 0
1 1
Here values in column A+0 is equal to column A. Hence statement proved
Similarly, another statement of identify law says if 1 in multiplied to any Boolean variable 'A' then we get
that variable only.
i.e. A.1=A
A A.1
0 0
1 1
Here values in column A and A.1 are equal. Hence statement proved.
9.Complement law
This law says that if a Boolean variable is added with its complement we obtain 1.
i.e. A + A' = 1
A A' A + A'
0 1 1
1 0 1
In the table all the values of column A + A' are 1. Hence statement proved.
Similarly if a Boolean variable is multiplied with its complement we obtain 0
i.e. A. A'=0
A A' A. A'
0 1 0
1 0 0
Here, in the table all the values of column A. A' are 0. Hence statement proved.
a. Theorem 1
This theorem states that "The complement of a sum of Boolean variable equal to the product of
complement of those variables. If a and b are two Boolean variables then (a + b)' = a'. b' .
Unit 2: Boolean algebra and Logic Gates
truth table proof:
The values in column (A + B)' are equal to values in column A'. B'. Hence proved.
b. Theorem 2
This theorem states that complement of product of Boolean variables equals to sum of the complement of
those variables. If A, B and C are the Boolean variables then
Logical Gates
Logical gates are the electronic circuit which operates on one or more input signal to produce single
output . AND, OR, NOT are basic gates.
a) AND gates:
It is a digital circuit whose output is a value of 1 only when all input are
1. On all other cases of input output 0 is returned. If we consider 3
inputs a, b and c with s being the output then the resulting AND gate is
Unit 2: Boolean algebra and Logic Gates
shown below:
The resulting truth table is shown below:
Inputs Outputs
A B C F = A.B.C
0 0 0 0
0 0 1 0
0 1 0 0
0 1 1 0
1 0 0 0
1 0 1 0
1 1 0 0
1 1 1 1
The resulting Boolean expression is F = A.B.C
b) OR gate:
It is a digital circuit whose output is a value of 1; if any one of the input is 1. The output in OR gate is
0 only when all inputs are 0. If we consider 3 inputs a, b, c and if d is the output then the resulting or
gate is shown below.
Inputs Outputs
A B C F
0 0 0 1
0 0 1 1
Unit 2: Boolean algebra and Logic Gates
0 1 0 1
0 1 1 1
1 0 0 1
1 0 1 1
1 1 0 1
1 1 1 0
The resulting Boolean expression is
F = (A.B.C)'
iii. XOR gate: (Exclusive OR gate)
It is a digital circuit which yields true (1) if and only if the number of 1’s on input is in odd.
Otherwise output 0 is yielded.
The above figure shows the symbol of XOR gate and its truth table
Resulting Boolean expression is
F= A.'B +A.B'
Where F is assumed to be output
iv. XNOR gate (Exclusive NOR gate) or Equivalence gate:
It is the digital circuit which yields output 1 if all the inputs are 1 or all the inputs are 0.And on all
other cases output 0 is obtained.
A'
A F= A A F= A
Input Output
0 0
1 1