Logic Gates and Boolean Algebra: AND, OR, NOT, NAND, NOR, XOR Truth Tables and Adders for SSC Computer Exams
Rahul Kumar
SSC Exam Expert & Content Editor
In this note
- 1.What Is a Logic Gate?
- 2.Basic Gates
- 3.Truth Tables of Two-Input Gates
- 4.Explanation of Derived Gates
- 5.Universal Gates
- 6.Boolean Algebra Laws
- 7.Half Adder and Full Adder
- 8.Solved Examples
- 9.Quick Tips
- 10.Quick Revision Points
- 11.Practice Questions With Answers
- 12.How to Practise This Chapter
- 13.Frequently Asked Questions
PDF Notes: Logic Gates and Boolean Algebra: AND, OR, NOT, NAND, NOR, XOR Truth Tables and Adders for SSC Computer Exams
Premium PDF · one-time payment of ₹5 · instant access
Logic gates are the building blocks of digital circuits, and every computer chip is made of them. SSC computer awareness often asks about the output of a gate and about the universal gates. This guide on logic gates and Boolean algebra for SSC gives the symbols, truth tables, universal gates, Boolean laws, De Morgan’s theorems and the half adder and full adder, with practice questions and FAQs.
What Is a Logic Gate?
A logic gate is a circuit with one or more inputs and one output. The inputs and the output are binary: 1 (true or high) and 0 (false or low). Boolean algebra, invented by George Boole, is the mathematics of logic gates.
Basic Gates
| Gate | Boolean Expression | Output Rule |
|---|---|---|
| AND | A · B | Output is 1 only when all inputs are 1 |
| OR | A + B | Output is 1 when at least one input is 1 |
| NOT (inverter) | A′ or à | Output is the opposite of the input |
Truth Tables of Two-Input Gates
| A | B | AND | OR | NAND | NOR | XOR | XNOR |
|---|---|---|---|---|---|---|---|
| 0 | 0 | 0 | 0 | 1 | 1 | 0 | 1 |
| 0 | 1 | 0 | 1 | 1 | 0 | 1 | 0 |
| 1 | 0 | 0 | 1 | 1 | 0 | 1 | 0 |
| 1 | 1 | 1 | 1 | 0 | 0 | 0 | 1 |
Explanation of Derived Gates
| Gate | Meaning |
|---|---|
| NAND | NOT of AND; output is 0 only when all inputs are 1 |
| NOR | NOT of OR; output is 1 only when all inputs are 0 |
| XOR (exclusive OR) | Output is 1 when the inputs are different |
| XNOR | Output is 1 when the inputs are the same |
Universal Gates
The NAND and NOR gates are called universal gates, because any other gate (AND, OR, NOT and so on) can be built using only NAND gates or only NOR gates.
Boolean Algebra Laws
| Law | Expression |
|---|---|
| Identity | A + 0 = A; A · 1 = A |
| Null | A + 1 = 1; A · 0 = 0 |
| Idempotent | A + A = A; A · A = A |
| Complement | A + A′ = 1; A · A′ = 0 |
| Double negation | (A′)′ = A |
| Commutative | A + B = B + A; A · B = B · A |
| Associative | (A + B) + C = A + (B + C) |
| Distributive | A · (B + C) = A·B + A·C |
| De Morgan’s theorem 1 | (A + B)′ = A′ · B′ |
| De Morgan’s theorem 2 | (A · B)′ = A′ + B′ |
Half Adder and Full Adder
An adder is a circuit that adds binary numbers.
| Circuit | Inputs | Outputs | Expressions |
|---|---|---|---|
| Half adder | A, B | Sum and Carry | Sum = A XOR B; Carry = A AND B |
| Full adder | A, B, Carry-in | Sum and Carry-out | Sum = A XOR B XOR Cin; adds three bits |
Solved Examples
Example 1. What is the output of an AND gate for inputs 1 and 0?
0.
Example 2. What is the output of a NOR gate for inputs 0 and 0?
1.
Example 3. What is the output of an XOR gate for inputs 1 and 1?
0.
Example 4. Simplify A + A·B.
A(1 + B) = A · 1 = A.
Example 5. In a half adder, find the sum and carry for A = 1 and B = 1.
Sum = 1 XOR 1 = 0; Carry = 1 AND 1 = 1. So 1 + 1 = 10 in binary: sum 0, carry 1.
Quick Tips
- Memorise the truth tables of AND, OR and XOR; derive NAND, NOR and XNOR by inversion.
- Remember that NAND and NOR are universal gates.
- Use De Morgan’s theorem to change AND to OR.
- Remember that the half adder uses XOR for the sum and AND for the carry.
Quick Revision Points
- AND gives 1 only when all inputs are 1.
- OR gives 1 when any input is 1.
- NOT inverts the input.
- NAND and NOR are universal gates.
- Half adder: sum = XOR, carry = AND.
Practice Questions With Answers
- What is the output of an OR gate for inputs 0 and 1?
Answer: 1 - What is the output of a NAND gate for inputs 1 and 1?
Answer: 0 - What is the output of a NOT gate for input 1?
Answer: 0 - Which gates are called universal gates?
Answer: NAND and NOR - What is the output of an XNOR gate for inputs 1 and 1?
Answer: 1 - Who invented Boolean algebra?
Answer: George Boole - What is A + A′?
Answer: 1 - What is A · A′?
Answer: 0 - In a half adder, what gate gives the carry?
Answer: AND gate - What does De Morgan’s theorem say about (A + B)′?
Answer: It equals A′ · B′
How to Practise This Chapter
Practise 10 questions every day and write the steps on paper. Then attempt timed sets from our practice papers and the previous year papers page. See all topics on the Computer Knowledge notes page, read the previous topic Booting Process and BIOS and the next topic Network Devices and Transmission Media.
Frequently Asked Questions
What is a logic gate?
A circuit that produces one output from one or more binary inputs based on a logical rule.
What are the basic logic gates?
AND, OR and NOT.
What are universal gates?
NAND and NOR, because every other gate can be made from them.
What is the output of the AND gate?
1 only when all the inputs are 1.
What is the output of the OR gate?
1 when at least one input is 1.
What does the NOT gate do?
It inverts the input.
What is the XOR gate?
The gate whose output is 1 when the two inputs are different.
What is a half adder?
A circuit that adds two bits and gives a sum and a carry.
What is a full adder?
A circuit that adds three bits, including the carry from the previous stage.
Who invented Boolean algebra?
George Boole.
What is De Morgan’s theorem?
(A + B)′ = A′ · B′ and (A · B)′ = A′ + B′.
Is this topic asked in SSC?
Yes. Logic gates are asked in the computer awareness section of SSC exams.
Previous chapter
Booting Process, BIOS, UEFI and POST: Types of Booting and System Startup Explained for SSC Computer Awareness
Next chapter
Network Devices and Transmission Media: Hub, Switch, Router, Modem, Fibre Optic and Data Transmission Modes for SSC
Rahul Kumar
SSC Exam Expert & Content Editor
Rahul is a senior SSC exam strategist with 8+ years of experience helping aspirants crack CGL, CHSL and MTS exams. He writes in-depth notification breakdowns, exam pattern guides and preparation strategies.