Report
Report
by
Submitted to
INDIA
Jan-June 2021
Assignment-3B
THEORY-
Logic gates are the basic building blocks of any digital system. They are important digital
devices that are mainly based on a Boolean function. Logic gates are used to carry out logical
operations on single or multiple binary inputs and give one binary output. In simple terms,
logic gates are the electronic circuits in a digital system. There are seven basic logic gates:
AND, OR, XOR, NOT, NAND, NOR, and XNOR.
• AND GATE: An AND gate is a logic gate having two or more inputs and a single
output. It gives a High output (1) only if all its inputs are high. A dot (.) is used to
show the AND operation. i.e. A.B
• NOT GATE- A NOT gate is a logic gate that inverts the digital input signal. It is the
most basic of all the logical gates and is often referred to as an Inverting Buffer or
simply an Inverter.
• NAND GATE- The Logic NAND Gate is a combination of a digital logic AND gate
and a NOT gate connected together in series. The output of a NAND gate is high
when either of the inputs is high or if both the inputs are low.
• OR GATE- The Logic OR Gate is a type of digital logic circuit whose output goes
HIGH to a logic level 1 only when one or more of its inputs are HIGH.
• XOR GATE- The Exclusive-OR logic function is a very useful circuit that can be
used in many different types of computational circuits. The output of an Exclusive-
OR gate only goes High when its two input terminals are at different logic levels with
respect to each other.
TRUTH TABLE:
A B C Y
0 0 0 1
0 0 1 1
0 1 0 1
0 1 1 1
1 0 0 1
1 0 1 1
1 1 0 1
1 1 1 1
CODE-
void setup() {
Serial.begin(9600);
void loop() {
delay(1000);
delay(1000);
while(Serial.available()==0){}
int x=Serial.parseInt();
delay(1000);
Serial.println(x);
Serial.read();
delay(1000);
while(Serial.available()==0){}
int y=Serial.parseInt();
delay(1000);
Serial.println(y);
Serial.read();
delay(1000);
Serial.print("Enter value of C:\t ");
while(Serial.available()==0){}
int z=Serial.parseInt();
delay(1000);
Serial.println(z);
delay(4000);
RESULT-