Op-Amp Challenge: A Logic-Free BCD

Of digital electronics, a wise man once said that “Every idiot can count to one.” Truer words have rarely been spoken, because at the end of the day, every digital circuit is really just an analog circuit with the interesting bits abstracted away. And to celebrate that way of looking at things, we’re pleased to present this BCD to seven-segment converter that uses no logic chips.

With cheap and easily available chips that perform this exact job, it might seem a little loopy to throw 20 LM324 op-amps at the job. But as [gschmidt958] explains, this is strictly for the challenge, plus it made a nice entry in the recently concluded Op-Amp Challenge contest. His work began in simulation, exploring op-amp versions of the basic logic gates — NAND, AND, OR, and NOT — all of which rely on using the LM324s as comparators. There were real-world curveballs, of course, not least of which was running out of the 10k resistors used for input averaging. Another plot twist was running out of time to order a PCB, which required designing one using MS Paint and etching it at home.

The demo video below shows the circuit at work, taking the BCD output of a 74HC393 counter — clocked by a 555, naturally — and driving a seven-segment LED.  It’s honestly a lot of work for such a simple task, but there’s something satisfying about the whole project. We think [Widlar] would be proud.

10 thoughts on “Op-Amp Challenge: A Logic-Free BCD

  1. Trivia…

    Charles Sanders Peirce (during 1880–1881) showed that NOR gates alone (or alternatively NAND gates alone) can be used to reproduce the functions of all the other logic gates…[1]

    Binary Coded Decimal (BCD), Octal, and Hexadecimal are identical for the positive integers zero through nine.[2][3][4]

    1. Universal Logic Gates


    2. Binary-coded decimal


    3. Octal


    4. Hexadecimal


  2. Maybe these aren’t thought of as “logic chips”, but ANY circuit that operates on one or more inputs and produces only one of two output values is a logic chip. So there.

    I am reminded of the in-house designed chips that Tektronix used for several years to produce vector-drawn characters on oscilloscope screens, to show numeric values such as the volts/divison and time/division settings, but also for numeric measurements, such as frequency. These used ANALOG inputs going into multiple comparators (within the chip) to produce sequences of X and Y ramps that drew the characters, where there was a specified range of input voltages associated with each character. The main failure mode of these parts, as I recall, was that they would sometimes skip the ‘9’, going directly from 8 to 0 as the voltage changed. Which was kind of bad.

    1. Amen.

      The universe is analogue, and that will never change. Our direct interaction with it therefore, will always be analogue. This is already creating problems for us, as fewer-and-fewer engineers have that ‘gut’ feel for analogue electronics. I think it is already becoming a difficult task finding engineers with the required skill to design new integrated circuits (digital or analogue).

      …and +1 for spelling ‘analogue’ properly… :-)

  3. The circuit does use logic gates. The gates are just made with opamps wired as comparators. Suggestion for improvement is to use an analog input voltage instead of a binary input. You could make an ADC using opamps, possibly you can optimize the circuit to merge the ADC and the bin2BCD converter and use fewer components then a naive approach.

    1. I had actually thought of driving the input to the converter with an op amp ADC instead of a counter. The ADC could be driven by another pair of op amps that produce a sawtooth wave, so it would continously count both up and down.

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.