How to be a Programmer | Part 7 : Logic Gates and Boolean Algebra

 logic gates and boolean algebra

Logic Gates and Boolean Algebra

Logic Gates

The Computer (Electronic Devices) is made of a large amount of complex digital circuits. Logic gates are the basic items of any digital circuits. There are seven basic logic gates:

AND, OR, NOT, XOR, NAND, NOR, XNOR

How to be a Programmer

Logic Gates and Boolean Algebra – AND Gate (.)

If at least one input is in False (0) state, the output of AND gate is False (0).

 logic gates and boolean algebra - and
 logic gates and boolean algebra - and circuit

Logic Gates and Boolean Algebra – OR Gate (+)

At least one input should be 1 for the output of OR gate to be 1.

 logic gates and boolean algebra - or
 logic gates and boolean algebra - or circuit

Logic Gates and Boolean Algebra – NOT Gate ()

Not gate consists of only one input. Output will be FALSE if input is TRUE and Output will be TRUE if input is FALSE.

 logic gates and boolean algebra - not

Logic Gates and Boolean Algebra – XOR Gate

In this gate, the output will be FALSE if both inputs are at the same state (TRUE or FALSE) and output will be TRUE if both the inputs are at the different state.

 logic gates and boolean algebra -  xor

Logic Gates and Boolean Algebra – NAND Gate

NAND gate is a combination of AND gate and NOT gate. It works opposite to the AND gate

 logic gates and boolean algebra - nand

Logic Gates and Boolean Algebra – NOR Gate

NOR gate is a combination of OR gate and NOT gate. It works opposite to the OR gate

 logic gates and boolean algebra - nor

Logic Gates and Boolean Algebra – XNOR Gate

It is exclusive NOR gate. It is a combination of XOR gate and NOT gate. It works opposite to the XOR gate. In this gate, the output will be TRUE when both the inputs are at the same state. and output will be FALSE if both the input are a different state,

 logic gates and boolean algebra - xnor

Boolean Algebra

Boolean Algebra is used to analyze and simplify the logic circuits. It introduced by George Boole in 1847

Annulment Law

X.0 = 0
X+1 = 1

Identity law

X.1 = X
X+0 = X

Idempotent law

X.X = X
X+X = X

Complement law

X.X = 0
X+X = 1

Double Negation law

X = X

Commutative law

X.Y = Y.X
X+Y = Y+X

Associative law

X.(Y.Z) = (X.Y).Z = (X.Z).Y = X.Y.Z
X+(Y+Z) = (X+Y)+Z = (X+Z)+Y = X+Y+Z

Distributive law

X.(Y+Z) = X.Y + X.Z
X+Y.Z = (X+Y).(X+Z)

de Morgan’s Theorem

X.Y = X+Y
X+Y = X.Y

Absorption law

X.(X+Y) = X
X+(X.Y) = X

Consensus law

(X+Y).(X+Z).(Y+Z) = (X+Y).(X+Z)
(X.Y)+(X.Z)+(Y.Z) = X.Y+X.Z

Redundancy law

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

Hi Friends,

Hope this post (How to be a Programmer Part 7 – Logic Gates and Boolean Algebra) will help you to learn something. If you enjoy my work, please Share my posts with your friends and anyone who might be interested in programming. Don’t forget to Comment and, Subscribe.

See you in the comment section.

Like ctechf Facebook fan page : https://www.facebook.com/ctechf

Also Read :

How to be a Programmer

Liked it? Take a second to support CtechF on Patreon!

Leave a Reply

23 Shares
Share
Tweet
Share
Pin
Share