1
\$\begingroup\$

One thing that's confused me ever since I started studying digital design is what it means when books say, roughly, that we can choose or define the input and output thresholds for a given circuit family. I was unsure why those were seemingly so arbitrary.

I am now reading Harris and Harris's Digital Design and Computer Architecture and, while it's an introductory book, it seems to make some deep (to me anyway) points about the fundamental operation of digital circuits. In particular, it is emphasized that digital circuits are really just a particular subset of analog circuits -- namely that subset of analog circuits which is such that, unless switching, all signals are near HIGH or LOW because of the nature of the subcircuits contained therein.

Relatedly, the static discipline within a digital circuit is defined as including only subscircuits (gates) within the circuit which are such that, given logically valid inputs, every circuit element will produce logically valid outputs.

My questions given the above are as follows:

(1) Why can we define thresholds? I have some vague sense that it's related to my two paragraphs above, but I can't quite get my arms around it.

(2) From various examples in the book, it seems like only gates with transfer characteristics (with respect to a given input) which achieves a slope of absolute value greater than 1 can be used as a digital logic gate. Modulo all of the comments that a dc characteristic ignores transient effects, why is this the case? I think this is relaated to (1) above and hence I include it here.

For example, in the two figures below, we have (apparently) that the first can be used as a logic gate whereas the second cannot.

enter image description here enter image description here

\$\endgroup\$
5
  • \$\begingroup\$ Have you looked at ECL, yet? Just curious. :) \$\endgroup\$ Commented Feb 10 at 23:26
  • \$\begingroup\$ What do you mean by ECL? @periblepsis \$\endgroup\$
    – EE18
    Commented Feb 10 at 23:31
  • \$\begingroup\$ Emitter-coupled logic. I think there's a Wiki page on it. For voltage circuits, like you are considering now, this image shows for example a hypothetical design specifying valid logic level regions and invalid regions. There are traces through the invalid regions showing variations over temperature and input gate variances as signals move from one to another of the defined regions. \$\endgroup\$ Commented Feb 10 at 23:34
  • \$\begingroup\$ Well-written question: one that won't/hasn't needed several QA rounds. \$\endgroup\$
    – stretch
    Commented Feb 11 at 1:03
  • \$\begingroup\$ @EE18 Emitter-coupled logic is the Wiki page on ECL. A logical "0" is shown as -1.7 V and a logical "1" as -0.9 V. \$\endgroup\$ Commented Feb 11 at 9:51

1 Answer 1

3
\$\begingroup\$

namely that subset of analog circuits which is such that, unless switching, all signals are near HIGH or LOW because of the nature of the subcircuits contained therein.

That's only in binary logic, and even that is inaccurate.

  1. Ternary logic was used in the Soviet Union for some research computers, there are hobbyists actively designing such circuits (myself included).

  2. Internal logic levels inside of the gates may have not much to do with external logic levels. Just two examples:

  • a logic chip may work with 3.3V I/O, but internally at say 1.8V; many MCUs do something like that,

  • ECL logic gates routinely used 4 or 6 logic levels internally in the chip, while externally there were only 2 levels.

  1. Quaternary and higher radix logic is used internally in FLASH memories, such as those used in solid-state drives (SSD).

  2. Non-binary logic is often used for data transmission.

  • Ternary logic is extremely common - you surely have some of it at home. 100MBit ethernet uses ternary MLT-3 line encoding

  • High-radix logic levels is used on the air in modems of all sorts: good old telephone modems, cable modems, cellular digital transmission, digital radio, satellite services, etc.

books say, roughly, that we can choose or define the input and output thresholds for a given circuit family. I was unsure why those were seemingly so arbitrary

Well, they are not exactly arbitrary. We choose those levels to fulfill the requirements of the logic family. When designing a logic family, we choose the operating voltage range, noise margins, architecture of the gates (TTL vs RTL vs two-level CMOS vs ECL), and so on - all with mind on the application area, manufacturability and yield constraints, available technologies vs. R&D effort, etc.

Some logic "families" are only designed for I/O purposes, i.e. you don't have any "gates" in the family, but only transceivers that talk to each other using that "family", but interface to the rest of the circuit using other logic levels entirely. LVDS (low-voltage differential signaling, as used in HDMI, superspeed USB, etc.) is a common example.

The exact levels depend on - among other things -

  1. the architecture of the input and output circuits within each logic element (gate, FF, register, ...),

  2. the semiconductor process used to implement said architecture, including tweaks to parameters of the individual devices on the chip (say a couple transistors use a different diffusion for the channel than the rest of the chip).

