You're currently on: Catalog » Guides » SN7404N: a beginner's guide to the TTL hex inverter
An inverter is the simplest logic building block: it flips a signal over. The SN7404N packs six of them into one 14-pin DIP and is classic standard TTL from the 7400 series. This guide explains what TTL levels mean in practice, how to connect a button and an LED the right way, and what happens between pressing the button and seeing the light.
Digital logic works with two states: low (L, close to 0 V) and high (H, close to the supply). An inverter – also called a NOT gate – has one input A and one output Y, and the output is always the opposite of the input: A = L gives Y = H, and A = H gives Y = L. That is the datasheet's whole function table.
It sounds trivial, but inverters are used everywhere: to turn an active-low signal into an active-high one (or the reverse), to buffer a weak signal so it can drive several inputs, and to build simple delays and oscillators. The six inverters in the SN7404N are completely independent; they share only power and ground.
The SN7404N is standard TTL (transistor-transistor logic). It runs on 5 V only, draws more current than modern CMOS, and its inputs and outputs are asymmetric: an output can pull a lot of current towards ground but can supply only a little when it is high. That directly affects how you wire buttons and LEDs.
The chip comes in a 14-pin plastic DIP (TI's N package) with 2.54 mm pin pitch. Seen from above with the notch pointing away from you, pin 1 is at the top left and the pins are numbered anticlockwise:
A TTL input distinguishes only two ranges. The datasheet guarantees that anything above 2.0 V (VIH) reads as high and anything below 0.8 V (VIL) as low. Voltages between 0.8 and 2.0 V are undefined: the output may sit anywhere, and a slow signal crossing this range can make the output oscillate.
In return, the output promises at least 2.4 V when high (with a 0.4 mA load) and at most 0.4 V when low (even while sinking 16 mA). The gap between what an output guarantees and what an input requires is the noise margin: 0.4 V in each direction. That is the room noise and voltage drop in the wiring can use up before a signal is misread.
The currents matter just as much. A low TTL input itself pushes up to 1.6 mA out of the pin, while a high input draws at most 40 µA. An output can sink 16 mA towards ground but may only source 0.4 mA when high. One output can therefore drive ten standard TTL inputs (16 mA ÷ 1.6 mA), but it is a poor choice for supplying current to an LED.
The example uses two of the six inverters: a button should light an LED. The asymmetry described above decides the layout.
The button goes to ground, with a pull-up resistor. With the button released, 4.7 kΩ holds input 1A high; the input current of at most 40 µA drops only about 0.2 V, so the input sits close to 5 V. When the button is pressed, 1A goes to 0 V and the input's 1.6 mA simply flows through the button to ground. The reverse – button to +5 V and a resistor to ground – works badly: the resistor would have to hold the input below 0.8 V while carrying 1.6 mA, which requires 500 Ω or less.
The LED sits between +5 V and the output. When output 2Y is low, it sinks the current through the LED and 330 Ω to ground. With about 2 V across a red LED and at most 0.4 V across the output, the current is around 8 mA – well below the 16 mA limit. The second inverter is needed because the first one gives a high output when the button is pressed; the second flips it back to low so the LED lights while the button is held.
The four unused inputs (3A, 4A, 5A and 6A) are tied to ground and the unused outputs are left unconnected. A 100 nF capacitor goes directly between pin 14 and pin 7.
If you need to drive a bus or many inputs at once, see the 74HCT541 bus buffer guide; HCT chips also accept TTL levels. For buttons and slow signals, the MC14093B Schmitt-trigger guide is the natural next step. Lifting a 3.3 V logic output to 5 V is covered in the SN74AHCT08 guide, and the 74HC08 guide shows how AND gates combine signals.
Pinout, package, function table, operating conditions, DC values and delays: Texas Instruments, SN5404, SN54LS04, SN54S04, SN7404, SN74LS04, SN74S04 Hex Inverters, SDLS029C (December 1983, revised January 2004). The example is a teaching circuit, not a tested product design.
See the SN7404N product · Texas Instruments SN7404 datasheet (PDF)
We use cookies to provide you with the best possible experience. They also allow us to analyze user behavior in order to constantly improve the website for you.