# Axioms and Laws of Boolean Algebra

In this tutorial, we are going to learn about the **Axioms and Laws of Boolean Algebra in Digital Electronics**.

Submitted by Saurabh Gupta, on November 16, 2019

Boolean Algebra differs from both general mathematical algebra and binary number systems. In Boolean Algebra, **A+A =A** and **A.A = A**, because the variable **A** has only logical value. It doesn't have any numerical significance. In ordinary mathematical algebra, **A+A = 2A** and **A.A = A2**, because the variable **A** has some numerical value here. Also, in Binary Number System **1+1 = 10**, and in general mathematical algebra **1+1 = 2** but in **Boolean Algebra 1+1 = 1** itself. Unlike ordinary algebra and Binary Number System here is subtraction or division in Boolean Algebra. We only use **AOI (AND, OR and NOT/INVERT)** logic operations to perform calculations in Boolean Algebra.

## Axioms in Boolean Algebra

There are some set of logical expressions which we accept as true and upon which we can build a set of useful theorems. These sets of logical expressions are known as **Axioms or postulates of Boolean Algebra**. **An axiom is nothing more than the definition of three basic logic operations (AND, OR and NOT)**. All axioms defined in boolean algebra are the results of an operation that is performed by a logical gate.

Axiom 1: 0.0 = 0 Axiom 6: 0+1 = 1 Axiom 2: 0.1 = 0 Axiom 7: 1+0 = 1 Axiom 3: 1.0 = 0 Axiom 8: 1+1 = 1 Axiom 4: 1.1 = 1 Axiom 9: 0 = 1 Axiom 5: 0+0 = 0 Axiom 10: 1 = 0

Based on these axioms we can conclude many laws of Boolean Algebra which are listed below,

**Commutative Laws**

A+B = B+A, and A.B = B.A

**Associative Laws**

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

**AND Laws**

```
A.0 = 0
A.1 = A
A.A = A
A.A = 0
```

**OR Laws**

```
A+0 = A
A+1 = 1
A+A = A
A+A = 0
```

**Complementation Laws**

If A = 0 then A = 1 If A = 1 then A = 0 A̿ = A

**Distributive Laws**

A(B+C) = AB + AC A + BC = (A+B). (A+C)

**Idempotence Law**

A.A = A, If A=1, then A.A = 1.1 =1 = A and if A=0, then A.A = 0.0 = 0 = AA+A = A, If A=1, then A+A = 1+1 =1 = A and if A=0, then A+A = 0+0 = 0 = A

**Absorption Law**

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

**De-Morgan's Law**

A+B = A. B A.B = A + B

**Consensus Theorem**

A)AB + A C + BC = AB + A C

**Proof:**

LHS = AB + A C + BC = AB + A C + BC (A+A) = AB + A C + ABC + ABC = AB (1+C) + A C (1+C) = AB + A C = RHS

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

**Proof:**

LHS = (A+B) (A + C) (B+C) = (AA + AC + BA + BC) (B+C) = (AC + BA + BC) (B+C) = ABC + ACC + BAB + BAC + BCB + BCC = ABC + AC + BA + BAC + BC + BC = ABC + AC + BA + BAC + BC = AC(B+1) + BA (1+C) + BC = AC + BA + BC ............. (Equation 1) RHS = (A+B) (A + C) = AA + AC + BA + BC = AC + BA + BC ............. (Equation 2)

Since, **Equation 1 = Equation 2**, Hence **Consensus Theorem** is verified.

TOP Interview Coding Problems/Challenges

- Run-length encoding (find/print frequency of letters in a string)
- Sort an array of 0's, 1's and 2's in linear time complexity
- Checking Anagrams (check whether two string is anagrams or not)
- Relative sorting algorithm
- Finding subarray with given sum
- Find the level in a binary tree with given sum K
- Check whether a Binary Tree is BST (Binary Search Tree) or not
- 1[0]1 Pattern Count
- Capitalize first and last letter of each word in a line
- Print vertical sum of a binary tree
- Print Boundary Sum of a Binary Tree
- Reverse a single linked list
- Greedy Strategy to solve major algorithm problems
- Job sequencing problem
- Root to leaf Path Sum
- Exit Point in a Matrix
- Find length of loop in a linked list
- Toppers of Class
- Print All Nodes that don't have Sibling
- Transform to Sum Tree
- Shortest Source to Destination Path

Comments and Discussions

**Ad:**
Are you a blogger? Join our Blogging forum.