74LS04 (7404) Logic Gate - NOT Inverter, Pinout, and Applications
The 74LS04 (also known as 7404) is a fundamental integrated circuit in digital electronics that contains six independent NOT logic gates (inverters). It is powered with +5V (4.75–5.25V), and each gate performs the Boolean negation operation: Y = ¬A. This means that if the input is "1" (HIGH), the output will be "0" (LOW), and vice versa.
This component from the 74LS (Low-power Schottky) series is indispensable in projects with Arduino, microcontrollers, and any digital system where a logic signal needs to be inverted.
What is the 74LS04?
The 74LS04 is a hex low-power inverter (LS series). Its main features are:
- Six independent NOT gates (inverters).
- Low power consumption.
- High switching speed.
- Compatible with standard TTL logic levels (5V).
- Each gate has a single input and a single output.
Its main function is simple but crucial: inverting a digital signal.
Basic Operation and Truth Table
Each inverter in the 74LS04 follows a very simple logic: the output is always the opposite state of the input. The Boolean operation is expressed as Y = A'.
Truth table for each NOT gate:
Input A | Output Y |
---|---|
0 | 1 |
1 | 0 |
Internal operation: As part of the low-power Schottky TTL family, it uses transistors and Schottky diodes to achieve fast switching with a typical propagation delay of about 10 nanoseconds.
Pinout and Connections
The 74LS04 comes in a 14-pin DIP package with the following configuration:
- Pin 7: GND (Ground)
- Pin 14: VCC (+5V)
- Gates organized as follows:
- Gate 1: Input (Pin 1), Output (Pin 2)
- Gate 2: Input (Pin 3), Output (Pin 4)
- Gate 3: Input (Pin 5), Output (Pin 6)
- Gate 4: Input (Pin 9), Output (Pin 8)
- Gate 5: Input (Pin 11), Output (Pin 10)
- Gate 6: Input (Pin 13), Output (Pin 12)
Detailed Technical Specifications
Specification | Parameter (74LS04) |
---|---|
Logic Function | NOT (Inverter) |
Number of NOT gates | 6 (Hex) |
Inputs per gate | 1 |
Supply Voltage | 4.75 – 5.25 V |
Technology | TTL 74LS family (LS-TTL) |
Output Current (IOL) | up to 8 mA (low level) |
Output Current (IOH) | –0.4 mA (high level) |
Typical Delay (tpd) | ~10 ns (propagation) |
Operating Trange | 0 °C to 70 °C |
Component Variants
There are several versions of the 7404 inverter, compatible with different logic families:
- SN7404/SN74LS04: Original TTL versions for 5V.
- SN74HC04: High-speed CMOS version, operates from 2V to 6V with much lower consumption.
- SN74HCT04: CMOS version with TTL-compatible inputs, ideal for interfacing between 3.3V and 5V logic.
- Other variants: 74F04 (Very High-Speed), 74AC04 (Advanced CMOS).
Practical Applications
Use cases with Arduino and microcontrollers
The 74LS04 is extremely versatile:
- Signal inversion: Its most common use. If a sensor signal is active-low, a 7404 can be used to convert it to active-high.
- Oscillators: Simple square wave oscillators (astable) can be built using one or three NOT gates in a loop with a resistor and a capacitor.
- LED control: To turn on an LED when a signal is LOW and turn it off when it is HIGH.
- Buffer or current amplifier: Although not its primary function, a gate can "refresh" a weak signal.
Basic circuit example
Example circuit: A push-button (S1) with a pull-up resistor (R1) controls the gate's input. The Y output controls an LED with a resistor (R2). When the button is not pressed, the input is "1", the output is "0", and the LED is off. When the button is pressed, the input goes to "0", the output to "1", and the LED turns on.
Circuit connections:
- VCC = +5V to pin 14
- GND to pin 7
- 10kΩ resistor to VCC (pull-up) on the input (Pin 1).
- Push-button connects the input to GND.
- The output (Pin 2) is connected to an LED with a 220Ω resistor to GND.
Important Considerations for Use
- Unused inputs: Unused TTL gate inputs should never be left floating. Connect them to VCC or GND, either directly or through a resistor.
- Voltage compatibility: The 74LS04 is a 5V device. For 3.3V systems, the 74HCT04 variant is the safest choice.
Comparisons with Other Gates
- 74LS08 (AND): Performs a Y=A·B operation.
- 74LS32 (OR): Performs a Y=A+B operation.
- Buffer (e.g., 74LS244): Does not invert the signal, only amplifies or isolates it. The output is equal to the input (Y=A).
Practical Resources
- Datasheet SN74LS04 (Texas Instruments): [Hex Inverters]
- Datasheet SN74HC04 (Texas Instruments): [Hex Inverters - CMOS]
- Simulations: Tinkercad, Falstad, and other simulators are excellent for testing circuits with the 7404.
Frequently Asked Questions (FAQ)
What gate is the 7404? The 7404 (or 74LS04) is an integrated circuit containing six NOT logic gates (inverters).
What is the truth table for the 7404? The truth table for each inverter is simple: if the input is 0, the output is 1. If the input is 1, the output is 0.
What does the 7404 integrated circuit do? It inverts logic signals. It converts a HIGH logic level to LOW and a LOW level to HIGH.
What voltage does the 74LS04 operate at? It operates at a standard TTL voltage of 5V (recommended range 4.75–5.25V).
How do I connect the 74LS04? Connect pin 14 to +5V and pin 7 to GND. Then, use the input/output pin pairs (like 1 and 2) for your signals.
What do SN74LS04, 74HC04, etc., mean? They are different logic families: 74LS04 (TTL Low-Power Schottky), 74HC04 (High-speed CMOS), and 74HCT04 (CMOS with TTL-compatible inputs). All are inverters, but they vary in voltage, speed, and consumption.
References: Information is based on official datasheets from Texas Instruments and digital electronics technical guides.
Comentarios (0) blog/en/7404
No hay comentarios aún. ¡Sé el primero en comentar!