CO Unit-1
CO Unit-1
`
UNIT-1
Boolean Algebra
Boolean algebra is a branch of algebra dealing with logical operations on variables. There can
be only two possible values of variables in boolean algebra, i.e. either 1 or 0. In other words,
the variables can only denote two options, true or false. The three main logical operations of
boolean algebra are conjunction, disjunction, and negation.
In elementary algebra, mathematical expressions are used to mainly denote numbers whereas,
in boolean algebra, expressions represent truth values. The truth values use binary variables
or bits "1" and "0" to represent the status of the input as well as the output. The logical
operators AND, OR, and NOT form the three basic boolean operators. In this article, we will
learn more about the definition, laws, operations, and theorems of Boolean algebra.
• Any variable that is being used can have only two values. Binary 1 for HIGH and
Binary 0 for LOW.
• Every complement variable is represented by an overbar i.e. the complement of
variable B is represented as B¯. Thus if B = 0 then B¯= 1 and B = 1 then B¯= 0.
• Variables with OR are represented by a plus (+) sign between them. For example
OR of A, B, C is represented as A + B + C.
• Two or more variables with logical AND are represented by writing a dot between
them such as A.B.C. Sometimes the dot may be omitted like ABC.
Distributive Law
The distributive law says that if we perform the AND operation on two variables and OR the
result with another variable then this will be equal to the AND of the OR of the third variable
with each of the first two variables. The boolean expression is given as
A + B.C = (A + B) (A + C)
Associative Law
According to the associative law, if more than two variables are OR'd or AND'd then the
order of grouping the variables does not matter. The result will always be the same. The
expressions are given as:
A + (B + C) = (A + B) + C
A.(B.C) = (A.B).C
Commutative Law
Commutative law states that if we interchange the order of operands (AND or OR) the result
of the boolean equation will not change. This can be represented as follows:
A+B=B+A
A.B = B.A
Absorption Law
Absorption law links binary variables and helps to reduce complicated expressions by
absorbing the like variables. There are 4 statements that fall under this law given as:
• A + A.B = A
• A (A + B) = A
3
`
• A + Ā.B = A + B
• A.(Ā + B) = A.B
There are some boolean algebra properties and identities that are given as follows:
• A+1=1
• A+0=A
• A.1=A
• A.0=0
• A+A=A
• A.A=A
• ¯¯¯¯¯¯¯¯A¯¯ = A
• A + ¯¯¯¯A¯ = 1
• A . ¯¯¯¯A¯ = 0
AND gate - R = A.B will be the boolean expression. R will be true if both A AND B are true.
OR gate - The boolean equation is R = A + B. Here, R will be true if either of the inputs A
OR B is true.
NOT gate - This is also known as an inverter and the boolean equation is R = ¯¯¯¯A�¯. This
implies that the output is true only if the input is false.
5
`
NAND gate - This is also the NOT - AND gate. R = ¯¯¯¯¯¯¯¯¯¯¯A.B.¯ is the boolean equation.
The output R will NOT be true if both A AND B are true.
EX - NOR gate - The boolean equation of the exclusive NOR gate is given as R
= ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯A⊕B⊕¯. It means R is true only if both inputs are either true or false.
AND gate
A B R = A.B
0 0 0
0 1 0
1 0 0
7
`
1 1 1
OR gate
A B R=A+B
0 0 0
0 1 1
1 0 1
1 1 1
NOT gate
A R = ¯¯¯¯A¯
1 0
0 1
NAND gate
A B R = ¯¯¯¯¯¯¯¯¯¯¯A.B.¯
0 0 1
0 1 1
1 0 1
1 1 0
NOR gate
A B R = ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯A+B+¯
0 0 1
0 1 0
1 0 0
8
`
1 1 0
EX - OR gate
A B R=A⊕B
0 0 0
0 1 1
1 0 1
1 1 0
EX - NOR gate
A B R = ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯A⊕B⊕¯
0 0 1
0 1 0
1 0 0
1 1 1