logic gates and digital electronics

Semiconductor Electronics Notes

Logic Gates and Digital Electronics

Premium Physics notes covering binary numbers, Boolean algebra, logic gates, synchronized timing diagrams, universal gates, logic circuits, numericals and exam-style questions.

Truth Table ReadyAll important one-input and two-input gate tables are included with clear Boolean expressions.
Correct Gate SymbolsOR, AND, NOT, NAND, NOR, XOR and XNOR gate symbols are drawn as editable inline SVG diagrams.
Exam FocusedIncludes CBSE, NEET, JEE Main, JEE Advanced, IB and IGCSE style solved practice.

Need Personal Guidance?

If any topic in Semiconductor Electronics, Logic Gates or Digital Electronics is not clear, students may contact Kumar Sir for one-to-one online Physics classes.

1. Binary Number System

Digital electronics uses two stable states represented by 0 and 1. A binary digit is called a bit. A group of bits can represent numbers, instructions and logical states.

Decimal and Binary Systems

SystemBaseDigitsPlace Values
Decimal100 to 9100, 101, 102
Binary20 and 120, 21, 22
Binary to decimal: (1011)2 = 1×23 + 0×22 + 1×21 + 1×20 = 11

Worked Conversions

Decimal to binary: Divide by 2 repeatedly and read remainders from bottom to top.

Example: (13)10 = (1101)2.

Binary to decimal: Multiply each bit by its place value.

Example: (11010)2 = 16 + 8 + 0 + 2 + 0 = (26)10.

Binary Addition and Subtraction

OperationRuleExample
Addition0+0=0, 0+1=1, 1+1=10, 1+1+1=111011 + 0011 = 1110
Subtraction0-0=0, 1-0=1, 1-1=0, 10-1=1 with borrow1010 - 0011 = 0111

Worked Example 1

Question: Convert (45)10 into binary.

Solution: 45 = 32 + 8 + 4 + 1 = 25 + 23 + 22 + 20.

Final Answer: (45)10 = (101101)2.

Exam Tip: Check by adding place values again.

Worked Example 2

Question: Add (1011)2 and (0110)2.

Solution: 1011 + 0110 = 10001.

Final Answer: (10001)2.

Exam Tip: Remember 1 + 1 gives 0 with carry 1.

2. Boolean Algebra

Boolean algebra deals with variables that can take only two values: 0 or 1. These values can represent OFF/ON, LOW/HIGH or FALSE/TRUE.

OR Operation

Output is 1 if at least one input is 1.

Expression: Y = A + B

AND Operation

Output is 1 only if all inputs are 1.

Expression: Y = A.B

NOT Operation

Output is the complement of input.

Expression: Y = Ā

Important Boolean Laws

LawOR FormAND Form
IdentityA + 0 = AA.1 = A
NullA + 1 = 1A.0 = 0
IdempotentA + A = AA.A = A
ComplementA + Ā = 1A.Ā = 0
CommutativeA + B = B + AA.B = B.A
AssociativeA + (B + C) = (A + B) + CA.(B.C) = (A.B).C
DistributiveA + B.C = (A + B).(A + C)A.(B + C) = A.B + A.C

De Morgan's Theorems

First theorem: (A + B)̄ = Ā.B̄
Second theorem: (A.B)̄ = Ā + B̄

Solved Problem

Question: Simplify A + A.B.

Solution: A + A.B = A(1 + B) = A.1 = A.

Final Answer: A.

Gate Symbols, Expressions and Truth Tables

Logic gates are electronic circuits that perform Boolean operations. The following sections show correct symbols, Boolean expressions, truth tables and timing diagrams.

3. OR Gate

ABY OR Gate: Y = A + B Input AInput BOutput Y
Boolean expression: Y = A + B
ABY
000
011
101
111

Real-life logic: A room light turns ON if switch A or switch B is ON.

PYQ-style: Draw the truth table of an OR gate and state its Boolean expression.

4. AND Gate

ABYAND Gate: Y = A.B Input AInput BOutput Y
Boolean expression: Y = A.B
ABY
000
010
100
111

Logic: Output is HIGH only when both inputs are HIGH.

