EniunEniunEniunEniun
  • Contact
  • EN
  • ES
✕
Sin resultados Ver todos los resultados

Logic Gates: Types, Truth Tables, and Practical Examples

  • Inicio
  • Hardware Computer Hardware Course
  • Logic Gates: Types, Truth Tables, and Practical Examples
01/12/2026
Ilustración del símbolo de una puerta lógica AND

Logic gates take binary inputs and produce a binary output. Combine them to compare values, perform arithmetic, or make decisions based on several conditions.

Contenidos del artículo

Toggle
  • 1. Physical characteristics
  • 2. Types of logic gates
    • 2.1. NOT
    • 2.2–2.7. Two-input gates
  • 3. Practical examples
    • 3.1. An indicator with two sensors
    • 3.2. Fan control as a logic exercise
    • 3.3. An alarm with an exit mode
  • 4. Logic gates in microprocessors
  • 5. Worked exercises
    • 5.1. Find the expression for a circuit
    • 5.2. Draw a circuit for an expression
    • 5.3. Quick check

1. Physical characteristics

A circuit represents 0 and 1 using defined voltage ranges. The ranges depend on the logic family and power supply. Before connecting chips, check their input thresholds, output drive, supply voltage, and propagation delay. Leave no CMOS input floating. A truth table describes the logical result, while the datasheet describes the electrical behavior.

Integrated circuits in different packages

2. Types of logic gates

2.1. NOT

An inverter returns 1 for an input of 0, and 0 for an input of 1.

NOT gate symbol

2.2–2.7. Two-input gates

ABANDORXORNANDNORXNOR
00000111
01011100
10011100
11110001
  • AND is high only when both inputs are high.
  • OR is high when at least one input is high.
  • XOR is high when the two inputs differ.
  • NAND inverts AND, and NOR inverts OR.
  • XNOR is high when both inputs match.
AND gate symbol
OR gate symbol
XOR gate symbol
NAND gate symbol
NOR gate symbol
XNOR gate symbol

3. Practical examples

3.1. An indicator with two sensors

Suppose A and B report activity. Use A AND B for a confirmed signal, A OR B for an early warning, A XOR B for a single active sensor, and A XNOR B to show agreement. An inverter lets you work with a sensor whose active output is low.

3.2. Fan control as a logic exercise

If T and P represent high temperature and high pressure, a simulated main fan can run when T OR P is true, while a backup turns on when T AND P is true. NOT (T OR P) is true only when both readings are normal. Compare the four input combinations.

3.3. An alarm with an exit mode

In the original diagram, an open door, window, or garage contact is represented by 0. Invert the inputs before combining them with OR. The automatic alarm requires the system to be armed, exit mode to be off, and at least one open contact. A panic button drives the final OR independently.

Logic diagram combining a panic button, exit mode, and three contact sensors

Alarm = Panic OR (Armed AND NOT ExitMode AND (NOT Window OR NOT Door OR NOT Garage))

4. Logic gates in microprocessors

Gates form adders, multiplexers, decoders, and other circuits. A half adder uses XOR for the sum and AND for the carry. Gates combined with state-holding circuits can also form registers. See how microprocessors use these building blocks and how data is represented in binary.

5. Worked exercises

5.1. Find the expression for a circuit

Trace an AND gate with inputs A and B. Feed its output and C into an OR gate. The output is (A AND B) OR C. With A=1, B=0, C=1, the output is 1.

5.2. Draw a circuit for an expression

For (A OR B) AND NOT C, draw an OR gate for A and B, invert C, then feed both results into an AND gate.

5.3. Quick check

Which gate outputs 1 only when both inputs are 0? Which gate detects disagreement?

NOR outputs 1 only when both inputs are 0. XOR detects disagreement.

Servicios

Desarrollo Web
Diseño Web
Marketing Digital
Social Media
Experiencia de Usuario
Cursos formativos
Services

WordPress development (in Spanish)
Custom software (in Spanish)
Web design (in Spanish)
UX consulting (in Spanish)
SEO and GEO (in Spanish)
Courses and tutorials
Contacta con nosotros

info@eniun.com

Reportar un error

                   

Get in touch

Contact Eniun


info@eniun.com

Report an issue (in Spanish)

                   

Suscríbete

Únete a nuestra comunidad para recibir contenido exclusivo y relevante para diseñadores y desarrolladores web


Apuntarme

Subscribe to the newsletter

Get updates on web design, development, and computing from Eniun. The newsletter is in Spanish.


Sign up (in Spanish)
Katadoku retos de logica y deduccion
Simulador montaje PC
© 2026 Eniun | Política de privacidad y cookies
© 2026 Eniun | Privacy and cookies policy
    EN
    • EN
    • ES