0% found this document useful (0 votes)
20 views

Unit 2 Boolean Algebra

The document discusses Boolean algebra and logic gates. It defines Boolean algebra and variables, Boolean functions, truth tables, and common logic gates like AND, OR, NOT, NAND, NOR, XOR, and XNOR. It also covers De Morgan's theorems relating logical operations and their complements.

Uploaded by

Dipesh SAPKOTA
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views

Unit 2 Boolean Algebra

The document discusses Boolean algebra and logic gates. It defines Boolean algebra and variables, Boolean functions, truth tables, and common logic gates like AND, OR, NOT, NAND, NOR, XOR, and XNOR. It also covers De Morgan's theorems relating logical operations and their complements.

Uploaded by

Dipesh SAPKOTA
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 38

Unit 2

Logic Function and Boolean Algebra


Boolean Algebra
Boolean Algebra is referred to as the algebra of
logic which deals with the study of binary
variables and logical operations. It is
introduced by an English mathematician
George Boole. In boolean algebra, the
variables have only two values i.e. true or false
usually written as 1 and 0.
Boolean Variables
Boolean variables are those variables which
usually contains two values either 0 or 1 or
true or false. For example x, y, a, b, etc.
Boolean Function/Logic Function
A logic function is an expression formed by
binary variables, binary operators such as OR,
AND, NOT, operator, parenthesis and equal
sign. Boolean function may also represent
either 0 or 1. For example: F=x.y.zI +x.y
Truth Table
A table which represents the input-output
relationship of the binary variables for each
logical gate is called truth table. It shows the
relation between all inputs and output in
tabular forms. The number of rows in a truth
table is equal to 2n . For example, for 3 input
variable, no. of rows is 23 =8 and 22=4.
Example
Inputs Output
A B A+B
0 0 0
0 1 1
1 0 1
1 1 1
Boolean Operators
Operators are the sign and symbol that defines
the operation. The basic operators used in
Boolean Algebra are as follows:
1. AND Operator
It is represented by “.”. So, A AND B can be
represented as A.B. Other symbols ^ and 
are also used for representing AND operation.
The result of AND operation is exactly same as
simple arithmetic multiplication. The result
will be only 1 when all inputs are 1.
Inputs Outputs
A B A.B
0 0 0
0 1 0
1 0 0
1 1 1
2. OR operator
It is represented by “+”. So, A OR B can be
represented as A+B. Other symbols used are v
and U. The result of OR operator is same as
addition in algebra. In this operation the result
will be 1, if at least one of the input is 1.
Inputs Output
A B A+B
0 0 0
0 1 1
1 0 1
1 1 1
3. NOT operator
It is represented by – or ‘. NOT operator of
operand A (NOT A) can be represented by A
or A’. The result of NOT operation is the
complement or reverse of the Boolean input.

Inputs Output
A A’
0 1
1 0
Logic Gate
A logic gate is an electronic circuit that operates on
one or more input signals to produce an output
signal. It is used for binary operation and is the
basic component of digital computer. It is
embodied into integrated circuit (IC). Each gate
has its specific function and graphical symbol.
The function of gate is expressed by means of an
algebraic expression. In the digital computer,
there are three basic gates, which are:
• AND Gate
• OR Gate
• NOT Gate
Apart from the basic gates, there are other gates
which are derived from basic gates, they are
• NAND gate
• NOR gate
• Exclusive OR (XOR) gate
• Exclusive NOR (XNOR) gate
1. AND Gate:
It is an electronic circuit which produce 1 output
when all the inputs are 1, otherwise the
output will be 0. It has two or more inputs and
produce only one output.
Algebraic expressions: F=A.B Where . Stands for
AND operation, A and B are input and F is
output.
Truth Table
Inputs Output
A B F=A.B
0 0 0
0 1 0
1 0 0
1 1 1

Graphical Symbol: Venn-diagram


