🚪Logic Gates

Electronic devices can only recognise the presence or absence of a current. Computers contain billions of switches that can either be OFF or ON (0 or 1). These switches can be combined in different ways to create simple circuits called logic gates.

Logic Gates

Electronic Logic Gates take one of more inputs in order to produce a single output. The output can become an input to another gate, and so on, in order to create a complex circuit. There are a number of logic gates designed to product various outputs based on their inputs.

NOT Gate

  • If the input is 0, it outputs 1.

  • If the input is 1, it outputs 0.

Truth Table

A
B

0

1

1

0

B=A‾B = \overline A

AND Gates

  • If both inputs are 1 then the output is 1

  • Else, the output is 0

Truth Table

A
B
C

0

0

0

0

1

0

1

0

0

1

1

1

C=Aā‹…BC = A \cdot B

OR Gate

  • If either input is 1, the output is 1

  • Else, the output is 0

Truth Table

A
B
C

0

0

0

0

1

1

1

0

1

1

1

1

C=A+BC = A + B

XOR Gate

  • If one, but not both, of the inputs is 1, the output is 1

  • Else, the output is 0

Truth Table

A
B
C

0

0

0

0

1

1

1

0

1

1

1

0

C=AāŠ•BC = A \oplus B

NAND Gate

  • This is a join-up of AND and NOT gate

  • It inverts the output of the AND gate

Truth Table

A
B
C

0

0

1

0

1

1

1

0

1

1

1

0

C=Aā‹…B‾C = \overline {A \cdot B}

NOR Gate

  • It Inverts the output of OR gate

  • The output is 1 only if both inputs are 0

Truth Table

A
B
C

0

0

1

0

1

0

1

0

0

1

1

0

C=A+B‾C = \overline {A + B}

NAND - The Universal Gate

The NAND gate is useful as it combines the functions of two gates in a single gate. NAND gate is knows as the universal gate as different combinations of NAND gate can act like AND, NOT and OR gates. In fact, any circuit can be built using just NAND gates.

Advantages of using NAND gates

Using just NAND gates to build a circuit can minimise the production costs. Also, using as few gates as possible can speed up the processing.

Last updated