You are on page 1of 13

PRACTICAL 1 – LOGIC GATES

DIGITAL SYSTEM AND ARCHIECTURE PRACTICALS

PRACTICAL NO: 1

AIM: Study and verify the truth table of various logic gates (NOT, AND, OR, NAND, NOR, EX-OR, and
EX-NOR).

SOLUTION:

A logic gate is a device that acts as a building block for digital circuits. They perform basic logical
functions that are fundamental to digital circuits.

In a circuit, logic gates will make decisions based on a combination of digital signals coming from its
inputs. Most logic gates have two inputs and one output. Logic gates are based on Boolean algebra.
At any given moment, every terminal is in one of the two binary conditions, false or true. False
represents 0, and true represents 1. Depending on the type of logic gate being used and the
combination of inputs, the binary output will differ. A logic gate can be thought of like a light switch,
wherein one position the output is off -- 0, and in another, it is on -- 1. Logic gates are commonly
used in integrated circuits (IC).

Basic logic gates

There are seven basic logic gates: AND, OR, XOR, NOT, NAND, NOR, and XNOR.

Logic Gates and their Truth Table.

1
PRACTICAL 1 – LOGIC GATES

1) NOT GATE

The NOT gate is a basic one-input, one-output gate. When the input is 1, the output is 0, and vice
versa. A NOT gate is sometimes called an inverter because of its feature.

If there is only one input A, the output may be calculated using the Boolean equation Y=A’.

Step 1: Open the Logisim Software.

Step 2: Go to Gates - Click on NOT gate - After clicking on NOT gate you will see the description
of NOT gate in the Selection Tab: NOT Gate. Check the no. of inputs i.e., data bits if the input is two
change it one; the output will always be one.

Step 3: For the inputs go to the Green rectangle of ADD PIN and for the output we will add the LED
button i.e. Green Circle of ADD PIN.

Step 4: In order to connect the input pin and the NOT gate pin we will drag the cursor from the NOT
gate to the input pin and vice versa for the output.

Step 5: For running the connected circuit go to the HAND TOOL also known as Changing values
within circuit and then change the values of the input and check the output.

2
PRACTICAL 1 – LOGIC GATES

2) AND GATE

An AND gate has a single output and two or more inputs. When all of the inputs are 1, the output of
this gate is 1.

The AND gate’s Boolean logic is Y=A.B if there are two inputs A and B.

Step 1: Open the Logisim Software.

Step 2: Go to Gates - Click on AND gate - After clicking on AND gate you will see the description
of AND gate in the Selection Tab: AND Gate. Check the no. of inputs i.e., data bits if the input is two
change it one; the output will always be one.

Step 3: For the inputs go to the Green rectangle of ADD PIN and for the output we will add the LED
button i.e., Green Circle of ADD PIN.

Step 4: In order to connect the input pin and the AND gate pin we will drag the cursor from the AND
gate to the input pin and vice versa for the output.

Step 5: For running the connected circuit go to the HAND TOOL also known as Changing values
within circuit and then change the values of the input and check the output.

3
PRACTICAL 1 – LOGIC GATES

4
PRACTICAL 1 – LOGIC GATES

3) OR GATE

Two or more inputs and one output can be used in an OR gate. The logic of this gate is that if at least
one of the inputs is 1, the output will be 1.

The OR gate’s output will be given by the following mathematical procedure if there are two inputs A
and B: Y=A+B

Step 1: Open the Logisim Software.

Step 2: Go to Gates - Click on OR gate - After clicking on OR gate you will see the description of
OR gate in the Selection Tab: OR Gate. Check the no. of inputs i.e., data bits if the input is two
change it one; the output will always be one.

Step 3: For the inputs go to the Green rectangle of ADD PIN and for the output we will add the LED
button i.e., Green Circle of ADD PIN.

Step 4: In order to connect the input pin and the OR gate pin we will drag the cursor from the AND
gate to the input pin and vice versa for the output.

Step 5: For running the connected circuit go to the HAND TOOL also known as Changing values
within circuit and then change the values of the input and check the output.

5
PRACTICAL 1 – LOGIC GATES

6
PRACTICAL 1 – LOGIC GATES

4) NAND GATE

A NAND gate, sometimes known as a ‘NOT-AND’ gate, is essentially a Not gate followed by an AND
gate. This gate’s output is 1 only if none of the inputs is 1. Alternatively, when all of the inputs are
not high and at least one is low, the output is high.