A A B
F=A.B

A B
2. OR Gate:
It is an electronic circuit, which produce 1
output when one of the input is 1. If all inputs
are 0, then the output will also be 0. It also
has two or more inputs and produces a single
output.
Algebraic Expression: F=A+B Where + stands for
OR operation, A and B are inputs and F is
output.
Graphical Symbol:

Truth Table: Venn-diagram


Inputs Output A B
A B F=A+B
0 0 0
0 1 1
1 0 1
1 1 1
3. NOT Gate
It is an electronic circuit whose output is the
complement of the input. It is also called
inverter. If the input is 0 and output will be 1
and vice versa. It has only one input and
output.
Algebraic expression: F=AI = A
Truth Table: Input Output
A F=AI
0 1
1 0
Graphical Symbol:
F=AI
A

Venn-Diagram
AI
4. NAND Gate
It is the combination of AND and NOT gate. It is
an electronic circuit which produce 0 output
when all inputs are 1, otherwise the output
will be 1. It is the complement of AND gate. It
also has two or more inputs and produces a
single output.
Algebraic expression: F=(A.B)I
Truth Table: Inputs Output
s
A B A.B (A.B)I
0 0 0 1
0 1 0 1
1 0 0 1
1 1 1 0

Graphical Symbol Venn-Diagram


A F=(A.B)I

F=(A.B)
A F=(A.B)I

B
2. NOR Gate
It is the combination of OR gate and NOT gate. It
is an electronic gate which produces 1 output
when all inputs are 0 otherwise, outputs will
be 0. It is the complement of OR gate. It also
has two or more inputs and produces a single
output.
Algebraic Expression: F=(A+B)I
Graphical Symbol:
F=(A+B)I

F=(A+B) F=(A+B)I
Truth Table
Inputs Output
A B A+B F=(A+B)I
0 0 0 1
0 1 1 0
1 0 1 0
1 1 1 0
Venn-Diagram
6. Exclusive-OR (X-OR) Gate:
It is an electronic gate which produces 0 output
when both the inputs are same otherwise, the
output will be 1. It has also two or more inputs
and produce a single outputs.
Algebraic Expression:

F  A  B  A .B  A.B
I I
Truth Table
Inputs Output

A B AI BI AI.B A.BI AI.B+A.BI

0 0 1 1 0 0 0
0 1 1 0 1 0 1
1 0 0 1 0 1 1
1 1 0 0 0 0 0
Graphical Symbol
Venn-Diagram
7. Exclusive-NOR (XNOR) Gate:
It is an electronic circuit which produces 1
output when all inputs are either 0 or 1. It is
the complement of XOR gate. It can also have
two or more inputs and a single output.
Algebraic Expression:

F  AB  A.B  A .B I I
Graphical Symbol
Truth Table
Inputs Output

A B AI BI A.B AI.BI F=A.B+AI.BI

0 0 1 1 0 1 1
0 1 1 0 0 0 0
1 0 0 1 0 0 0
1 1 0 0 1 0 1
Venn-Diagram
De Morgan’s Theorem
• First Theorem:
The De Morgan’s first theorem states that
“The complement of a sum equals to the
product of the complements.”
i.e (A+B)I=AI.BI
To proof:

Graphical Symbol
Conclusion: Comparing the values of (A+B)I and AI.BI from
the truth table, both are equal, hence proved.
Second Theorem
DeMorgan’s second theorem states that “The
complement of a product is equal to the sum
of the complements.”
i.e. (A.B)I=AI+BI
To proof:
Graphical Symbol
Inputs Output 1 Output 2

A B A.B (A.B)I AI BI AI+BI


0 0 0 1 1 1 1
0 1 0 1 1 0 1
1 0 0 1 0 1 1
1 1 1 0 0 0 0

Conclusion: Comparing the values of (A.B)I=AI+BI from the truth table both
are equal, hence proved.

You might also like