10M+ Electronic Components In Stock
ISO Certified
Warranty Included
Fast Delivery
Hard-to-Find Parts?
We Source Them.
Request a Quote

74HC04 / 74LS04 Hex Inverter ICs

груд. 07 2025
Source: DiGi-Electronics
Browse: 1277

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.

Figure 1. 7400 Series 74HC04 and 74LS04

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.

Figure 2. 74HC0474LS04 IC Connected to Power

• 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.

Figure 3. Pinout of 74x04

PinLabelDescription
11AInput, Gate 1
21YOutput, Gate 1
32AInput, Gate 2
42YOutput, Gate 2
53AInput, Gate 3
63YOutput, Gate 3
7GNDGround Reference
84YOutput, Gate 4
94AInput, Gate 4
105YOutput, Gate 5
115AInput, Gate 5
126YOutput, Gate 6
136AInput, Gate 6
14VCC+5V (LS) / 2–6V (HC)

Electrical Specifications of 74HC04 / 74LS04

Parameter74HC04 (CMOS)74LS04 (TTL)Notes
Supply Voltage2–6V4.75–5.25VHC works at 3.3V; LS requires strict 5V
Output Current±4 mA\~8 mA sink / low sourceLS sinks LED current better
Propagation Delay8–14 ns15–25 nsHC gets faster as VCC increases
Fan-Out10–15 CMOS inputs10 TTL inputsImportant 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

VariantLogic FamilyVoltage RangeSpeed (tpd)Drive StrengthBest Use Cases
74HC04CMOS2–6V8–15 ns\~4–6 mAGeneral 3.3V/5V logic
74HCT04CMOS (TTL Inputs)4.5–5.5V8–15 ns\~4–6 mATTL-to-CMOS interfacing
74LS04TTL5V only12–25 nsStrong sinkLED drive, legacy TTL
74AC04Advanced CMOS2–6V3–7 nsHighHigh-speed clocks
74LVC04Low-Voltage CMOS1.65–3.6V2–5 nsHighModern MCUs/SoCs

NOT Gate Behavior & Floating Input Rules

Truth Table

InputOutput
LOWHIGH
HIGHLOW

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

Figure 4. Basic LED Inverter Circuit Diagram

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

ProblemCauseFix
LS04 used at 3.3VTTL thresholds violatedUse HC/HCT/LVC device
LED without resistorOvercurrentAdd 220–330 Ω
No decouplingOutput instabilityAdd 0.1 µF near VCC
Floating inputsRandom switchingUse pull resistors
Driving inductive loadsVoltage spikesAdd transistor/MOSFET driver
Tied outputsOutput contentionDrive 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.