Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
64 views7 pages

Basic Logic Gates

The document discusses the seven basic logic gates - NOT, OR, AND, NAND, NOR, XOR, and XNOR. It explains what each gate is, provides its truth table, and discusses how more complex gates can be created by combining simpler ones, with NAND gates being particularly useful as universal gates.

Uploaded by

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

Basic Logic Gates

The document discusses the seven basic logic gates - NOT, OR, AND, NAND, NOR, XOR, and XNOR. It explains what each gate is, provides its truth table, and discusses how more complex gates can be created by combining simpler ones, with NAND gates being particularly useful as universal gates.

Uploaded by

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

Basic Logic Gates

Today on the workshop, we will be working on a Basic logic gates.

We will see how these devices works, how to select them, and how to use them by themselves or with
an Arduino.

We will build even a simple intruder alarm, it’s the logical thing to do, so, welcome to the workshop.

Let us start by learning about Basic logic gates.

The basic logic gates are the fundamental building blocks of all digital circuits.

Basic logic gates are defined as a device that has one output and one or more inputs.

We use something like truth table to define gate logic.

A truth table is a chart that shows all the possible states of the inputs and the resulting output.

Basic logic gates used the rules of a Boolean Algebra for their operation.

There are seven basic logic gates that we will discussed today.

Three of them are the most fundamental of all the gates.

Today, we will look at the 7 basic logic gates starting with the three most fundamental gates.

We will begin by looking at the NOT gate, the OR gate, and the AND gate.
NOT Gate

The NOT gate is the simplest of all basic logic gates.

This gate is sometimes referred to as an inverter and for a reason that the output value is the inverse of
the input value.

If we look at the algebraic formula that is written on the below of the NOT gate symbol, we can see that
the output Y is the inverse of the input A.

The line above the letter A, indicate that the result is inverted from the given input.

Now beside this, we have the truth table.

As we can see, input A has 2 possible conditions, the 0 or 1.

The output will be the opposite of the given inputs.

OR Gate:

The next basic logic gate that we will examine is the OR Gate.

If we look at the formula of OR gate, it says,

Y=A+B

The + (plus) symbol is actually used in Boolean Algebra.

To define an OR, the easiest way is to look at the Truth Table.

If we look at the truth table, and look at the inputs of A or B, we will see that the output Y is set to 1 , as
long as either A or B is set to 1.
The only condition in which the output Y is 0, is if a and b are both values of 0.

AND Gate

The AND Gate is the third fundamental logic gate and we will see the sample formula below its symbol.

Truth Table for AND Gate

The truth table for the AND Gate, it shows that the output Y is set to one only if A and B are set to 1.

Any other condition will result in an output of zero.

The four other basic logic gates are the NAND Gate, NOR Gate, XOR (Exclusive OR Gate), and the XNOR
(Exclusive NOR) gate.

NAND Gate

A NAND Gate is simply an AND Gate with an inverted output.

As we can see that in the formula below the symbol.

Truth table
If we look at the truth table we can see that the output Y is set to 1 in every condition except when A
and B are equal 1.

NOR Gate

A NOR gate is just an OR gate with an inverter on the output.

Based on the truth table, we can see that the output will only be set to 1 on one condition that is when
A and B are equal to zero.

Any other condition will result in an output of zero.

Exclusive OR Gate

Exclusive OR gate equation are shown below its symbol.

We can see the operation by looking at a truth table.

Exclusive OR gate has an output of 1 if A is equal to 1 but B is equal to zero or A is equal to zero and B is
equal to 1.

In other words, if the 2 inputs are different, the output is set to 1 and when the inputs are the same, the
output is set to zero.
Exclusive NOR (XNOR) Gate

XNOR gate is an exclusive OR gate with an inverted output.

Based on the truth table above, the output will be set to 1 if the 2 inputs are set to the same value. If the
2 inputs differ, the output will be set to 0.

Basic Logic Gates Combination

We can combine basic logic gates to create other basic logic gates.

A simple example is to combine an AND gate and a NOT gate inorder to create a NAND gate.

In a similar way, we can tie both inputs of a NAND gate together and use it as an inverter or NOT gate.

In fact, the NAND gate is referred to as a universal gate because using the combinations of the NAND
gates, we can create any of the seven basic gates.
2 NAND gates = AND gates

a b nand and
1 0 1
1 1 0 0

A NAND gate combined with a second NAND gate which is wired as an inverter will create an AND gate.

3 NAND gates = OR gates

A configuration with 3 NAND gates will create an OR gate.

a b NAND nand nand or


1 0
0 1
0 1 1 1

NAND Gate Boolean Algebra

Y = (A.B).(C.D)

Y = (1.0).(0.1)

Y = 1.1

Y=1

OR Gate Boolean Algebra

Y = (A.B) + (C.D)

Y = (1.0) + (0.1)

Y = (1) + (1)

Y=1
Four NAND gates = OR gate

Adding an inverted output with a fourth NAND gate creates a NOR gate.

We can use this technique to create all of the basic gates with NAND gates.

In some cases, designers only used NAND gates in their circuits and simply create the other one
themselves.

You might also like