⚡0 XP🔥0

Ch 2 · Boolean Logic | बूलियन तर्क

Lesson 2 of 11 ⏱ 3 min read ❓ 5-question quiz ▶ Runs Python

Boolean values, logic operators AND, OR, NOT, NAND, NOR, XOR, truth tables, De Morgan's laws and logic circuits.

Logic gates and truth tables#

A B A AND B A OR B NOT A A NAND B A NOR B A XOR B
0 0 0 0 1 1 1 0
0 1 0 1 1 1 0 1
1 0 0 1 0 1 0 1
1 1 1 1 0 0 0 0

NAND and NOR are universal gates - any circuit can be built from them alone.

हिंदी में समझें

AND गेट तभी 1 देता है जब दोनों इनपुट 1 हों, OR तब जब कोई भी एक इनपुट 1 हो, और NOT इनपुट को उलट देता है। NAND और NOR को सार्वत्रिक (universal) गेट कहते हैं क्योंकि इनसे कोई भी परिपथ बनाया जा सकता है।

Laws of Boolean algebra#

  • Identity: A + 0 = A, A · 1 = A. Null: A + 1 = 1, A · 0 = 0.
  • Idempotent: A + A = A. Complement: A + A′ = 1, A · A′ = 0. Involution: (A′)′ = A.
  • De Morgan's laws: (A + B)′ = A′ · B′ and (A · B)′ = A′ + B′.

Try it - truth tables in Python#

▶ Try it YourselfPython
Ctrl + Enter to run

Exam tips#

  • Draw the circuit for an expression like (A + B)·C′ and write its truth table; verify De Morgan's law with truth tables.

Quick Quiz

Q1.

Output of AND is 1 when

Q2.

Universal gates are

Q3.

(A + B)′ equals

Q4.

XOR gives 1 when

Q5.

A + A′ equals