0% found this document useful (0 votes)
15 views14 pages

DSM Practical 1

Uploaded by

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

DSM Practical 1

Uploaded by

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

DSM Practical-1

(Batch-A1)

Name Ansari Mohammed Shanouf Valijan


UID Number 2021300004
Class FY B.Tech Computer Engineering(Div-A)
Experiment Number 1

Aim: To verify the truth tables for logic gates and to design
and setup circuits for half adder, half subtractor, full
adder and full subtractor.

Equipments Required 7408 quad 2 input IC (AND gate)


(if performed offline): 7432 quad 2 input IC (OR gate)
7400 quad 2 input IC (NAND gate)
7402 quad 2 input IC (NOR gate)
7486 quad 2 input IC (XOR gate)
747266 quad 2 input IC (XNOR gate)
7404 quad 2 input IC (NOT gate)

Software Used: Multisim by National Instruments.

Theory: Logic gates: -

A logic gate is a basic building block of a digital circuit


which can be used to carry out logical operations on
single or multiple binary inputs to get one binary
output.

Logic gates include AND gate, OR gate, NAND gate,


NOR gate, XOR gate, XNOR gate and NOT gate.

AND gate: -
The AND gate gives the output as 1 when all the inputs
are 1.
It gives the output as 0 in all other cases.
Symbol of a 2 input AND gate

Here, If A and B are the inputs and Y is the output,


then, Y=A.B

OR gate: -
The OR gate gives the output as 1 when at least one of
the inputs is 1.
It gives the output as 0 when all the inputs are 0.

Symbol of a 2 input OR gate


Here, If A and B are the inputs and Y is the output,
then, Y=A+B

NAND gate: -
The NAND gate gives the output as 1 when at least
one of the inputs is 0.
It gives the output as 0 when all inputs are 1.

Symbol of a 2 input NAND gate


Here, if A and B are the inputs and Y is the output,
then, Y= A . B

NOR gate: -
The NOR gate gives the output as 1 only when all the
inputs are 0.
It gives the output as 0 in all other cases.
Symbol of a 2 input NOR gate
Here, If A and B are the inputs and Y is the output,
then, Y= A+ B

XOR gate: -
A 2 input XOR gate gives the output as 1 only when
both the inputs are different.
It gives the output as 0 when both the inputs are
same.

Symbol of a 2 input XOR gate

then, Y=A⊕B= A B+ A B
Here, if A and B are the inputs and Y is the output,

XNOR gate: -
A 2 input XNOR gate gives the output as 1 when both
the inputs are same.
It gives the output as 0 when both the inputs are
different.

Symbol of a 2 input XNOR gate


Here, if A and B are the inputs and Y is the output,
then, Y=A⊙B= A . B+ A . B

NOT gate: -
The NOT gate provides the output as 1 when input is 0
and provides the output as 0 when the input is 1.

Symbol of a NOT gate


Here, if A is the input and Y is the output, then, Y= A
Combinational Circuits: -

The following are some of the examples of


combinational circuits that were verified in this
experiment:

Half-Adder Circuit: -
This circuit is used to perform the addition of 2 single
bits.
It has two outputs- sum and carry.
If A and B are the inputs, then the expressions of sum
and carry are-
sum=A⊕B
carry=A.B

Half-Subtractor Circuit: -
This circuit is used to perform the subtraction of 2
single bits.
It has two outputs- difference and borrow.
If A and B are the inputs, then the expressions of
difference and borrow are-
difference=A⊕B
borrow= A B

Full-Adder Circuit: -
This circuit is used to perform the addition of 3 single
bits.
It has two outputs- sum and carry.
If A, B and C are the inputs, then the expressions of
sum and carry are-
sum=A⊕B⊕C
carry=A.B+A.C+B.C

Full-Subtractor Circuit: -
This circuit is used to perform the subtraction of 3
single bits.
It has two outputs- difference and borrow.
If A, B and C are the inputs, then the expressions of
difference and borrow are-
difference=A⊕B⊕C
borrow= A .B+ A .C+B.C

Procedure: 1. Place 2 inputs say A and B in the workspace for the


verification of truth tables of the respective logic
gates, half-adder and half subtractor circuits. In case
of full-adder and full-subtractor circuits, place 3
inputs say A, B and C.
2. Place one or more logic gates as per the expression
of the output required in each case.
3. Connect the logic gates with the inputs as required
with the help of the wires in order to obtain the
output needed.
4. In case of logic gates, connect one LED to the output
with the help of a wire in order to interpret the
output. However, In case of the half-adder, half-sub-
-tractor, full-adder and full-subtractor circuits,
connect an LED to each output.
5. Connect the other end of all the LEDs to the ground.
6. Run the respective circuits and change the value of
the inputs to all possible combinations one by one,
thus, verify if the outputs obtained through the
circuit are same as that in the truth table.
Results/ AND gate Simulation: -
Observations:

Truth Table: -

Inputs
Output
A B
0 0 0
0 1 0
1 0 0
1 1 1
OR gate Simulation: -

Truth Table: -

Inputs
Output
A B
0 0 0
0 1 1
1 0 1
1 1 1

NAND gate Simulation: -


Truth Table: -

Inputs
Output
A B
0 0 1
0 1 1
1 0 1
1 1 0
NOR gate Simulation: -

Truth Table: -

Inputs
Output
A B
0 0 1
0 1 0
1 0 0
1 1 0
XOR gate Simulation: -

Truth Table: -

Inputs
Output
A B
0 0 0
0 1 1
1 0 1
1 1 0

XNOR gate Simulation: -


Truth Table: -

Inputs
Output
A B
0 0 1
0 1 0
1 0 0
1 1 1

NOT gate Simulation: -

Truth Table: -

Input
Output
A
1 0
0 1
Half-Adder Circuit Simulation: -

Truth Table: -

Inputs Outputs
A B Sum Carry
0 0 0 0
0 1 1 0
1 0 1 0
1 1 0 1
Half-Subtractor Circuit Simulation: -

Truth Table: -

Inputs Outputs
A B Difference Borrow
0 0 0 0
0 1 1 1
1 0 1 0
1 1 0 0

Full-Adder Circuit Simulation: -


Truth Table: -

Inputs Outputs
A B C Sum Carry
0 0 0 0 0
0 0 1 1 0
0 1 0 1 0
0 1 1 0 1
1 0 0 1 0
1 0 1 0 1
1 1 0 0 1
1 1 1 1 1
Full-Subtractor Circuit Simulation: -

Truth Table: -

Inputs Outputs
A B C Difference Borrow
0 0 0 0 0
0 0 1 1 1
0 1 0 1 1
0 1 1 0 1
1 0 0 1 0
1 0 1 0 0
1 1 0 0 0
1 1 1 1 1
Conclusion:

You might also like