IntermediateTopic 37 of 104Electronics & Embedded

Logic gates

AND, OR, NOT, NAND, NOR, XOR implement Boolean functions.

In depth

AND outputs 1 only if all inputs are 1, OR if any is 1, NOT inverts, XOR if inputs differ. NAND and NOR are universal: any logic can be built from them. Truth tables list outputs; symbols are standardised (IEEE/IEC).

Key points

  • De Morgan equivalents
  • Propagation delay
  • Fan-in and fan-out
Example

An XOR gate is the sum bit of a half adder.

Why it matters

Logic gates are the basic building blocks of every digital circuit, so their behaviour defines what a processor can compute.

Where this is used

  • Building an alarm that triggers when two sensors agree with an AND gate.
  • Using an XOR gate for parity checking on a data line.
  • Implementing a NAND-only design to reduce the number of part types.

Frequently asked questions

What is Logic gates?

AND, OR, NOT, NAND, NOR, XOR implement Boolean functions.

Why is it important to understand logic gates?

Logic gates are the basic building blocks of every digital circuit, so their behaviour defines what a processor can compute.

Why is NAND called universal?

Any logic function can be built from NAND gates alone, which simplifies manufacturing and reduces the variety of parts needed.

What does an XOR gate output?

A one when its two inputs differ, which makes it useful for comparison, parity and addition.

How is Logic gates used in practice?

Typical applications include building an alarm that triggers when two sensors agree with an AND gate, using an XOR gate for parity checking on a data line and implementing a NAND-only design to reduce the number of part types.

What should I learn before Logic gates?

Study "Two's complement" first (topic 36 of 104 in Electronics & Embedded). It covers the groundwork this topic builds on.

What are the key points of Logic gates?

De Morgan equivalents. Propagation delay. Fan-in and fan-out.

Can you give an example of Logic gates?

An XOR gate is the sum bit of a half adder.

What comes after Logic gates?

The next topic is "Boolean algebra", which builds directly on this one.

How difficult is Logic gates?

It is classed as Intermediate in Electronics & Embedded (topic 37 of 104). It is an intermediate topic. Work through the beginner topics in Electronics & Embedded first.

Learning path

Want to practise? Open the interactive course for quick checks, quizzes, simulations and progress tracking.

Related topics