Electronic Logic Conventions

1 Conversation



This entry examines the use of an alternative logic convention when electronic logic devices are used in applications. The question becomes that if all the rules of logic are stood on their head, how does this change the application of such devices. It shows that the answer is the dual function of the device. It gives a historical account of the rise and fall of this other convention, and tries to explain why some artefacts of it persist to the present day.


Introduction


There is a tendency to use the values 0 and 1 to represent the two values of a Boolean variable. This nomenclature is language independent, and when Boolean algebra is used in the context of binary arithmetic, it represents binary digits in an obvious manner.


In propositional logic, it is more usual (in English) to name the states of Boolean variables true and false. This nomenclature is the origin of the usual names for those logic functions which are widely available, implemented as electronic devices, and commonly referred to as gates.


However, another notation is popular in the specifications of electronic devices, using the names high and low, suggestive of the signal levels involved, and handily abbreviated to H and L.


Choice of Convention


It is an almost universal usage to take 0 and false as equivalent, with 1 and true then also equivalent. Perhaps 0 and false have a negative connotation, whereas 1 and true are more positive, but anyway both the digits and the words are merely abstract ideas.


However, in the context of electronic devices, the high/low notation is very concrete, and usually1
refers to voltage levels. The behaviour of a logic device can be described with these terms used for the inputs and outputs, and this behaviour is a fixed characteristic of any particular device.


The positive logic convention represents 0/false as low and 1/true as high, and is so universally used today that this is often not even mentioned. However, there is also the negative logic convention, which represents 0/false as high and 1/true as low.


There are no other conventions which are essentially different from these two. This does not preclude other names such as yes and no being used for the two Boolean states, and other names such as on and off being used for the physical states which represent them. Once one physical level is used for either of the two Boolean states, the other is then determined, and the initial choice can be made in only two ways. We have called the resulting conventions the positive convention and negative convention, as was common in the electronics industry.


Effect of Convention Change


Using alternative logic conventions can be confusing, so we offer the following example. Suppose we have a two-input device whose output is high unless both inputs are high, and this is determined by the device construction.


In the positive convention, the output is true unless both inputs are true, but then the output is false only when both inputs are true, so the device implements the Boolean NAND function.


In the negative convention, the output is false unless both inputs are false, but then the output is false when either or both inputs are true, so the device implements the Boolean NOR function.


Thus, the function implemented by the device depends upon the logic convention adopted. In older device data sheets, in was common to see this device described as a "positive NAND/negative NOR" gate, but these days it is usually a NAND gate plain and simple. However, it remains the case that it can be regarded as a NOR gate if the negative logic convention is chosen.


We can generalise the above: any Boolean function F which depends upon a number of arguments, has a related function G (called the dual) obtained from F, where G is the logical negation of F when the arguments are also logically negated. This relationship is symmetrical, that is, if G is the dual of F, then F is the dual of G. In our example, NAND and NOR are duals of one another. This symmetry arises because for any Boolean value X, the logical negation of the logical negation of X is just X.


The dualisation process, which might be crudely expressed as negate everything, precisely describes what happens when the logic convention is changed. A gate device implementing a function in one convention implements the dual function in the other convention.


Why use Negative Logic


Since the use of negative logic causes a great deal of confusion, why was it ever used? The main reason perhaps is historical2.


The earliest electronic logic (and electronic computers) used thermionic valves (vacuum tubes in the USA), which were usually constructed inside glass containers known as envelopes, and valves were commonly referred to as bottles. Valves require rather high voltages to operate, and their anode electrode, normally used for signal output, needed to be positive with respect to the cathode, which was preferably at low voltage for technical reasons3.


The early transistors were germanium (mostly) PNP devices, whose collector (analogous to the valve anode) needed to be negative with respect to the emitter (analogous to the valve cathode). If then one chose to have the emitter end of the power supply at least absolute voltage (roughly speaking earthed), the high voltages were negative.


Just as engineers adjusted to this change, along came silicon (mostly) NPN transistors, requiring positive collector voltages for operation. Early gates were made from discrete transistors, and could be PNP or NPN, silicon or germanium, as all four transistor types were available4, and confusion abounded.