If there are two inputs A and B, the Boolean expression for the NAND gate is Y= (A.B)’

Step 1: Open the Logisim Software.

Step 2: Go to Gates - Click on NAND gate - After clicking on NAND gate you will see the
description of NAND gate in the Selection Tab: NAND Gate. Check the no. of inputs i.e., data bits if
the input is two change it one; the output will always be one.

Step 3: For the inputs go to the Green rectangle of ADD PIN and for the output we will add the LED
button i.e., Green Circle of ADD PIN.

Step 4: In order to connect the input pin and the NAND gate pin we will drag the cursor from the
AND gate to the input pin and vice versa for the output.

Step 5: For running the connected circuit go to the HAND TOOL also known as Changing values
within circuit and then change the values of the input and check the output.

7
PRACTICAL 1 – LOGIC GATES

5) NOR GATE

A NOR gate, sometimes known as a “NOT-OR” gate, consists of an OR gate followed by a NOT gate.
This gate’s output is 1 only when all of its inputs are 0. Alternatively, when all of the inputs are low,
the output is high.

The Boolean statement for the NOR gate is Y=(A+B)’ if there are two inputs A and B.

8
PRACTICAL 1 – LOGIC GATES

Step 1: Open the Logisim Software.

Step 2: Go to Gates - Click on NOR gate - After clicking on NOR gate you will see the description
of NOR gate in the Selection Tab: NOR Gate. Check the no. of inputs i.e., data bits if the input is two
change it one; the output will always be one.

Step 3: For the inputs go to the Green rectangle of ADD PIN and for the output we will add the LED
button i.e., Green Circle of ADD PIN.

Step 4: In order to connect the input pin and the NOR gate pin we will drag the cursor from the NOT
gate to the input pin and vice versa for the output.

Step 5: For running the connected circuit go to the HAND TOOL also known as Changing values
within circuit and then change the values of the input and check the output.

9
PRACTICAL 1 – LOGIC GATES

6) EX-NOR GATE

The Exclusive-NOR or ‘EX-NOR’ gate is a digital logic gate that accepts more than two inputs but only
outputs one. If both inputs are ‘High,’ the output of the XNOR Gate is ‘High.’ If both inputs are ‘Low,’
the output is ‘High.’ If one of the inputs is ‘Low,’ the output is ‘Low.’

If there are two inputs A and B, then the XNOR gate’s Boolean equation is: Y=A.B+A’B’.

Step 1: Open the Logisim Software.

Step 2: Go to Gates - Click on EX-NOR gate - After clicking on EX-NOR gate you will see the
description of EX-NOR gate in the Selection Tab: EX- NOR Gate. Check the no. of inputs i.e., data bits
if the input is two change it one; the output will always be one.

Step 3: For the inputs go to the Green rectangle of ADD PIN and for the output we will add the LED
button i.e. Green Circle of ADD PIN.

Step 4: In order to connect the input pin and the EX-NOR gate pin we will drag the cursor from the
NOT gate to the input pin and vice versa for the output.

Step 5: For running the connected circuit go to the HAND TOOL also known as Changing values
within circuit and then change the values of the input and check the output.

10
PRACTICAL 1 – LOGIC GATES

11
PRACTICAL 1 – LOGIC GATES

7) EXOR GATE

The Exclusive-OR or ‘Ex-OR’ gate is a digital logic gate that accepts more than two inputs but only
outputs one value. If any of the inputs is ‘High,’ the output of the XOR Gate is ‘High.’ If both inputs
are ‘High,’ the output is ‘Low.’ If both inputs are ‘Low,’ the output is ‘Low.’

The Boolean equation for the XOR gate is Y=A’.B+A.B’ if there are two inputs A and B.

Step 1: Open the Logisim Software.

Step 2: Go to Gates - Click on EX-OR gate - After clicking on EX-OR gate you will see the
description of EX-OR gate in the Selection Tab: EX- OR Gate. Check the no. of inputs i.e., data bits if
the input is two change it one; the output will always be one.

Step 3: For the inputs go to the Green rectangle of ADD PIN and for the output we will add the LED
button i.e. Green Circle of ADD PIN.

Step 4: In order to connect the input pin and the EX-NOR gate pin we will drag the cursor from the
NOT gate to the input pin and vice versa for the output.

Step 5: For running the connected circuit go to the HAND TOOL also known as Changing values
within circuit and then change the values of the input and check the output.

12
PRACTICAL 1 – LOGIC GATES

13

You might also like