Numerical: If A = 1 and B = 0, then Y = 0.

5. NOT Gate

AYNOT Gate: Y = Ā Input AOutput Y
Boolean expression: Y = Ā
AY
01
10

Logic: The NOT gate inverts the input signal.

PYQ-style: A NOT gate changes HIGH to LOW and LOW to HIGH.

6. NAND Gate

ABYNAND Gate: Y = (A.B)̄ Input AInput BOutput Y
Boolean expression: Y = (A.B)̄
ABY
001
011
101
110

Logic: NAND output is LOW only when both inputs are HIGH.

7. NOR Gate

ABYNOR Gate: Y = (A + B)̄ Input AInput BOutput Y
Boolean expression: Y = (A + B)̄
ABY
001
010
100
110

Logic: NOR output is HIGH only when both inputs are LOW.

8. XOR Gate

ABYXOR Gate: Y = Ā.B + A.B̄ Input AInput BOutput Y
Boolean expression: Y = A ⊕ B = Ā.B + A.B̄
ABY
000
011
101
110

Logic: Output is HIGH when inputs are different.

9. XNOR Gate

ABYXNOR Gate: Y = (A ⊕ B)̄ Input AInput BOutput Y
Boolean expression: Y = (A ⊕ B)̄ = A.B + Ā.B̄
ABY
001
010
100
111

Logic: Output is HIGH when inputs are the same.

10. Universal Gates

NAND and NOR gates are called universal gates because any basic logic gate can be made using only NAND gates or only NOR gates.

NAND Gate as Universal Gate

NOT using NAND

A

A NAND A = Ā.

AND using NAND

NANDNOTABA.B

((A.B)̄)̄ = A.B.

OR using NAND

NOTNOTNANDABA+B

A + B = (Ā.B̄)̄.

NOR Gate as Universal Gate

NOT using NOR

NORA

A NOR A = Ā.

OR using NOR

NORNOTABA+B

((A+B)̄)̄ = A+B.

AND using NOR

NOTNOTNORABA.B

A.B = (Ā + B̄)̄.

11. Logic Circuits

Logic circuit analysis means finding the output expression and truth table for a combination of gates.

Example Circuit

AND OR AND ABABY

Output Determination

Top gate output = A.B.

Bottom gate output = A + B.

Final output = (A.B).(A + B).

Simplification: Y = A.B.(A + B) = A.B
ABY
000
010
100
111

Numericals, PYQs and Case Studies

CBSE Style: Truth Table

Question: Write the truth table for Y = Ā + B.

Solution: Evaluate Ā first, then OR with B.

ABY
0011
0111
1000
1101

Exam Tip: Do complement columns first.

NEET Style: Gate Identification

Question: A two-input gate gives output 1 only when both inputs are 0. Identify the gate.

Solution: This is the truth table of NOR gate.

Final Answer: NOR gate.

Exam Tip: “Only 00 gives 1” means NOR.

JEE Main Style: Simplification

Question: Simplify Y = A.B + A.B̄.

Solution: Y = A(B + B̄) = A.1 = A.

Final Answer: Y = A.

Exam Tip: Use B + B̄ = 1.

JEE Advanced Style: XOR

Question: For XOR gate, output is 1 for which input combinations?

Solution: XOR output is 1 when inputs are unequal.

Final Answer: 01 and 10.

Exam Tip: XOR is an inequality detector.

IB Physics Style: Digital Control

Question: A safety system works only when door is closed and power key is ON. Which gate represents this?

Solution: Both conditions must be true simultaneously.

Final Answer: AND gate.

Exam Tip: “Both must happen” means AND.

IGCSE Style: Binary Conversion

Question: Convert (10101)2 to decimal.

Solution: 1×16 + 0×8 + 1×4 + 0×2 + 1×1 = 21.

Final Answer: (21)10.

Exam Tip: Write place values above bits.

Assertion Reason Questions

Assertion: NAND gate is called a universal gate. Reason: NOT, AND and OR gates can be made using only NAND gates.

Answer: Both assertion and reason are true, and reason correctly explains assertion.

Assertion: XOR gate output is 1 when both inputs are 1. Reason: XOR output is 1 when inputs are different.

