Boolean algebra and logic gates

Boolean algebra

Boolean algebra is a mathematical structure that operates on true (1) and false (0) values, serving as the foundation for digital circuits and computer logic.

A and B can be equal 0 or 1.

A = not A, contradiction of A, A reversed

Statement 1. - Commutative Law

A + B = B + A

A * B = B * A

Statement 2. - Associative Law

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

Statement 3.

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

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

Statement 4. - Idempotent Law

A + A = A

A * A = A

Statement 5.

A * B + A * B = A

(A + B) * (A + B) = A

Statement 6. - Absorption Law

A + A * B = A

A * (A + B) = 1

Statement 7. - Identity Law

0 + A = A

0 * A = 0

Statement 8.

1 + A = 1

1 * A = A

Statement 9.

A + A = 1

A * A = 0

Statement 10.

A + A * B = A + B

A * (A + B) = A * B

Statement 11. - De Morgan’s Law

A + B = A * B

A * B = A + B

Logic gates

Logic gates are the fundamental building blocks of digital circuits that perform logical operations such as AND, OR, and NOT. They are used for processing binary signals.

Y is the result of letting A and B through a given logic gate.

OR AND XOR NOT NOR NAND XNOR
Y = A + B Y = A * B Y = A * B + A * B Y = A Y = A + B Y = A * B Y = A * B + A * B
A B Y A B Y A B Y A B A B Y A B Y A B Y
0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 1 0 0 1
0 1 1 0 1 0 0 1 1 1 0 0 1 0 0 1 1 0 1 0
1 0 1 1 0 0 1 0 1 1 0 0 1 0 1 1 0 0
1 1 1 1 1 1 1 1 0 1 1 0 1 1 0 1 1 1

The NOR, NAND, and XNOR gates are the negations (NOT) of OR, AND, and XOR.

A B A * B A * B
0 0 1 1
0 1 1 0
1 0 1 0
1 1 0 0