Khawaja Fareed University of Engineering &
Information Technology (KFUEIT) Rahim Yar Khan
List of Lab Experiments
Week Title of The Experiment
Week 01 Introduction to Basic Logic Gates and understand the operations of the logic gate circuit
constructed using DDL and TTL Logic
Week 02 Familiarization of logic gates using Digital ICs (TTL)
Week 03 Implementation of Boolean Functions
Week 04 Implement a given Boolean function by NOR & NAND gate
Week 05 (a): Operation and Designing of Half Adder
(b): Operation and Designing of Half Subtractor
Week 06 (a): Operation and Designing of Full Adder
(b): Operation and Designing of Full Subtractor
Week 07 (a): Binary to Gray code conversion
(b): Gray code to Binary conversion
Week 08 Mid Term Exam
Week 09 Minimization of Boolean functions by using K-MAP
Week 10 Designing and implementation of SR Latch
Week 11 Designing and implementation of SR Flip Flop
Week 12 Designing and implementation of D Flip
Week 13 Designing and Implementation of JK Flip Flop
Week 14 Designing and implementation of T Flip Flop
Week 15 Design of Encoder & Decoder
Week 16 Design of 4:1 Multiplexer and 1:4 De - Multiplexer
Week 17 Final Term Exam
Khawaja Fareed University of Engineering &
Information Technology (KFUEIT) Rahim Yar Khan
Department of Electrical Engineering
Instructor name: ____________________ Dated: ________________
Semester: __________________________ Session: _______________
EE-270L: Digital Logic Design
LAB1: Introduction to Basic Logic Gates and understand the operations of the
logic gate circuit constructed using DDL and TTL Logic.
Name Reg. No Report Viva Log book Total/20
Marks / 10 Marks / 5 /5
Khadija dilawar Cosc202101007
__________________________
Instructor Signature
Khawaja Fareed University of Engineering &
Information Technology (KFUEIT) Rahim Yar Khan
Khawaja Fareed University of Engineering &
Information Technology (KFUEIT) Rahim Yar Khan
Getting Started with Circuit Patching
Breadboard:
Breadboards are usually used for patching small circuits and prototypes. A typical
breadboard would look like this.
The internal connections are as shown below:
The points in ABCDE (and FGHIJ) grid are vertically connected as indicated by red circle. So all
5 points are actually the same point. It makes No difference whether you connect a wire on any
one of these points. The next vertical strip is a different point and so on. Whereas the upper and
lower grids are horizontally connected as indicated below. Each grid consists of 4 such separate
horizontal strips:
Khawaja Fareed University of Engineering &
Information Technology (KFUEIT) Rahim Yar Khan
EXPERIMENT NO. 01
Introduction to Basic Logic Gates and understand the operations of the
logic gate circuit constructed using DDL.
This Lab Activity has been designed to familiarize the beginning student to logic gates using
breadboard and testing of gates and logic circuits.
Important: Each group is required to bring a printout of this lab-handout at the start
of the Lab. The Pre-Lab Tasks are to be submitted separately at the start of the lab.
The first thing to know is what is truth table, operators and What are the gates
Next you will learn to plug diodes and LEDs in order to test how the gates designed by
them work. You will test various basic gates and come up with their
truth tables through this hands-on activity.
There are related questions at the end of this activity. Give complete answers.
Use diagrams if needed for clarity.
OBJECTIVES
Upon successful completion of this experiment, the student will be able to know
1. The basic gates and their operation
2. Verify the truth table of logic gates
Apparatus:
Sr. o Name Range/Value Quantity
Khawaja Fareed University of Engineering &
Information Technology (KFUEIT) Rahim Yar Khan
1. Power Supply 0-5V,1mA 1
2. Bread Board and Connecting Wires 1 set
3. LED, 1
4. Diodes 2
THEORY:
A logic gate is an elementary building block of a digital circuit. Most logic gates have two
inputs and one output. At any given moment, every terminal is in one of the two binary
conditions low (0) or high (1), represented by different voltage levels. The logic state of
a terminal can, and generally does, change often, as the circuit processes data. In most
logic gates, the low state is approximately zero voltage (0 V), while the high state is
approximately five volts positive (+5 V). The logic gates are given below.
AND GATE
The AND gate so named because, if 0 called “false” and 1 is called “true” , the gate acts
in the same way as the logic “and” operator. Logic diagram and truth-table of AND
GATE are shown below;
OR GATE
Logic diagram and truth-table of OR gate are shown below;
Khawaja Fareed University of Engineering &
Information Technology (KFUEIT) Rahim Yar Khan
NOT GATE
Logic diagram and truth-table of NOT GATE are shown below;
NAND GATE
Logic diagram and truth-table of NAND GATE are shown below;
Khawaja Fareed University of Engineering &
Information Technology (KFUEIT) Rahim Yar Khan
Khawaja Fareed University of Engineering &
Information Technology (KFUEIT) Rahim Yar Khan
NOR GATE
Logic diagram and truth-table of NOR GATE are shown below;
X-OR GATE
Logic diagram and truth-table of XOR GATE are shown below;
Khawaja Fareed University of Engineering &
Information Technology (KFUEIT) Rahim Yar Khan
Khawaja Fareed University of Engineering &
Information Technology (KFUEIT) Rahim Yar Khan
X-NOR GATE
Logic diagram and truth-table of XNOR GATE are shown below;
LAB TASK 1 & 2
1. Design the circuit of AND Gate using DDL on breadboard with 2 input.
2. Design the circuit of OR Gate using DDL on breadboard with 2 input.
Khawaja Fareed University of Engineering &
Information Technology (KFUEIT) Rahim Yar Khan
PROCEDURE
1. Insert diodes and LED in bread board as shown in AND gate circuit diagram.
2. Then insert 1kΩ and apply 5V vcc as shown in circuit diagram.
3. By applying 5v vcc and ground as 1 and 0 respectively.
4. Verify its AND operation truth table by applying logic 0 and logic 1 in its both of
inputs as given in following table and check output of each gate LED.
5. Insert diodes in bread board as shown in OR gate circuit diagram
6. By applying 5v vcc and ground as 1 and 0 respectively.
7. Verify its AND operation by applying logic 0 and logic 1 in its both of input
as given in following table and check output of each gate LED.
Truth Table of AND GATE
A B F = AB F = AB
Theoretica Practical
l
0 0 0 0
0 1 0 0
1 0 0 0
1 1 1 1
Khawaja Fareed University of Engineering &
Information Technology (KFUEIT) Rahim Yar Khan
Truth Table of OR GATE
A B F = F =
A+B A+B
Theore Prac
tical tical
0 0 0 0
Khawaja Fareed University of Engineering &
Information Technology (KFUEIT) Rahim Yar Khan
1 0 1 1
0 1 1 1
1 1 1 1
LAB Assignment 1
What are the Universal Gates and why we called them Universal Gates? (Marks 5)
Answer: The NAND gate and the NOR gate can be said to be universal gates since
combinations of them can be used to accomplish any of the basic operations and can
thus produce an inverter, an OR gate or an AND gate.
CONCLUSION AND DISCUSSION :
In this lab we understand the functioning and operations of AND gate and OR gate by
making by making project on proteus simulation software.
Department of Electrical Engineering
Khawaja Fareed University of Engineering &
Information Technology (KFUEIT) Rahim Yar Khan
Instructor name: ____________________ Dated: ________________
Semester: __________________________ Session: _______________
EE-270L: Digital Logic Design
LAB 2: Familiarization of logic gates using Digital ICs (TTL)
Name Reg. No Report Viva Marks Log book Total/20
Marks / 10 /5 /5
Khadija dilawar Cosc202101007
__________________________
Instructor Signature
Khawaja Fareed University of Engineering &
Information Technology (KFUEIT) Rahim Yar Khan
Lab:02 Familiarization of logic gates using Digital ICs (TTL)
This Lab Activity has been designed to familiarize the beginning student to logic gates and IC
chips, using breadboard and testing of gates and logic circuits.
Important: Each group is required to bring a printout of this lab-handout at the
start of the Lab. The Pre-Lab Tasks are to be submitted separately at the start of
the lab.
The first thing to know is about the ICs and their Logic Families. What are the gates
And pin numbers on the chip for gate inputs/outputs, Vcc, and GND so that you can
run wires to connect them as needed.
Next you will learn to plug ICs in order to test how the gates inside them work.
You will test various basic gates (using correct chip numbers) and come up with their
truth tables through this hands-on activity.
There are related questions at the end of this activity. Give complete answers.
Use diagrams if needed for clarity.
OBJECTIVES
Upon successful completion of this experiment, the student will be able to know
1. Verify the truth table of logic gates using ICs (TTL)
Apparatus:
Sr. no Name Range/Value Quantity
1. Power Supply 0-5V,1mA 1
2. Bread Board and Connecting 1 set
Wires
3. Light Emitting Diode (LED) 1
4. ICs 7400, 7404, 7408, 7432 1 each
IC Placement on Breadboard
Khawaja Fareed University of Engineering &
Information Technology (KFUEIT) Rahim Yar Khan
A typical 14 pin IC placement on such a bread board is shown below:
The upper and lower horizontal strips are normally served for power (+5V) and ground (0V)
respectively. But it is not necessary to do so.
Khawaja Fareed University of Engineering &
Information Technology (KFUEIT) Rahim Yar Khan
Never place any IC such that its opposite pins are within (connected to) the same Node
on the same grid.
1. Make sure the power supply is switched off while you are patching the circuit.
2. Make a neat schematic diagram clearly mentioning the IC numbers, PIN configurations
and connections between different ICs.
3. Place the IC(s) such that the Notch is towards the left.
4. Provide the ground connection(s) by connecting the GND pin(s) of the IC(s) with the help
of jumping wires. Make sure that all the ICs are properly grounded.
5. Provide the VDD or operating voltage to each IC by connecting its VDD (or VCC)
terminal to +5V of power supply.
6. Patch the circuit as per the schematic.
Khawaja Fareed University of Engineering &
Information Technology (KFUEIT) Rahim Yar Khan
7. Connect the output of your circuit to the LEDs on bread board.
8. Observe the output of your circuit against different inputs and record them in the truth
table.
9. Compare with theoretical values and debug the circuit if needed.
10. Show your work for each lab task to your Lab Instructor.
11. Give your observations and conclusion.
Pre-Lab Tasks:
1. Read the topic Integrated Circuits from your course book and answer the following
questions: (1 Mark)
Digital ICs can be categorized according to the complexity of their circuits usually termed as
scale integration. The following are the four major categories. Give their full names and range of
gates available in each of them.
SSI
In SSI (Small Scale Integration ) —10–100 transistors/chip or 3 - 30 gates /chip(logic
gates ,flip flops)
MSI
In MSI(Medium Scale Integration ) —100–1000 transistors/chip or 30 - 300 gates
/chip(counters, multiplexers, registers)
LSI
In LSI(Large Scale Integration ) —1000–10,000 transistors/chip or 300 - 3000 gates
/chip(8 bit processors)
VLSI
In VLSI( Very Large Scale Integration ) —10,000–1,00,000 transistors/chip or more
than 3000 gates /chip.(16 bit and 32 bit processors)
1. LAB Assignment 2
(5 Marks)
Mention the full name of following IC with the help of its datasheet and explain the naming
convention (You should be able to get this information from internet).
Quad 2-Input AND Gates SN74 LS08P
Khawaja Fareed University of Engineering &
Information Technology (KFUEIT) Rahim Yar Khan
SN = Standard Prefix of TEXAS INSTRUMENT
Quad = refers to 4 AND gates
74 = refers to commercial grade IC
LS = S means Low Power Schottky
P = Plastic Dual in-Line Package
08 = 8 refers to AND gate
THEORY:
TTL is notable for being a widespread integrated circuit (IC) family used in many
applications such as computers, industrial controls, test equipment and instrumentation,
consumer electronics, synthesizers, etc. The designation TTL is sometimes used to mean TTL-
compatible logic levels, even when not associated directly with TTL integrated circuits, for
example as a label on the inputs and outputs of electronic instruments
TTL became the foundation of computers and other digital electronics. Even after much larger
scale integrated circuits made multiple-circuit-board processors obsolete, TTL devices still found
extensive use as the "glue" logic interfacing more densely integrated components. TTL devices
were originally made in ceramic and plastic dual-in-line (DIP) packages, and flat-pack form. TTL
chips are now also made in surface-mount packages. Successors to the original bipolar TTL
logic often are interchangeable in function with the original circuits, but with improved speed or
lower
power dissipation.
IC Pin configuration:
TOP VIEW
Most of the ICs have a Notch (or sometimes a dot) to denote the start of the PIN numbering.
Place the IC such that the Notch is on left side, then the lower left PIN is numbered 1 and the
numbering continues in the anticlockwise direction.
Khawaja Fareed University of Engineering &
Information Technology (KFUEIT) Rahim Yar Khan
Datasheet:
The information about any IC (its number of pins and gates inside it) can be found by simply
searching by its name on internet. The document containing information about the IC is called
its datasheet. Different manufacturers of these chips have this information on their sites.
1. Show the correct pin numbering and connection of gates inside these blank chips with
the help of their datasheets.
Khawaja Fareed University of Engineering &
Information Technology (KFUEIT) Rahim Yar Khan
Lab Task (10 Marks)
Verify the functioning of the following ICs and verify their truth table:
7408 Quadruple 2-input AND gates
7432 Quadruple 2-input OR gates
2-input NOR gates
Khawaja Fareed University of Engineering &
Information Technology (KFUEIT) Rahim Yar Khan
7400 Quadruple 2-input NAND gates
PROCEDURE
2. Insert inverter IC (7404) in bread board
3. Apply Vcc +5V to pin number 14 and connect pin number 7 to ground
4. Verify its inverter operation by applying 0 and 1 on input of each gate and connect the
output of each inverter to a LED
5. Verify the given truth table
6. Insert AND gate IC (7408 2-input Quad) in bread board
7. Apply Vcc +5V to pin number 14 and connect pin number 7 to ground
8. Verify its AND operation by applying logic 0 and logic 1 in its both of input as given in
following table and check output of each gate LED
9. Verify the given table
10. Insert OR gate IC (7432 2-input Quad) in the bread board
11. Apply Vcc +5V to pin number 14 and connect pin number 7 to ground
12. Verify its OR operation by applying logic 0 and logic 1 in its both of input as given in
following table and check output of each gate LED
13. Verify the given truth table
14. Insert NAND gate IC (7400 2-input Quad) in the bread board
15. Apply Vcc +5V to pin number 14 and connect pin number 7 to ground
16. Verify its NAND operation by applying logic 0 and logic 1 in its both of input as given in
following table and check output of each gate LED
Khawaja Fareed University of Engineering &
Information Technology (KFUEIT) Rahim Yar Khan
17. Verify the given truth table
Boolean
Sr. Logic Gate Symbol Expression Truth Table
No. and IC No.
7404 Hex A F
1 Inverter
Not Gates 0 1
F = A̅
1 0
7432 A B F
Quadruple 0 0 0
2-input
OR Gates
F=A+B 0 1 1
2
1 0 1
1 1 1
7408 A B F
Quadruple 0 0 0
3 2-input
AND
F = A.B 0 1 0
Gates 1 0 0
1 1 1
7400 A B F
Quadruple
2-input 0 0 1
4 NAND F = A.B 0 1 1
gates 1 0 1
1 1 0
Table-3 Logic Operations of different gates with Truth Tables
CONCLUSION AND DISCUSSION :
In this lab we understand the functioning of AND, OR, NOT, NOR, and NAND gates.
Khawaja Fareed University of Engineering &
Information Technology (KFUEIT) Rahim Yar Khan
Department of Electrical Engineering
Instructor name: ____________________ Dated: ________________
Semester: __________________________ Session: _______________
EE-270L: Digital Logic Design
LAB 3: Implementation of Boolean Functions
Name Reg. No Report Viva Marks Log book Total/20
Marks / 10 /5 /5
Khawaja Fareed University of Engineering &
Information Technology (KFUEIT) Rahim Yar Khan
Khadija dilawar Cosc202101007
__________________________
Instructor Signature
Lab3: Implementation of Boolean Functions
This lab is hardware implementation of a Boolean function given to you.
Make sure each of your tasks is marked / signed by Instructor/TA. Unmarked tasks will be
awarded zero credit.
You have to submit this lab-handout at the end of lab. No late submissions will be accepted.
There are related questions at the end of this activity. Give complete answers.
Use diagrams if needed for clarity.
Pre-Lab Tasks: (To be done before coming to the lab)
1. What do you mean by Boolean functions? Give an example of 3 variable
Boolean function and also list its truth table.
Khawaja Fareed University of Engineering &
Information Technology (KFUEIT) Rahim Yar Khan
In mathematics and logic, a Boolean function is a function whose arguments,
as well as the function itself, assume values from a two-element set (usually
{0,1} or {true, false}.
2. A Boolean function with N input variables requires how many entries in truth
table?
For the case of Boolean variables, there are really only 22n combinations.
Either a particular combination out of the 2 n entries in a truth table is true, or
false
Khawaja Fareed University of Engineering &
Information Technology (KFUEIT) Rahim Yar Khan
OBJECTIVES
Upon successful completion of this experiment, the student will be able to know
1. The circuit connections
2. Verify the operation and truth table of the given function
Apparatus:
Sr.No Name Range/Value Quantity
1. Power Supply 0-5V,3A 1
2. Bread Board and Connecting Wires 1 set
3. LED
4. ICs (AND,OR and NOT) 2 input Quad 7408,7432 and7404 Each 1
Lab task 1, 2
1. Implement the following function using the ICs provided. Make the truth table from
the circuit and then match it with the truth table obtained by implementing the circuit
in the hardware.
F = X’Y + XY’
PROCEDURE
1. Insert OR gate IC (7432 2-input Quad) in the bread board
2. Apply Vcc +5V to pin number 14 and connect pin number 7 to ground
Khawaja Fareed University of Engineering &
Information Technology (KFUEIT) Rahim Yar Khan
3. Verify its OR operation by applying logic 0 and logic 1 in its both of input and check
output of each gate LED
4. Insert AND gate IC (7408 2-input Quad) in the bread board
5. Apply Vcc +5V to pin number 14 and connect pin number 7 to ground
6. Verify its AND operation by applying logic 0 and logic 1 in its both of input and check
output of each gate LED
7. Insert NOT gate IC (7404 2-input Quad) in the bread board
8. Apply Vcc +5V to pin number 14 and connect pin number 7 to ground
9. Verify its NOT operation by applying logic 0 and logic 1 in its input and check output
of each gate LED
10. Connect the circuit on bread board as shown in above
11. Fill the following truth tableVerify the given truth table
Table of F = X’Y + XY’
Input Input Y F(theoretical) F (practical)
0 0 0 0
0 1 1 1
1 0 1 1
1 1 0 0
Khawaja Fareed University of Engineering &
Information Technology (KFUEIT) Rahim Yar Khan
12. Implement the following function using the ICs provided. Make the truth table from
the circuit and then match it with the truth table obtained by implementing the circuit
in the hardware.
F = AB + BC (B + C)
Table of F = AB + BC (B + C)
Khawaja Fareed University of Engineering &
Information Technology (KFUEIT) Rahim Yar Khan
A B C F(theoretical) F (practical)
0 0 0 0 0
0 0 1 0 0
0 1 0 0 0
0 1 1 0 1
1 0 0 0 0
1 0 1 0 0
1 1 0 1 1
1 1 1 1 1
1. Give the complete schematic diagram. Give the expression of the above function. Do
you recognize this function?
Khawaja Fareed University of Engineering &
Information Technology (KFUEIT) Rahim Yar Khan
2. Implement the function you mentioned in your Pre-Lab Task1.Give schematic diagram.
CONCLUSION AND DISCUSSION :
In this lab tasks we come to know about making The circuit connections
and Verify the operations and truth table of the given functions
Khawaja Fareed University of Engineering &
Information Technology (KFUEIT) Rahim Yar Khan
Department of Electrical Engineering
Instructor name: ____________________ Dated: ________________
Semester: __________________________ Session: _______________
EE-270L: Digital Logic Design
LAB 04: Implement a given Boolean function by NOR & NAND
gate
Name Reg. No Report Viva Marks Log book Total/20
Marks / 10 /5 /5
Khadija dilawar
Cosc202101007
__________________________
Instructor Signature
Khawaja Fareed University of Engineering &
Information Technology (KFUEIT) Rahim Yar Khan
Khawaja Fareed University of Engineering &
Information Technology (KFUEIT) Rahim Yar Khan
Lab 04: Implement a given Boolean function by NOR & NAND gate
This Lab Activity has been designed to understand the circuit designing of Boolean function
implemented by using universal gates (NAND, NOR)
Important: Each group is required to bring a printout of this lab-handout at the start
of the Lab. The Pre-Lab Tasks are to be submitted separately at the start of the lab.
The first thing to know is, what universal gates are.
Next you will learn the designing and implementation of Boolean function using NOR
gate.
Next you will learn the designing and implementation of Boolean function using NOR gate.
OBJECTIVES
Upon successful completion of this experiment, the student will be able to know
1. The NOR Implementation
2. To convert a given Boolean function into NOR logic
Apparatus:
Sr.No Name Range/Value Quantity
1. Power Supply 0-5V,3A 1
2. Bread Board and Connecting Wires 1 set
3. LED
4. ICs (AND,OR,NOR ,NAND and NOT) 2 7408,7432,7402,7400 Each 1
input Quad and7404
THEORY:
Digital circuit are more frequently constructed with NAND or NOR than with AND
and OR gates. NAND and NOR gates are easier to fabricate with electronic
components and are the basic gates used in all IC digital logic families to fabricate
with electronic components and are the basic gates used in all IC digital logic
families.
Lab Task 1, 2
Implement the following Boolean function using universal gate (NOR, NAND)
Khawaja Fareed University of Engineering &
Information Technology (KFUEIT) Rahim Yar Khan
1. Implement following function using NOR GATE
F = (A + B).C’
2. Implement following function using NAND GATE
F = AB + CD’
Figure 4.1: Circuit diagram using NOR universal gate (F=(A + B).C)
A B C A + B F= (A+B).C F= (A+B).C
Theoretical Practical
0 0 0 0 0 0
0 0 1 0 0 O
0 1 0 1 0 0
0 1 1 1 1 1
1 0 0 1 0 0
1 0 1 1 1 1
1 1 0 1 0 0
1 1 1 1 1 1
Table 4.1: Boolean function using NOR gate (universal gate)
Khawaja Fareed University of Engineering &
Information Technology (KFUEIT) Rahim Yar Khan
A B C A + B F= AB + CD’ F= AB + CD’
Theoretical Practical NOR Universal Gate
0 0 0 0 0 0
0 0 0 1 0 0
0 0 1 0 1 1
0 0 1 1 0 0
0 1 0 0 0 0
0 1 0 1 0 0
0 1 1 0 1 0
0 1 1 1 0 0
1 0 0 0 0 0
1 0 0 1 0 0
1 0 1 0 1 1
1 0 1 1 0 0
1 1 0 0 1 1
1 1 0 1 1 1
1 1 1 0 1 1
1 1 1 1 1 1
Table 4.2: Boolean function using NAND gate (universal gate)
Khawaja Fareed University of Engineering &
Information Technology (KFUEIT) Rahim Yar Khan
Figure 4.2: Circuit diagram using NAND universal gate (F=AB+CD’)
PROCEDURE
1. Insert OR gate IC (7432 2-input Quad) in the bread board
2. Apply Vcc +5V to pin number 14 and connect pin number 7 to ground
3. Verify its OR operation by applying logic 0 and logic 1 in its both of input and check
output of each gate LED
4. Insert AND gate IC (7408 2-input Quad) in the bread board
5. Apply Vcc +5V to pin number 14 and connect pin number 7 to ground
6. Verify its AND operation by applying logic 0 and logic 1 in its both of input and check
output of each gate LED
7. Insert NOT gate IC (7404 2-input Quad) in the bread board
8. Apply Vcc +5V to pin number 14 and connect pin number 7 to ground
9. Verify its NOT operation by applying logic 0 and logic 1 in its input and check output
of each gate LED
10. Connect the circuit on bread board as shown in above
11. Fill the above truth tables of given Boolean functions
Khawaja Fareed University of Engineering &
Information Technology (KFUEIT) Rahim Yar Khan
NAND Universal gate
1. What are the Boolean functions?
A Boolean function is a function that has n variables or entries, so it has 2n
possible combinations of the variables. These functions will assume only or 1 in
its output. An example of a Boolean function is this,f(a,b,c) = a.b +c These
functions are implemented with the logic gates.
2. is it possible to implement all Boolean function by using universal gates
only if yes the give some examples?
Yes. Universal Logic gates can be used to produce any other logic or
Boolean function with the NAND and NOR gates being minimal.
Khawaja Fareed University of Engineering &
Information Technology (KFUEIT) Rahim Yar Khan
CONCLUSION AND DISCUSSION :
In this lab we understand The NOR and NAND Implementation and To convert a given Boolean
function into NOR and NAND logic.