Answer: Assertion is false, reason is true.

Case Study

A water tank alarm has two sensors A and B. The alarm should ring when either sensor detects overflow.

Question: Which gate should be used? Write its truth table.

Solution: Use OR gate because alarm must ring if A or B is 1.

Final Answer: OR gate; Y = A + B.

Quick Revision Section

Formula Sheet

  • OR: Y = A + B.
  • AND: Y = A.B.
  • NOT: Y = Ā.
  • NAND: Y = (A.B)̄.
  • NOR: Y = (A + B)̄.
  • XOR: Y = Ā.B + A.B̄.
  • XNOR: Y = A.B + Ā.B̄.

Most Important Exam Points

  • NAND and NOR are universal gates.
  • XOR output is HIGH for unlike inputs.
  • XNOR output is HIGH for like inputs.
  • De Morgan's theorems connect NAND and NOR operations.
  • Timing diagrams must be read interval by interval.

Boolean Laws

LawResult
IdentityA + 0 = A, A.1 = A
NullA + 1 = 1, A.0 = 0
IdempotentA + A = A, A.A = A
ComplementA + Ā = 1, A.Ā = 0

De Morgan's Theorems

  • (A + B)̄ = Ā.B̄
  • (A.B)̄ = Ā + B̄
  • Break the bar and change the operation.

Gate Symbols Summary

GateExpression
ORA + B
ANDA.B
NOT
NAND(A.B)̄
NOR(A + B)̄
XORĀ.B + A.B̄
XNORA.B + Ā.B̄

Truth Table Summary

ABORANDNANDNORXORXNOR
00001101
01101010
10101010
11110001

Need Personal Guidance?

If any topic in Semiconductor Electronics, Logic Gates or Digital Electronics is not clear, students may contact Kumar Sir for one-to-one online Physics classes.

Logic Gates PYQs

Logic Gates PYQs with Solutions

Previous-year logic gate questions redrawn with clean circuit diagrams, truth tables, waveform analysis, step-by-step solutions, final answers and exam tips.

Questions 68-79All visible PYQs from the attached screenshots are included in original order.
Clean DiagramsGate symbols, circuits, waveforms and truth tables are redrawn as responsive SVG/HTML.
Exam ReadyEach card includes solution logic, final answer and a short scoring tip.

Need Personal Guidance?

If any topic in Semiconductor Electronics, Logic Gates or Digital Electronics is not clear, students may contact Kumar Sir for one-to-one online Physics classes.

Based on Logic Gates

68.

Which symbol represents NAND gate ?

Question 68 NAND gate symbol options

Solution

A NAND operation is an AND operation followed by NOT operation.

Option (a) shows an AND gate followed by an inverter, so it represents NAND.

Final Answer: (a)

Exam Tip: NAND = NOT of AND, so look for AND output inversion.

69.

When the inputs of a two input logic gate are 0 and 0, the output is 1. When the inputs are 1 and 0 the output is 0. The logic gate is of the type

(a) AND
(b) NAND
(c) NOR
(d) OR

Solution

For NOR gate, Y = A + B.

If A = 0, B = 0, then Y = 0 + 0 = 1.

If A = 1, B = 0, then Y = 1 + 0 = 0.

Final Answer: (c) NOR

Exam Tip: NOR output is high only for input pair 00.

70.

Which of the following gates can be served as a building block for any digital circuit ?

(a) OR
(b) NOT
(c) AND
(d) NAND

Solution

NAND is a universal gate. NOT, AND and OR gates can be constructed using only NAND gates.

Final Answer: (d) NAND

Exam Tip: NAND and NOR are universal gates.

71.

The gate for which output is high, if atleast one input is low ?

(a) NAND
(b) NOR
(c) AND
(d) OR

Solution

For NAND gate, output is low only when all inputs are high.

Therefore, if at least one input is low, output becomes high.

Final Answer: (a) NAND

Exam Tip: NAND gives 0 only for 11.

72.

The following logic circuit represents

Question 72 logic circuit
(a) NAND gate with output O = X̄ + Ȳ
(b) NOR gate with output O = X + Y
(c) NAND gate with output O = X.Y
(d) NOR gate with output O = X̄.Ȳ

