Bank Exam » Bank Exam Study Materials » Computer Knowledge » Types of Basic Logic Gates

Types of Basic Logic Gates

Logic gates define the relationship between the input and output of a digital system. The major types of logic gates are AND gate, OR gate, NOT gate and XOR gate.

Most devices that we use in our daily lives have been made using logic gate/ gates. Any digital device is fundamentally made of logic gates. Logic gates are the relationship between the input a user gives and what we program the digital device to return with. Generally we use a combination of the basic logic gates to come up with a suitably appropriate logic gate according to the function we require the digital device to perform. The basic types of logic gates are OR gate, AND gate, NOT gate and XOR gate. The rest of the logic gates are made using these four basic gates in different combinations.

What is logic

In simple terms, logic means a rational approach to any situation. Narrowly in the context of computer science and digital devices, it’s the use of system and mathematical operations to deductively reach a conclusion. 

Euclid, the father of geometry, gave a system of geometry by presenting how almost all the statements that we know about the geometrical figures can be derived from logic with the help of a small set of principles which are assumed to be true. These principles are popularly known as axioms. Similarly Newton’s contributions to mechanics were made on similar lines where he derived the laws of motion from three basic statements which are empirical. 

Logic further finds its application in computer science. It is known as computational logic. The early computational machines as well as the newer fields of artificial intelligence have fundamental basis in logic.

Logic gates and truth tables

Logic gates find application in most digital devices today. They are used in technological devices like computers, smartphones, tablets and also memory devices used in other devices.

Digital integrated circuits are the integrated circuits that work on a very few defined levels. Digital ICs are designed by using a lot of logic gates and other electrical and electronic components of the circuits. The logic gates work in a binary system. With the binary input data of say zero (0) which can also be called low or false or logical 0 and 1 also known as high or true or logical 1.

Logic gates make the decisions in a digital circuit on the basis of a combination of digital inputs that the logic gate receives from its inputs. Mostly, the logic gates tend to have multiple inputs and only one final output. 

Logic gates are based on the principles of Boolean algebra. Every terminal at any point of time can only have one of the two binary conditions, either it will be false or true. 

False is represented by the value of 0, and true is represented by 1. 

The output will also attain one of the two binay states depending upon the logic gate or the combination of logic gates used in that digital device.

Logic gates are kind of like light switches, the light switch can either be in one of the two positions- on or off. Equating that with the logic gates, in one of the  positions  the output is off or 0, and in the other, it is on or 1.

Truth tables are a convenient way of representing the logic gates. It is a mathematical table in which we write all the possible combinations of the two or more inputs and what output each combination will give.

Types of basic logic gates

There are four basic types of logic gates using the combinations of which we make our more complicated logic gates used in complex digital devices. These are: OR GATE, AND GATE, NOT GATE and XOR GATE.

OR GATE

OR Gate is based on the logical operation of OR or also known as Inclusive OR.

The output for OR gate is true (or 1) if either of the inputs are true or 1. 

It will only be false in one case which is when both inputs are false or 0.

It can be represented in a truth table in the following way:

P

Q

P OR Q

1

1

1

1

0

1

0

1

1

0

0

0

AND GATE

AND Gate is based on the logical operation of AND.

The output for AND gate is true (or 1) only if both of the inputs are true or 1. 

It will be false in every other case: when either of the inputs are false or 0 or both are 0.

It can be represented in a truth table in the following way:

P

Q

P AND Q

1

1

1

1

0

0

0

1

0

0

0

0

NOT GATE

NOT Gate is the logical inverter operation. It only has one input instead of two like in the other logic gates. It basically gives the opposite binary result as the input provided to it.

The output for NOT gate is true (or 1) if the input is true or 1. 

It will be false in case of the input being false or 0.

It can be represented in a truth table in the following way:

P

NOT P

1

0

0

1

XOR GATE

XOR Gate is based on the logical operation of XOR or also known as Exclusive OR. It is different from the inclusive OR in only one case. 

The output for OR gate is true (or 1) if one of the inputs are true or 1. 

It will only be false in one case which is when both inputs are false or 0 or both the inputs are true or 1.

It can be represented in a truth table in the following way:

P

Q

P XOR Q

1

1

0

1

0

1

0

1

1

0

0

0

Conclusion

 logic means a rational approach to any situation. Computational logic is used in digital devices. The logic gates work in a binary system. With the binary input data of say zero (0) which can also be called low or false or logical 0 and 1 also known as high or true or logical 1. Logic gates are based on the principles of Boolean algebra. Every terminal at any point of time can only have one of the two binary conditions, either it will be false or true. False is represented by the value of 0, and true is represented by 1. Four basic types of logic gates are OR GATE, AND GATE, NOT GATE and XOR GATE.

faq

Frequently asked questions

Get answers to the most common queries related to the Bank Examination Preparation.

What is a tautology?

Ans: A tautology is a logical gate where every output is true or 1 no matter w...Read full

What are some of the other logic gates which can be derived from the basic four?

Ans: NAND gate, NOR gate, XNOR gate and many others as well.