Logic Experiments
Logic Experiments
F = X . Y = XY
Note:
- Logic (0) means zero voltage (Ground).
- Logic (1) means 5 voltage (Vcc).
- Inputs should be connected to the D I/O pins in the Elvis board.
- Outputs should be connected to the LEDs.
2- OR Logic Gate:
F=X+Y
3- NOT Logic Gate:
Connect the NOT gate and complete the following truth table
F=X
4- NAND Logic Gate:
Connect the NAND gate and complete the following truth table
F = XY
5- NOR Logic Gate:
Connect the NOR gate and complete the following truth table
F=X+Y
6- XOR Logic Gate:
Connect the XOR gate and complete the following truth table
F=X+Y
Experiment 2
Implementation of the logic functions
Objective
- Implement a logic function using AND, OR gates.
Example 1:
- Implement the following function, and complete the following truth table
F = AB + CD
- Implement the following function, and complete the following truth table.
F2 = xy’ + x’z
1st Input (X) 2nd Input (Y) 3rd Input (Z) Output (F2)
0 0 0
0 0 1
0 1 0
0 1 1
1 0 0
1 0 1
1 1 0
1 1 1
Experiment 3
Binary Addition (Half Adder and Full Adder)
Objective
- Implement Half Adder, and Full Adder using AND, XOR, NOT and OR gates, then
obtain the truth table for each circuit.
1- Half Adder
- Implement the Half Adder Circuit and obtain its truth table.
S=X+Y
C = XY
1st Input (X) 2nd Input (Y) Carry (C) Sum (S)
0 0
0 1
1 0
1 1
2- Full Adder
Requirements:
1- A chip of 7408 – AND Logic Gate
2- A chip of 7432 – OR Logic Gate
3- A chip of 7404 – NOT Logic Gate / Inverter
4- A chip of 7486 – Exclusive OR (XOR) Logic Gate
- Implement the Full Adder Circuit and obtain its truth table.
S = (X + Y) + Cin
Cout = ((X + Y) . Cin) + (X . Y)
1st Input (X) 2nd Input (Y) 3rd Input (Cin) Cout S
0 0 0
0 0 1
0 1 0
0 1 1
1 0 0
1 0 1
1 1 0
1 1 1
Experiment 4
4-bit parallel adder/subtractor
Objective
- Obtain the working of 4-bit parallel adder chip, and how it can perform a
subtraction.
Note:
- If M = 0 ➔ S = A+B
- If M = 1 ➔ S = A-B and drop the carry in case of subtraction.
Experiment 5
Flip Flops
Objective
- Obtain the truth table of JK-flip flop, T-flip flop and D-flip flop.
Note:
- To perform D Flip-Flop using J-K Flip-Flop just put an inverter between the two
inputs J and K.
- To perform T Flip-Flop using J-K Flip-Flop just connect the two inputs J and K to the
same switch.
Perform the required connections and complete the following truth table of D Flip-
Flop:
D Q(t+1)
0
1
Perform the required connections and complete the following truth table of T Flip-
Flop:
T Q(t+1)
0
1
Experiment 6
Part 1: Priority Encoder
Objective
- Verify the truth table of the active low output priority encoder with active low input.
Objective
- Verify the truth table of the 3-to-8 active low output line Decoder.
Inputs Outputs
G1 C B A LED7 LED6 LED5 LED4 LED3 LED2 LED1 LED0
0 X X X 1 1 1 1 1 1 1 1
1 0 0 0 1 1 1 1 1 1 1 0
1 0 0 1 1 1 1 1 1 1 0 1
1 0 1 0 1 1 1 1 1 0 1 1
1 0 1 1 1 1 1 1 0 1 1 1
1 1 0 0 1 1 1 0 1 1 1 1
1 1 0 1 1 1 0 1 1 1 1 1
1 1 1 0 1 0 1 1 1 1 1 1
1 1 1 1 0 1 1 1 1 1 1 1
Experiment 7
Part 1: Multiplexer
Objective
- Verify the truth table of the 8-to-1 Multiplexer.
Objective
- Verify the truth table of the 1 – 8 Demultiplexer.
Inputs Outputs
G1 C B A LED7 LED6 LED5 LED4 LED3 LED2 LED1 LED0
0 X X X 1 1 1 1 1 1 1 1
1 0 0 0 1 1 1 1 1 1 1 0
1 0 0 1 1 1 1 1 1 1 0 1
1 0 1 0 1 1 1 1 1 0 1 1
1 0 1 1 1 1 1 1 0 1 1 1
1 1 0 0 1 1 1 0 1 1 1 1
1 1 0 1 1 1 0 1 1 1 1 1
1 1 1 0 1 0 1 1 1 1 1 1
1 1 1 1 0 1 1 1 1 1 1 1
Experiment 8
Part 1: Up Counter
Objective
- Using J-K Flip-Flop Design a counter to count from (0 → 3)10.
Procedures:
- Perform the below circuit.
Objective
- Using J-K Flip-Flop Design a counter to count from (3 → 0)10.
Procedures:
- Perform the below circuit.