Close

The 74HC138/154/238 as a (almost) universal logic gate

A project log for Discrete YASEP

a 16-bits YASEP computer (mostly) made of DIP/SOIC chips like in the 70s and 80s... with 2010's twists!

Yann Guidon / YGDESYann Guidon / YGDES 11/26/2015 at 10:530 Comments

The 74HC138 is a pretty awesome circuit. It can be used as a 6-inputs NAND gate with up to 4 inverted inputs. It even has 8 outputs !

If you prefer the AND function, use a 238 instead. And the '154 has 16 outputs!

For a more universal/arbitrary logic function, add some OR gates to the outputs: this provides XOR and MUX behaviour. And if you can do a MUX you can do a latch!

At this moment, I'm struggling to find decent prices for "littlegate"/"single gate" ICs (in the 74LVC1G and 74LVC2G family). The 74HC138 can be found in decent quantities at decent prices and will probably replace a few gates, for example for decoding logic (I'm looking at the UP/DOWN strobes of the register sets at this moment).

Discussions