1.5 Boolean Logic and Boolean algebra

 

1.5.1 What is Boolean Logic?

Boolean logic is a system of logic in which a value can have only two possible states:

0 → False / OFF
1 → True / ON

It is named after George Boole, an English mathematician who developed Boolean algebra.

Boolean logic is very important in:

  • Digital electronics
  • Computer circuits
  • Programming
  • Database searching
  • Decision-making systems
  • Computer architecture

Simple Definition

Boolean logic is a form of logic that deals with two possible values: 0 and 1.


1.5.2 What is Boolean Algebra?

Boolean algebra is a mathematical system used to represent and simplify logical operations.

Unlike ordinary algebra, Boolean algebra mainly works with:

0 and 1

It uses logical operators such as:

  • AND
  • OR
  • NOT

Simple Definition

Boolean algebra is a mathematical method used to represent, analyze and simplify logical expressions and digital circuits.


1.5.3 Boolean Variable

A Boolean variable is a variable that can have only two possible values:

0 or 1

For example:

A = 0
B = 1
C = 0

Here, A, B, and C are Boolean variables.

Example

If:

A = 1
B = 0

Then:

A AND B = 0

1.5.4 Boolean Constants

There are only two Boolean constants:

0 → False
1 → True

Example

A = 1

means that Boolean variable A is TRUE.

B = 0

means that Boolean variable B is FALSE.


1.5.5 Basic Boolean Operators

The three basic Boolean operators are:

  1. AND
  2. OR
  3. NOT

These operators form the foundation of Boolean algebra and digital logic.


1.5.6 AND Operation

The AND operation gives output 1 only when all inputs are 1.

The symbol used is:

A · B

or simply:

AB

Truth Table

ABA AND B
000
010
100
111

Easy Rule

AND = All conditions must be TRUE.

Think about two switches connected in series:

Switch A ── Switch B ── Bulb

The bulb turns ON only when both switches are ON.

TRUE AND TRUE evaluates to TRUE.

Example

Suppose:

A = 1
B = 1

Then:

A · B = 1

But:

A = 1
B = 0

Then:

A · B = 0

1.5.7 OR Operation

The OR operation gives output 1 when at least one input is 1.

The symbol is:

A + B

Here, + means OR, not normal arithmetic addition.

Truth Table

ABA OR B
000
011
101
111

Easy Rule

OR = At least one condition must be TRUE.

Example

A = 0
B = 1

Then:

A + B = 1

1.5.8 NOT Operation

The NOT operation reverses the input.

It is also called complementation or inversion.

The symbol is:

A̅

or:

A'

Truth Table

ANOT A
01
10

Easy Rule

NOT = Reverse the value.

0 → 1
1 → 0

Example

If:

A = 1

Then:

A' = 0

If:

A = 0

Then:

A' = 1

1.5.9 Basic Boolean Operators — Summary

OperationSymbolOutput is 1 when...
AND·All inputs are 1
OR+At least one input is 1
NOT' or barInput is reversed

Easy Memory Trick

AND = All

OR = One or more

NOT = Opposite


1.5.10 Complete Basic Truth Table

ABAND A·BOR A+B
0000
0101
1001
1111

For NOT:

AA'
01
10

1.5.11 Boolean Expression

A Boolean expression is an expression made using Boolean variables and logical operators.

Examples

A + B
A · B
A + B·C
A' + BC
(A + B)·C

Example

Consider:

Y = A + BC

Here:

  • A, B, C = Boolean variables
  • + = OR
  • · = AND
  • Y = output

1.5.12 Order of Operations in Boolean Algebra

When solving a Boolean expression, follow the proper order.

Order

1. Parentheses
2. NOT
3. AND
4. OR

Easy Trick

NOT → AND → OR

Example

Consider:

Y = A + B·C

First calculate:

B·C

Then:

A + (B·C)

1.5.13 Boolean Algebra Laws

Boolean algebra has several important laws used to simplify Boolean expressions.

The most important ones for exams are:

  1. Identity Law
  2. Null/Dominance Law
  3. Idempotent Law
  4. Complement Law
  5. Involution Law
  6. Commutative Law
  7. Associative Law
  8. Distributive Law
  9. Absorption Law
  10. De Morgan's Laws

1.5.14 Identity Law

AND

A · 1 = A

OR

A + 0 = A

Example

X · 1 = X
X + 0 = X

