The 74HC04 and 74LS04 are among the most widely used NOT-gate ICs in digital electronics, valued for their simplicity, reliability, and versatility. Whether correcting signal polarity, restoring degraded waveforms, or buffering weak logic sources, these hex inverters help in keeping digital systems stable.

74HC04 / 74LS04 NOT Gate Functionality
The 74HC04 and 74LS04 are hex inverter ICs, each containing six independent NOT gates. Every gate outputs the logical opposite of its input: HIGH becomes LOW, and LOW becomes HIGH. These ICs are commonly used to correct signal polarity, restore degraded digital signals, and buffer weak sources that cannot directly drive other logic inputs. Because they generate sharp transitions and consistent timing, they are useful for shaping signals, isolating stages, and ensuring reliable operation when combining different digital subsystems.
CMOS (74HC04) vs TTL (74LS04) Internal Operation
Although both devices perform identical NOT-gate logic, they differ in the transistor technology used internally, which affects voltage ranges, current capabilities, power consumption, and threshold behavior.

• 74LS04 – TTL (Bipolar Transistor Logic)
The 74LS04, built on TTL bipolar transistor logic, operates from a fixed 5V supply and is designed for classic TTL systems, offering strong current-sink capability suitable for driving LEDs or multiple TTL inputs, consistent TTL input thresholds that ensure predictable behavior in noisy environments, and higher static and dynamic power consumption due to its bipolar transistor architecture.
• 74HC04 – CMOS (Complementary MOSFET Logic)
The 74HC04, built on CMOS (Complementary MOSFET) logic, operates over a wide 2–6V range compatible with both 3.3V and 5V systems, offers extremely low static power consumption, delivers higher noise immunity than TTL, and provides balanced sourcing and sinking currents, though with weaker LED-driving capability compared to LS devices, making it ideal for modern microcontroller boards that require flexible voltage operation and low power draw.
74HC04 / 74LS04 Pinout
A standard DIP-14 package contains six inverters arranged symmetrically for easy board routing. Each gate has one input (A) and one output (Y), and all gates share the same power and ground pins.

| Pin | Label | Description |
|---|---|---|
| 1 | 1A | Input, Gate 1 |
| 2 | 1Y | Output, Gate 1 |
| 3 | 2A | Input, Gate 2 |
| 4 | 2Y | Output, Gate 2 |
| 5 | 3A | Input, Gate 3 |
| 6 | 3Y | Output, Gate 3 |
| 7 | GND | Ground Reference |
| 8 | 4Y | Output, Gate 4 |
| 9 | 4A | Input, Gate 4 |
| 10 | 5Y | Output, Gate 5 |
| 11 | 5A | Input, Gate 5 |
| 12 | 6Y | Output, Gate 6 |
| 13 | 6A | Input, Gate 6 |
| 14 | VCC | +5V (LS) / 2–6V (HC) |
Electrical Specifications of 74HC04 / 74LS04
| Parameter | 74HC04 (CMOS) | 74LS04 (TTL) | Notes |
|---|---|---|---|
| Supply Voltage | 2–6V | 4.75–5.25V | HC works at 3.3V; LS requires strict 5V |
| Output Current | ±4 mA | \~8 mA sink / low source | LS sinks LED current better |
| Propagation Delay | 8–14 ns | 15–25 ns | HC gets faster as VCC increases |
| Fan-Out | 10–15 CMOS inputs | 10 TTL inputs | Important in multi-driver designs |
Choosing the Right Variant of 74HC04 / 74LS04
• 74HC04 – Standard CMOS
Best all-around choice for modern digital systems. Suitable for both 3.3V and 5V logic, offering low power consumption and stable operation with microcontrollers.
• 74HCT04 – CMOS with TTL-Compatible Inputs
Outputs behave like HC, but inputs follow TTL thresholds. Use this when a CMOS system must accept 74LS/TTL signals without mismatched logic levels.
• 74LS04 – TTL
A robust 5V-only inverter with strong sink current. It remains preferred for legacy boards, LED indicator driving, and industrial environments where TTL thresholds are expected.
• High-Speed Variants (74AC04 / 74ACT04 / 74AUC04)
Used in fast clocks, RF-logic, or precision timing paths. These families offer significantly lower propagation delay but require careful voltage selection and PCB layout.
Variant Comparison Table
| Variant | Logic Family | Voltage Range | Speed (tpd) | Drive Strength | Best Use Cases |
|---|---|---|---|---|---|
| 74HC04 | CMOS | 2–6V | 8–15 ns | \~4–6 mA | General 3.3V/5V logic |
| 74HCT04 | CMOS (TTL Inputs) | 4.5–5.5V | 8–15 ns | \~4–6 mA | TTL-to-CMOS interfacing |
| 74LS04 | TTL | 5V only | 12–25 ns | Strong sink | LED drive, legacy TTL |
| 74AC04 | Advanced CMOS | 2–6V | 3–7 ns | High | High-speed clocks |
| 74LVC04 | Low-Voltage CMOS | 1.65–3.6V | 2–5 ns | High | Modern MCUs/SoCs |
NOT Gate Behavior & Floating Input Rules
Truth Table
| Input | Output |
|---|---|
| LOW | HIGH |
| HIGH | LOW |
An unconnected input has no defined state. It may pick up noise, switch randomly, or increase power draw, especially with CMOS (HC/HCT) devices.
Recommended Methods
• Use pull-ups or pull-downs to give each input a defined state
• Tie completely unused gates permanently to VCC or GND
• Avoid leaving CMOS inputs floating under any circumstance
Applications of the 74HC04 / 74LS04
Signal Conditioning
74HC04/74LS04 inverters clean slow or distorted digital edges, restore weakened sensor outputs, and sharpen PWM or communication signal transitions.
Debouncing
With an RC input network, an inverter reshapes switch signals into single, clean transitions that are suitable for digital counters or MCU inputs.
Oscillators & Timing
An inverter with an RC network can form a simple square-wave oscillator, two cascaded inverters can support crystal oscillators, and additional RC networks allow basic delay shaping or clock-gating functions.
Interfacing & Level Shifting
These inverters correct polarity mismatches between subsystems, provide simple 3.3 V ↔ 5 V level shifting in HC/HCT families, and help bridge logic families that use different threshold levels.
Logic Construction
By adding an inverter after AND or OR gates, you can build NAND and NOR functions, or implement other simplified Boolean logic where inversion is required.
Buffering & Drive
74HC04/74LS04 devices boost MCU pins that cannot drive multiple loads, can be used to drive LEDs (especially with LS04’s stronger sink current), and improve signal integrity by buffering and isolating circuit stages.
Example Circuits of 74HC04 / 74LS04 NOT Gate
Basic LED Inverter

