Half Adder, Full Adder and Subtractor - Code

Latest

programs

Wednesday, October 12, 2011

Half Adder, Full Adder and Subtractor



Half Adder, Full Adder and Subtractor

AIM:  To construct and verify the truth tables of

1.      Half Adder
2.      Half Subtractor
3.      Full Adder
4.      Full Subtractor

using logic gates.

APPARATUS REQUIRED:
1.      Half/Full Adder/Subtractor trainer kit
2.      Regulated power supply
3.      Connecting wires.
4.      Patch cords.

Circuit diagram for Half adder:








Procedure:
Two input half adder:
  1. X1 and X2 are two logic bits, X1 is MSB and X2 is LSB.
  2. Connect the circuit as shown in figure 1.
  3. Connect X1 and X2 to the logic input switches.
  4. Set up data in X1 and X2 by means of the input switches and fill up the table 1.
  5. Verify the result with the theoretical values.


Truth Table:







Circuit diagram for Half subtractor:








Procedure:
Two input half subtractor:
  1. X1 and X2 are two logic bits, X1 is MSB and X2 is LSB.
  2. Connect the circuit as shown in figure 2.
  3. Connect X1 and X2 to the logic input switches.
  4. Set up data in X1 and X2 by means of the input switches and fill up the table 2.
  5. Verify the result with the theoretical values.
Truth Table:





Circuit diagram for Full adder:








Procedure:
Three input full adder: X1 and X2 are two logic inputs and Cin is the carry input to find the sum S and carry C outputs for all combinations of X1, X2, and Cin.
  1. Connect X1, X2 and Cin to three data input switches.
  2. Connect OR gate output and EX-OR gate output to output status.
  3. Connect the circuit as shown in figure 3.
  4. Set up data in X1, X2, and Cin by means of the input switches and fill up the table 3.
  5. Verify the result with the theoretical values.

Truth Table:










Circuit diagram for Full subtractor:








Procedure:
Three input full subtractor: X1 and X2 are two logic inputs and Bin is the borrow input to find the difference D and borrow B outputs for all combinations of X1, X2, and Bin.
  1. Connect X1, X2 and Bin to three data input switches.
  2. Connect OR gate output and EX-OR gate output to output status.
  3. Connect the circuit as shown in figure 4.
  4. Set up data in X1, X2, and Bin by means of the input switches and fill up the table 4.
  5. Verify the result with the theoretical values.

Truth Table:







Result:
> -b� - e �� H � ys'>

NAND gate:










Realization of OR, AND, NOT, NOR gates by NAND gates
OR gate:







AND gate:






NOT gate:











NOR gate:








Procedure:
  1. Connect the trainer as shown in figures.
  2. Verify the working of OR gate, AND gate, NOT gate, NAND gate and NOR gate with the help of truth tables given.

Result:

No comments:

Post a Comment