For example, you could have some high-voltage variant of bipolar ECL if the semiconductor process was high-voltage bipolar. Not that it would necessarily be useful, but if you needed it, the levels would be influenced by what the process can survive, and by how the ECL architecture fundamentally works.

Same with CMOS: the voltage rating of the CMOS process will determine the allowable range of the logic levels - they cannot exceed the supply rails usually. Within those limits, the levels will be determined by the thresholds of the MOS devices in the IC. Those device thresholds can be further tweaked e.g. by using the body effect, adjusting the process parameters, adding diffusion steps to "customize" selected transitors' behavior, choosing a particular input or output topology, ...

For example, you can design a 3.3V CMOS logic output transceiver with differential input that has input threshold at say 0V differential voltage, i.e. differential voltages <0V register as low, differential voltages >0V register as high. The common mode voltage of the differential input can be "anywhere" in the supply range. So, that logic gate, if presented with voltages 0.2V and 0.3V on the two inputs would output a high logic level, but when presented with voltages 3.2V and 0.0V would output a low logic level.

Why can we define thresholds? I have some vague sense that it's related to my two paragraphs above, but I can't quite get my arms around it.

Because logic circuits are fundamentally analog circuits. When you design a CMOS gate's input circuits, you can choose what gate-source threshold voltages the MOS devices in that input circuit have, and that determines the input logic level. How you arrange the transistors, what sort of internal reference voltage sources you use (if any), etc. It's all almost infinitely configurable. What matters in practice is whether it's useful for anything so that you can hope to get customers to buy it from you, and how manufacturable it is - production yields affect profit margins and make-or-break the profitability of a semiconductor product.

Same when you design the CMOS gate's output circuits. They may, for example, be a level translator - the input logic levels may be 0V and 3.3V, but the output logic levels may be arbitrary and defined by two input voltages. That's not hard to do. Take any 2:1 analog multiplexer. The two inputs define the output logic levels - just hook them up to constant voltages. The "select" input of the multiplexer then is the "normal" logic level input. Although CMOS output stages are not usually designed using pass gates like analog muxes are, there's nothing fundamentally that forbids that. Is is an easy way to get logic translation from HV CMOS levels (say 12V supply CD4000 logic family) to any other levels (say 0V and 1.8V).

it seems like only gates with transfer characteristics (with respect to a given input) which achieves a slope of absolute value greater than 1 can be used as a digital logic gate.

Fundamentally yes, since otherwise the gates won't be saturating the outputs, and after a few gates the logic levels will be invalid.

Although that's a simplification too. In practice, sometimes such logic elements are used internally to reduce power consumption, and interspersed are "snap action" elements that re-generate the "saturated" logic levels.


You have to be very careful about textbooks, because they make all sorts of simplifications but do an awful job explaining what those simplifications are. In almost any area of engineering, the reality is usually way more complex than the introductory textbooks would lead you to believe. The books you're talking about are certainly of an introductory character. For the state of the art, look into contemporary published research on CMOS circuits etc. It can be overwhelmingly complex if you look deep enough.

\$\endgroup\$
4
  • \$\begingroup\$ Thank you. I've read this wonderful answer once and plan to again this evening when I get home. A couple questions: (1) One thing I am stuck on is what it even means to choose the thresholds. If I am understanding you correctly, it is not strictly the case that we choose these levels but rather that we choose a whole host of other parameters which are in turn such that if we respect our input thresholds then everything in the digital circuit will work. Thus, in this sense, our input thresholds are emergent phenomena (which we've designed for). (2) Would it be possible to flesh out your... \$\endgroup\$
    – EE18
    Commented Feb 10 at 23:49
  • \$\begingroup\$ ...last point a bit more when you get the chance. That is, could you show (perhaps by example) why the "transfer characteristic slope of absolute value greater than 1" requirement is absolutely necessary? I'm not sure I follow that. \$\endgroup\$
    – EE18
    Commented Feb 10 at 23:50
  • 1
    \$\begingroup\$ @Kuba hasn't forgotten Monica You always have so much work, obviously, in your answers, that I always feel greatful even before reading. Keep on. \$\endgroup\$
    – stretch
    Commented Feb 11 at 1:12
  • 1
    \$\begingroup\$ A great answer indeed, thanks Kuba. And as I scroll upwards to +1 it, I am a bit shocked that I am the first to do so. 58 views means a bunch of people have already the great answer I have just read \$\endgroup\$ Commented Feb 11 at 14:25

Not the answer you're looking for? Browse other questions tagged or ask your own question.