Amidst this confusion, the first digital integrated circuits appeared, and were invariably silicon based. The first types, called RTL for resistor transistor logic, had low performance, and were rapidly superseded by a technology called DTL for diode transistor logic. DTL was quite useful, and remained in vogue until the multi-emitter transistor was invented, and these were the basis for devices of the family called TTL for transistor transistor logic.


The use of both logic conventions was, in part at least, an attempt by the integrated circuit vendors to make their products attractive to design engineers, whatever devices they had previously used. In those early days, the use of both logic conventions had the best chance to succeed, given the then recent history of transistors.


Once everyone was converted to digital integrated circuits, and that soon came to mean TTL circuits, the use of two conventions remained a confusion, and the negative logic convention quietly disappeared. Some engineers, who understood the muddle, and were familiar with both conventions, found it easier to change convention than to invoke De Morgan's laws.


Is Negative Logic Still Used.


The answer is probably no, but this must be qualified. Two details of device technology need mentioning, to illustrate this.


Most TTL device outputs use two transistors, which operate rather like switches. One switch strongly pulls the output down toward the low voltage line, which we will call 0V (for zero volts). The other switch weakly pulls the output up toward the positive power rail, which with TTL means +5V. The TTL device is designed so that only one of these switches is on at time5, so the output is either pulled down to 0V, or up toward +5V. It is normally undesirable to connect the outputs of two such devices together, for if one device tries to pull up while the other tries to switch pull down, the resulting contention means the power supply is partially short-circuited, and the devices may be destroyed. TTL inputs are rather odd, requiring that to be considered low, a modest current must be drawn from the input, to hold the input near to ground (below 0.8V), but to be considered high, only a tiny current must be supplied to raise the voltage above a modest level (above +2V). This is of course is compatible with the pull up switch being rather weak. Some devices are available which have only the pull down switch, so the output happens to be the collector of a transistor, and they are called open collector devices. The idea is that if a current limiting device is used to permanently pull the output upwards, this is non-destructive, and sufficient to drive other device inputs. The outputs of several open collector devices can be connected together, with only one pull up device (which is just a resistor), and the result is that the common output is high only when no device is pulling it low, and is high only when all connected devices agree that it should be. This is manifestly the AND of all device outputs, but open collector devices are often described as having wired OR capability - clearly using the negative logic convention.


There are also many devices which have inputs which are designed to have a particular purpose, but those inputs are described as being active low. Many microprocessors have an input called the interrupt request (IRQ is the usual name). Many, but notably not the Intel offerings, have IRQ inputs which are active low. This means that an interrupt is requested when the line is low, and could be construed as a vestige of the negative logic convention. In that case, when several external devices may need to request an interrupt using the same line, open collector devices are often used, so that one device or another can make the request. The open collector devices really are using a wired OR capability in this case, but this is really not easily comprehended in positive logic terms.

1
Voltage levels are usually meant, but current sinking logic devices were once known, principally one version of the 9900, an early 16-bit microprocessor chip.
2
The reason given here may be slightly contentious. It represents the opinion of an author working in the electronics industry whilst the changes mentioned were occurring.
3
Heater power is reduced if the cathode insulation from the heater is minimised, so it is preferable to have cathodes and heaters at low voltage. The cathodes have to be kept literally red hot.
4
To begin with, germanium devices were mostly PNP, and silicon devices mostly NPN, and now silicon predominates. PNP and NPN devices existed in both materials.
5
The switch pulling down to ground usually operates more quickly, and there can be transient conditions where both are on. This causes a large pulse of current to be required from the power supply, and is something that the devices are rated to withstand and the power supply arrangements must cater for. One of the technical problems in the use of TTL is ensuring that power supply voltages do not dip excessively as a result of these pulses.

Bookmark on your Personal Space


Entry

A1281098

Infinite Improbability Drive

Infinite Improbability Drive

Read a random Edited Entry


Written and Edited by

References

h2g2 Entries

Disclaimer

h2g2 is created by h2g2's users, who are members of the public. The views expressed are theirs and unless specifically stated are not those of the Not Panicking Ltd. Unlike Edited Entries, Entries have not been checked by an Editor. If you consider any Entry to be in breach of the site's House Rules, please register a complaint. For any other comments, please visit the Feedback page.

Write an Entry

"The Hitchhiker's Guide to the Galaxy is a wholly remarkable book. It has been compiled and recompiled many times and under many different editorships. It contains contributions from countless numbers of travellers and researchers."

Write an entry
Read more