Easy Rule

AND with 1 → Same

OR with 0 → Same


1.5.15 Null or Dominance Law

AND

A · 0 = 0

OR

A + 1 = 1

Example

X · 0 = 0
X + 1 = 1

Easy Rule

AND with 0 → 0

OR with 1 → 1


1.5.16 Idempotent Law

If the same variable appears twice:

OR

A + A = A

AND

A · A = A

Example

B + B = B
B · B = B

1.5.17 Complement Law

A variable ORed with its complement gives 1:

A + A' = 1

A variable ANDed with its complement gives 0:

A · A' = 0

Example

B + B' = 1
B · B' = 0

Easy Rule

Variable + its opposite = 1

Variable × its opposite = 0


1.5.18 Involution Law

The complement of a complement returns the original variable.

(A')' = A

Example

A = 1
A' = 0
(A')' = 1

Therefore:

Double NOT gives the original value.


1.5.19 Commutative Law

The order of variables can be changed without changing the result.

OR

A + B = B + A

AND

A · B = B · A

Example

A + B = B + A

1.5.20 Associative Law

Grouping can be changed without changing the result.

OR

(A + B) + C = A + (B + C)

AND

(A · B) · C = A · (B · C)

Important

Associative law changes grouping, not the order.


1.5.21 Distributive Law

Boolean algebra has two important distributive laws.

First

A(B + C) = AB + AC

This looks similar to ordinary algebra.

Second

A + BC = (A + B)(A + C)

This is especially important because it is different from ordinary algebra.


1.5.22 Absorption Law

The absorption laws are:

A + AB = A

and:

A(A + B) = A

Example

X + XY = X
X(X + Y) = X

Easy Idea

The additional term is already covered by A.


⭐ 1.5.23 Boolean Algebra Laws — Complete Table

LawAND FormOR Form
IdentityA·1 = AA+0 = A
Null/DominanceA·0 = 0A+1 = 1
IdempotentA·A = AA+A = A
ComplementA·A' = 0A+A' = 1
CommutativeA·B = B·AA+B = B+A
Associative(AB)C=A(BC)(A+B)+C=A+(B+C)
AbsorptionA(A+B)=AA+AB=A

And:

Involution:
(A')' = A

1.5.24 De Morgan's Laws

De Morgan's Laws are extremely important in Boolean algebra and digital logic.

There are two laws.


De Morgan's First Law

The complement of an AND operation is equal to the OR of the complements.

(AB)' = A' + B'

In words:

NOT of AND = OR of NOTs

Example

(A·B)' = A' + B'

De Morgan's Second Law

The complement of an OR operation is equal to the AND of the complements.

(A+B)' = A'B'

In words:

NOT of OR = AND of NOTs

Example

(A+B)' = A'·B'

1.5.25 Easy Way to Remember De Morgan's Laws

When a complement goes across brackets:

AND ↔ OR

and:

Each variable gets complemented.

Example

(AB)'

Change:

AND → OR
A → A'
B → B'

Result:

A' + B'

Similarly:

(A+B)'

Change:

OR → AND
A → A'
B → B'

Result:

A'B'

Memory Trick

Break the bar → Change the sign

AND becomes OR.

OR becomes AND.


1.5.26 Principle of Duality

The principle of duality says that a valid Boolean expression remains valid when:

AND ↔ OR
1 ↔ 0

Example

Identity law:

A + 0 = A

Its dual is:

A · 1 = A

Both are valid.

Easy Rule

Swap + with · and 0 with 1.


1.5.27 Simplification of Boolean Expressions

Boolean algebra can be used to simplify expressions.

Simplification is useful because it can reduce:

  • Number of gates
  • Circuit complexity
  • Cost
  • Power consumption
  • Delay

1.5.28 Example 1 — Simplification

Simplify:

A + AB

Using the absorption law:

A + AB = A

Therefore:

Answer = A


1.5.29 Example 2 — Simplification

Simplify:

A + A'

Using the complement law:

A + A' = 1

Therefore:

Answer = 1


1.5.30 Example 3 — Simplification

Simplify:

A · A'

Using the complement law:

A · A' = 0

Therefore:

Answer = 0


1.5.31 Example 4 — Simplification

Simplify:

A + AB + AC

First:

A + AB = A

So:

A + AC

Again:

A + AC = A

Therefore:

Answer = A


1.5.32 Example 5 — Simplification

Simplify:

A + A'B

Use the distributive identity:

A + A'B
= (A + A')(A + B)

Using:

A + A' = 1

Therefore:

= 1(A+B)

Using identity law:

= A+B

Therefore:

A + A'B = A + B


1.5.33 Example 6 — De Morgan's Law

Simplify:

(A+B)'

Using De Morgan's second law:

(A+B)' = A'B'

Therefore:

Answer = A'B'


1.5.34 Example 7 — De Morgan's Law

Simplify:

(AB)'

Using De Morgan's first law:

(AB)' = A' + B'

Therefore:

Answer = A' + B'


1.5.35 Truth Table

A truth table is a table that shows all possible input combinations and their corresponding outputs.

For n Boolean inputs, the number of possible combinations is:

2ⁿ

Example

For 2 inputs:

2² = 4 combinations

For 3 inputs:

2³ = 8 combinations

1.5.36 Truth Table for AND

Expression:

Y = AB
ABY = AB
000
010
100
111

1.5.37 Truth Table for OR

Expression:

Y = A+B
ABY
000
011
101
111

1.5.38 Truth Table for NOT

Expression:

Y = A'
AY
01
10

1.5.39 Truth Table for a Boolean Expression

Consider:

Y = A + AB

Create all possible combinations:

ABABY = A + AB
0000
0100
1001
1111

From Boolean algebra:

A + AB = A

Therefore the final output is simply:

Y = A

This shows how Boolean algebra can simplify a circuit.


1.5.40 Boolean Logic in Real Life

Boolean logic is not only used in mathematics.

It is used in many real-world computer applications.

1. Programming

if age >= 18 AND citizen == true

2. Search Engines

Computer AND Science

3. Database Queries

Department = "IT" AND Status = "Active"

4. Digital Circuits

AND + OR + NOT

are used to construct digital systems.


1.5.41 Boolean Logic in Programming

Programming languages use Boolean expressions for decision-making.

Example

if (age >= 18 && citizen == true)

Here:

&& = AND

Another example:

if (A || B)

where:

|| = OR

And:

!A

means:

NOT A

Different programming languages may use different symbols, but the basic Boolean concepts remain the same.


1.5.42 Boolean Algebra and Digital Circuits

Boolean algebra provides the mathematical foundation for digital circuits.

For example:

Y = A·B

represents an AND operation.

Y = A+B

represents an OR operation.

Y = A'

represents a NOT operation.

Therefore:

Boolean Expression
       ↓
Logic Gates
       ↓
Digital Circuit

1.5.43 Boolean Expression vs Boolean Function

A Boolean expression is a combination of variables and operators.

Example:

A + BC

A Boolean function describes how output depends on one or more Boolean inputs.

Example:

Y = A + BC

Here:

  • A, B, C are inputs.
  • Y is the output.
  • The expression A + BC defines the relationship.

1.5.44 SOP — Sum of Products

SOP = Sum of Products

In SOP form, multiple AND terms are connected using OR.

Example

Y = AB + AC + BC

Here:

AB
AC
BC

are product terms, and they are added using OR.

Structure

AND → AND → AND
 \     |     /
       OR
        ↓
     Output

Easy Rule

SOP = AND terms + OR


1.5.45 POS — Product of Sums

POS = Product of Sums

In POS form, multiple OR terms are connected using AND.

Example

Y = (A+B)(A+C)(B+C)

Here:

(A+B)
(A+C)
(B+C)

are sum terms, and they are multiplied using AND.

Easy Rule

POS = OR terms × AND


1.5.46 SOP vs POS

SOPPOS
Sum of ProductsProduct of Sums
AND terms connected by OROR terms connected by AND
Example: AB + ACExample: (A+B)(A+C)
Also called OR of ANDsAlso called AND of ORs

1.5.47 Minterm

A minterm is a product/AND term in which every variable appears exactly once, either complemented or uncomplemented.

For two variables A and B, the minterms are:

A'B'
A'B
AB'
AB

These correspond to the four possible input combinations.

ABMinterm
00A'B'
01A'B
10AB'
11AB

1.5.48 Maxterm

A maxterm is a sum/OR term in which every variable appears exactly once.

For two variables:

A + B
A + B'
A' + B
A' + B'

The exact maxterm associated with a row is determined by making the OR expression equal to 0 for that input combination.


1.5.49 Universal Logic Gates

Two gates are particularly important because they can be used to construct other basic gates:

  1. NAND
  2. NOR

They are called universal gates.

NAND

NAND = NOT(AND)

Boolean expression:

Y = (AB)'

NOR

NOR = NOT(OR)

Boolean expression:

Y = (A+B)'

These are discussed in more detail under 1.6 Logic Gates.


⭐ 1.5.50 Important Boolean Laws — Must Memorize

These are especially important for exams:

A + 0 = A
A · 1 = A

A + 1 = 1
A · 0 = 0

A + A = A
A · A = A

A + A' = 1
A · A' = 0

(A')' = A

A + AB = A
A(A+B) = A

De Morgan's Laws

(AB)' = A' + B'
(A+B)' = A'B'

⭐ 1.5.51 Easy Boolean Law Memory Trick

Remember this:

Identity

+ 0 → Same
· 1 → Same

Dominance

+ 1 → 1
· 0 → 0

Complement

A + A' → 1
A · A' → 0

Absorption

A + AB → A
A(A+B) → A

De Morgan

Break the bar → Change AND/OR


⭐ 1.5.52 Most Important Exam Questions

Long Questions

  1. What is Boolean logic? Explain its importance in computer science.
  2. What is Boolean algebra? Explain its basic operations.
  3. Explain AND, OR and NOT operations with truth tables.
  4. Explain Boolean variables and Boolean constants.
  5. What is a Boolean expression? Give examples.
  6. Explain the basic laws of Boolean algebra.
  7. Explain Identity, Null, Complement and Idempotent laws with examples.
  8. Explain Commutative, Associative and Distributive laws.
  9. Explain Absorption law with suitable examples.
  10. State and prove De Morgan's laws using truth tables.
  11. Explain the principle of duality in Boolean algebra.
  12. What is a truth table? How many combinations are possible for n variables?
  13. Simplify Boolean expressions using Boolean algebra.
  14. Explain SOP and POS forms.
  15. What are minterms and maxterms?
  16. Explain universal gates.
  17. Explain the relationship between Boolean algebra and digital circuits.
  18. Explain the applications of Boolean logic in computers and programming.

📝 1.5.53 Practice Questions

Try solving these yourself.

Simplify:

1.

A + A'

2.

A · A'

3.

A + AB

4.

A(A+B)

5.

A + A'B

6.

(A+B)'

7.

(AB)'

8.

A + AB + AC

9.

A(A+B+C)

10.

AB + AB'

🧠 1.5.54 Quick Revision — One Page

Boolean Logic

Logic based on two values: 0 and 1.

Boolean Algebra

Mathematical system used to represent and simplify logical expressions.

Boolean Variable

Variable that can have only 0 or 1.

Three Basic Operations

AND → A·B
OR  → A+B
NOT → A'

AND

All inputs must be 1.

1·1 = 1

OR

At least one input must be 1.

1+0 = 1

NOT

Reverses the input.

0 → 1
1 → 0

Important Laws

A+0=A
A·1=A

A+1=1
A·0=0

A+A=A
A·A=A

A+A'=1
A·A'=0

(A')'=A

A+AB=A
A(A+B)=A

De Morgan's Laws

(AB)' = A'+B'
(A+B)' = A'B'

SOP

Sum of Products

AB + AC + BC

POS

Product of Sums

(A+B)(A+C)

Truth Table

For n inputs:

Number of combinations = 2ⁿ

For example:

2 inputs → 2² = 4
3 inputs → 2³ = 8
4 inputs → 2⁴ = 16

🎯 1.5.55 Exam Shortcut

When solving a Boolean expression, follow:

Step 1 → Look for brackets
          ↓
Step 2 → Solve NOT/complement
          ↓
Step 3 → Solve AND
          ↓
Step 4 → Solve OR
          ↓
Step 5 → Apply Boolean laws
          ↓
Step 6 → Write simplified answer

And for memorization, focus especially on these 8 formulas:

1. A + 0 = A
2. A · 1 = A
3. A + 1 = 1
4. A · 0 = 0
5. A + A' = 1
6. A · A' = 0
7. A + AB = A
8. A(A+B) = A

Then make De Morgan's Laws your highest-priority formulas:

(AB)' = A' + B'
(A+B)' = A'B'

Post a Comment

0 Comments