A pushbutton feeds an inverter input. The output drives an LED through a resistor.
This demonstrates the fundamental inversion: pressing the switch can either turn the LED on or off depending on wiring.
Using Multiple Gates in One IC
A single 7404 can perform several unrelated jobs on the same board:
• Gate 1: Invert a reset or enable line
• Gate 2: Clean up PWM edges before a MOSFET driver
• Gate 3: Debounce a switch via RC
• Gates 4–6: Generate a simple oscillator or delay element
74HC04 / 74LS04 Troubleshooting Guidelines
| Problem | Cause | Fix |
|---|---|---|
| LS04 used at 3.3V | TTL thresholds violated | Use HC/HCT/LVC device |
| LED without resistor | Overcurrent | Add 220–330 Ω |
| No decoupling | Output instability | Add 0.1 µF near VCC |
| Floating inputs | Random switching | Use pull resistors |
| Driving inductive loads | Voltage spikes | Add transistor/MOSFET driver |
| Tied outputs | Output contention | Drive each load separately |
Conclusion
Mastering the 74HC04 and 74LS04 gives you a solid basis for building cleaner, faster, and more robust digital circuits. From timing and oscillators to signal conditioning, level shifting, and logic design, these inverters remain the basic tools across both modern and legacy systems. With the right variant and best practices, they deliver consistent performance, reliable logic operation, and long-term circuit stability.
Frequently Asked Questions [FAQ]
What is the difference between a 74HC04 and a 74HCT04?
The 74HC04 uses CMOS input thresholds, while the 74HCT04 uses TTL-compatible thresholds. This makes the HCT version ideal when you need CMOS outputs but must accept 5V TTL input levels without extra level shifting.
Can the 74HC04 or 74LS04 be used for analog signal shaping?
Yes, within limits. These inverters can square up slow or sloped analog waveforms if the input crosses the digital threshold cleanly, but they are not linear amplifiers and should not be used for continuous analog processing.
How many 74HC04 or 74LS04 chips can share the same power rail?
You can power multiple chips from the same rail as long as the supply can handle their combined current draw. Add a 0.1 µF decoupling capacitor per IC to prevent noise coupling between devices.
Do 74HC04 and 74LS04 outputs need protection when driving long wires?
Yes. Long wires add capacitance and noise pickup, which can cause ringing or false switching. Use series resistors (50–200 Ω), shorter traces, or a buffer if signal integrity becomes an issue.
Can a 74HC04 or 74LS04 drive a relay or motor directly?
No. Their output current is too low for inductive loads. Use a transistor, MOSFET, or dedicated driver IC, and add a flyback diode across the relay coil for protection.