Assignment : 1
LAB #2
NAME: LAIBA MARYAM
SAP ID: 64419
SUBMITTED TO: Mam Nayyab
Exercise Questions
AND Gate
1. State the behavior of AND Gate in words?
ANS.
And gate output will be at logic-1 if all inputs are at logic-1 . Otherwise , output will be at
logic-0.
2. What will be output of the AND Gate if one input is at logic - 0?
ANS.
The output will be logic-0 because the AND gate requires all inputs to be 1 for the output
to be 1.
3. What will be output of the AND Gate if it’s all input are at logic - 1?
ANS.
The output will be logic-1 because an AND gate produces 1 only when all inputs are 1.
4. Write the Boolean expression for 2-inputs AND-gate?
ANS.
The Boolean expression is:
A.B=F
5. Develop the truth table for AND Gate having 3-inputs. Also write Boolean
expression?
ANS.
Truth Table for 3-input AND Gate:
A B C F
0 0 0 0
0 0 1 0
0 1 0 0
0 1 1 0
1 0 0
0
1 0 1
0
1 1 0 0
1 1 1 1
Boolean Expression:
The Boolean expression is:
F=A⋅B⋅C
6. How many inputs should be kept at logic-0 to maintain the output of 3-input AND
gate at logic-0?
ANS.
At least one input should be at logic-0 to ensure the output remains logic-0.
OR GATE
1. State the behavior of OR gate in words?
ANS.
An OR gate outputs logic-1 if at least one of its inputs is logic-1 . It only outputs logic-0 when
all inputs are logic-0 .
2. What will be output of the OR gate if one input is at logic-0?
ANS.
If one input is logic-0, the output depends on the other input(s). If any other input is logic-1, the
output will be logic-1; otherwise, it will be logic-0.
3. What will be the output of OR gate if it’s all input are at logic-1?
ANS.
If all inputs are logic-1, the output of the OR gate will be logic-1.
4. Develop the truth table for an OR gate having 3-inputs. Also write Boolean expression?
ANS.
Truth Table for 3-input OR Gate:
A B C F
0 0 0 0
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
Boolean Expression:
The Boolean expression is:
F=A+B+C
NOT GATE
1. State the behavior of NOT gate in words?
ANS.
A NOT gate is a digital logic gate that inverts its input. It has only one input and produces an
opposite output:
If the input is 0 , the output is 1 .
If the input is 1 , the output is 0 .
2. Draw the truth table, procedure for an NOT gate.
ANS
Truth Table for NOT Gate:
A A`
0 1
1 0
The NOT gate is also called an inverter because it flips the input value