7404 (74LS04, 74HC04): the hex inverter chip, live
The 7404 is a 14-pin chip with six independent inverters (NOT gates), which is what "hex inverter" means: each output nY is the opposite of its input nA. The 74LS04 and 74HC04 share the same pinout, with VCC on pin 14 and GND on pin 7. This live chip has all six inverters.
Six inverters in one package are handy because so many signals arrive in the wrong polarity: active-low chip selects and enables (like those of the 74LS138 or the 74HC595), a complement for a multiplexer's select line, or the NOT in front of a flip-flop's clock. The pinout alternates input and output up the left side (1A, 1Y, 2A, 2Y, 3A, 3Y) and output and input down the right (4Y, 4A, 5Y, 5A, 6Y, 6A), so check which pin is which before wiring. Each inverter here is a real CMOS inverter: one PMOS and one NMOS, exactly one of them on. All 64 combinations of the six inputs are checked before the page is built.
Open this circuit in the lab →
What you need
- 6× NOT: six independent NOT gates, Y = NOT A, numbered 1 to 6 as on the datasheet
Step by step
- Power the chip:
VCCon pin 14 andGNDon pin 7 (5 V for the 74LS04; 2 V to 6 V for the 74HC04). - Each inverter has one input
nAand one outputnY; find their pins in the pinout below. - Tie every unused input to VCC or GND: TI's 74HC datasheets say unused inputs must be terminated, because a floating CMOS input can drift and draw current.
- Toggle 1A: 1Y always shows the opposite value. Each of the six inverters works on its own.
7404 pinout
| Pin | Name | Pin | Name |
|---|---|---|---|
| 1 | 1A | 14 | VCC |
| 2 | 1Y | 13 | 6A |
| 3 | 2A | 12 | 6Y |
| 4 | 2Y | 11 | 5A |
| 5 | 3A | 10 | 5Y |
| 6 | 3Y | 9 | 4A |
| 7 | GND | 8 | 4Y |
NOT truth table (each gate)
| A | Y |
|---|---|
| 0 | 1 |
| 1 | 0 |
Pin numbers are for the DIP and SOIC packages (TI SN74HC04 and SN74LS04 datasheets, checked 2026-10-25). See also the NOT gate truth table.
You can also read the full theory in the lesson on the NOT gate. Prefer to build it yourself from scratch? Open the digiwleea lab and place the gates on the canvas, or start from the logic gate simulator.
Build more parts from gates
Each of these is one step from a transistor to a working CPU. Build every gate from CMOS transistors and work all the way up in the free digiwleea lab, with the free theory reference alongside.
Open the 7404 hex inverter chip in the lab →Frequently asked
What does hex inverter mean?
Hex means six: the 7404 contains six independent inverters (NOT gates) in one 14-pin package, each turning a 1 into a 0 and a 0 into a 1.
What is the 7404 pinout?
Pin 1 1A, 2 1Y, 3 2A, 4 2Y, 5 3A, 6 3Y, 7 GND, 8 4Y, 9 4A, 10 5Y, 11 5A, 12 6Y, 13 6A, 14 VCC.
What is the difference between the 74LS04 and the 74HC04?
The same six inverters and pinout. The 74LS04 is TTL for a 5 V supply; the 74HC04 is CMOS, runs from 2 V to 6 V and draws far less current.
How many transistors does a CMOS inverter use?
Two: a PMOS transistor from VDD to the output and an NMOS from the output to ground, with their gates tied together as the input. Exactly one conducts at a time, so the output is always driven.