Solution

The first gate is AND, so its output is X.Y.

This output is then passed through NOT gate.

Therefore O = X.Y, which is NAND.

Final Answer: (c) NAND gate with output O = X.Y

Exam Tip: AND followed by NOT is NAND.

73.
JEE Main July 22

A logic gate circuit has two inputs A and B and output Y. The voltage waveforms of A, B and Y are shown below :

Question 73 voltage waveforms of A, B and Y

The logic gate circuit is

(a) AND gate
(b) OR gate
(c) NOR gate
(d) NAND gate

Solution

Compare intervals where Y is high.

Y becomes high only when A is high and B is also high.

This is the behaviour of AND gate.

Final Answer: (a) AND gate

Exam Tip: In waveform questions, mark common high intervals of A and B.

74.
JEE Main July 21

Identify the logic operation carried out by the following circuit :

Question 74 logic circuit
(a) NOR
(b) AND
(c) OR
(d) NAND

Solution

Each first NAND gate has tied inputs, so X = Ā and Y = B̄.

The final gate is AND, so Z = X.Y = Ā.B̄.

Using De Morgan's theorem, Ā.B̄ = A + B, which is NOR.

Final Answer: (a) NOR

Exam Tip: NAND with both inputs joined behaves as NOT.

75.
JEE Main 21, 22

Identify the logic operation carried out.

Question 75 logic circuit
(a) OR
(b) AND
(c) NOR
(d) NAND

Solution

The first two NAND gates act as NOT gates: outputs are Ā and B̄.

The final gate is NOR, so Y = Ā + B̄.

By De Morgan's theorem, Ā + B̄ = A.B.

Final Answer: (b) AND

Exam Tip: Apply De Morgan after identifying the final NOR gate.

76.
AIEEE 2010

The combination of gates shown below yields

Question 76 combination of gates
(a) NAND gate
(b) OR gate
(c) NOT gate
(d) XOR gate

Solution

The first two NAND gates have tied inputs, so they produce Ā and B̄.

The final gate is NAND: X = Ā.B̄.

Using De Morgan's theorem, X = A + B.

Final Answer: (b) OR gate

Exam Tip: NAND-NAND arrangement often converts to OR by De Morgan's theorem.

77.
JEE Main Aug 21

In the following logic circuit the sequence of the inputs A, B are (0, 0), (0, 1), (1, 0) and (1, 1). The output Y for this sequence will be

Question 77 logic circuit
(a) 0, 1, 0, 1
(b) 0, 0, 1, 1
(c) 1, 0, 1, 0
(d) 1, 1, 1, 0

Solution

Upper gate gives P = A.B. Lower gate gives Q = A + B.

Final gate is NAND, so Y = P.Q = (A.B)(A + B).

Since (A.B)(A + B) = A.B, Y = A.B.

ABY
001
011
101
110

Final Answer: (d) 1, 1, 1, 0

Exam Tip: First name intermediate outputs P and Q, then substitute.

78.
JEE Main July 21

Find the truth table for the function Y of A and B represented in the following figure :

Question 78 logic circuit

(a)

ABY
000
011
101
111

(b)

ABY
000
010
100
111

(c)

ABY
000
011
100
110

(d)

ABY
001
010
101
111

Solution

The upper gate gives A.B. The lower branch gives B̄ using NOT gate.

The final gate is OR, so Y = A.B + B̄.

Using A.B + B̄ = A + B̄.

ABA.BY
00101
01000
10101
11011

Final Answer: (d)

Exam Tip: When one input splits into NOT and another gate, write branch outputs first.

79.
JEE Main March 21

The following logic gate is equivalent to

Question 79 equivalent logic gate circuit
(a) OR Gate
(b) NAND Gate
(c) NOR Gate
(d) AND Gate

Solution

The first two NAND gates with tied inputs give Ā and B̄.

The middle NAND gives Ā.B̄ = A + B.

The last NAND has tied inputs, so it acts as NOT gate.

Therefore Y = A + B, which is NOR.

Final Answer: (c) NOR Gate

Exam Tip: A tied-input NAND at the end inverts the previous output.

Scroll to Top