Hacker News new | past | comments | ask | show | jobs | submit login
Resistor–transistor logic (wikipedia.org)
84 points by peter_d_sherman on Aug 24, 2023 | hide | past | favorite | 34 comments



RTL was my first experience with digital circuit design.

When I was a teenager in the 1960s, my neighbor was a sales engineer at Motorola. He saw me put up an antenna on the roof and guessed correctly that I was into ham radio. So he gave me a big Motorola databook of RTL components and said, "Let me know if you ever need anything, and we can send you some free samples."

The book had had gates, flip-flops, everything. You could get an entire JK flip-flop in a little tin can the size of a TO-5 [1] (but with more leads)!

I wanted to build an iambic Morse code keyer. This has two separate switches for your thumb and forefinger. Press with your thumb and you get one or more "dits". With your forefinger, you get a stream of "dahs". Squeeze them together and you get alternating dits and dahs, thus the "iambic" name.

I designed the circuit, built it, and it worked great!

Until I actually hooked it up to my transmitter (which was of course the point of the whole exercise).

I didn't have much of a clue about RF shielding, and RTL wasn't very robust around RF energy. So the interference from my transmitter made the circuit go crazy!

I never did figure out how to fix it, so I had to go back to a straight key.

[1] https://en.wikipedia.org/wiki/TO-5


The main reason for RTL (and then DTL) at the time was conserving transistors. Discrete ones were quite expensive. In the mid-1960s roughly speaking, in modern dollars, a discrete transistor was about $10, while a semiconductor diode was about $1 and a resistor was, like today, about $0.05.

The cost of the transistors dwarfed concerns about the cost of the boards or other components. This is a flip-flop circuit from a PDP-8. [1]

It's diode-transistor logic, primarily. It's for 3 bits. There are only two transistors used per flip-flop to store the bits. A modern designer would use more transistors to route the inputs/outputs and for addressing the flip-flop. [2] The PDP-8 designers used capacitors and diode and resistor networks, to selectively pass pulses, using transistors only when truly necessary to invert or boost a signal. Several dozen diodes, caps and resistors, plus pulse logic (which complicates the whole design) were still cheaper than a few more transistors.

With early integrated circuits, the yield was terrible. Most of the devices didn't work. It's much easier to build up a working resistor than a working diode on an IC, and it's easier to build a diode than it is a transistor. Also, with a very large process size, there's little concern about the heat of resistors. When we start increasing speed and shrinking the die, the power dissipation becomes considerable. Even by the late 1960s the heat of RTL at high speed limited how densely you could pack in it an IC. This is the same reason why, much later, CMOS would displace NMOS, despite requiring 2x as many components on chip. It runs cooler so it can be packed much more densely and run at a higher clock.

(If you absolutely needed speed, from the 1950s right into the 1990s, you would use ECL, a kind of logic that doesn't switch on/off so the transistors never enter full saturation; like a differential amplifier, the current flow is constant.)

[1] https://homepage.cs.uiowa.edu/~dwjones/pdp8/UI-8/map/R211sch...

[2] https://ars.els-cdn.com/content/image/1-s2.0-S00262692163015...


> a resistor was, like today, about $0.05.

Sourcing on that, for no particular reason (also, since 1965 the dollar has inflated by ~10x):

Through-hole types that would have been used for this are around .5-1 cents in 5k quantities, and ~5 cents in units of 10+ (right on the money! I wouldn't have known that offhand.): https://www.digikey.com/en/products/filter/through-hole-resi...

SMD/chip resistors, which are used for most things except relatively small scale products, are .2-.5 cents in bulk: https://www.digikey.com/en/products/filter/chip-resistor-sur...

Note that obviously all these prices are pretty rough- digikey is not the cheapest source, and the context of the industry has changed a lot.


Its funny how integration inverted the „BOM“. In discrete systems, transistors were the most expensive components and resistors/caps were dirt cheap, so something like r-t-l made sense. On the chip, though, resistors and caps are „expensive“ due to huge area that they require and so its sometimes better/cheaper to emulate resistors and even capacitors with transistors


They dont emulate, they tune the transistor properties to get the required resistance or capacitance. Its pretty wild. They could use inbuilt caps and resistors, but, theres no need when tuning a transistor value yields the same result.

Iirc, the capacitance is dealt with by the gap distance of transistors, resistance by the lead


by emulation I have meant this: https://en.wikipedia.org/wiki/Switched_capacitor


Not to be confused with the other "RTL" which stands for "register-transfer level". [1]

[1] https://en.wikipedia.org/wiki/Register-transfer_level


I first encountered RTL technology when i was a kid, probably 14 or 15, rummaging at a local electronics surplus shop, looking for cheap boards to salvage parts from, and saw this odd board full of small modules in which components were sandwiched between the main board and the many mini PCBs it contained, each one, as I later discovered, made a RTL logic gate. It cost almost nothing, so i bought it and salvaged a good number of transistors from it, all marked with the SGS-ATES logo and internal numbering that made them impossible to identify, although they all worked in the non critical experiments a kid might try in the very early 80s.


Wasn't by any chance one of these, was it? https://www.oldcalculatormuseum.com/c-programma101.html

One of my "shoulda preserved that" regrets is demolishing (as a teenager) a nonworking Programma 101 for the bits and pieces. The interleaved rows of these modules made for very dense circuit packing for the discrete component era.


Not identical but quite similar: the mounting style and board arrangement was the same, although in my case all transistors were in TO-18 metal case, all resistors 1/4 watt, no inductors, diodes were very rare and the small board were green FR4 just like the main board.


I would also refer to those interested in RTL to the late Don Lancaster's "RTL Cookbook":

https://archive.org/details/RTL_Cookbook_Don_Lancaster


Came here to say this. Excellent book. Dead tree format is often pretty cheap, too.


Taking a course in digital circuits design made me appreciate that I get to work with software, as well as say thanks to those who actually supply circuits for that software to run on.


My favorite semester in college was when I had discrete math and digital circuit design at the same time.

Classroom: learn about Karnaugh maps.

Lab: build them.

That was incredibly satisfying.


Today's kids don't understand biasing the base current, it's all "CMOS-this" and "fan-out" that. Grumble grumble grumble.


The future is now, old man.


Note that for hobbyists RTL is still interesting when building a logic circuit from discrete components.


While RTL is a possible choice, DTL circuits (diode-transistor logic) are both easier to design and more efficient from the POV of power consumption. DTL circuits can also be faster, especially when implemented with Schottky diodes, which should be the normal choice for them.

DTL circuits are composed of transistors used as inverters and of diode circuits that are either minimum circuits a.k.a. AND or maximum circuits a.k.a. OR.

When considered as min/max circuits instead of and/or, they can work even with a multi-level logic, not only with binary logic.


Out of curiosity, what would be the advantage of DTL over TTL, which I would think would be the default choice for building discrete logic circuits ?


TTL is just an implementation variant of DTL, which had some advantages for low supply voltages.

When making DTL circuits with bipolar transistors, especially at low supply voltages, in order to make the logic levels at the output equal to the logic levels at the input, a simple solution was to add a diode at the output of an AND gate made with diodes, to shift down the logic levels by the voltage drop over that diode.

When the diodes used for gates were bipolar diodes, not Schottky diodes, they stored a big electric charge when on and they could be turned off quickly only if there was a path to evacuate the stored charge. Also the bipolar transistor of the inverter stored a big charge in the base, which had to be evacuated quickly for turning it off.

The current needed to evacuate the stored charge was required to pass in reverse direction through the level-shifting diode, which is not possible, so the DTL gates with level-shifting diodes were slow.

In bipolar IC technology, all diodes are made from transistor junctions, in order to not have separate process steps for making diodes. The junctions suitable for fast diodes are the emitter-base junctions. So all the diodes of a DTL gate were made inside an IC as multiple emitters of a transistor, with a short over the base-collector junction, to disable the transistor effect and make it work as a bunch of diodes.

At this point in the history of integrated DTL circuits, someone made the observation that seems trivial in hindsight, that removing the short over the base-collector junction allows to use it as the level-shifting diode, saving a diode.

Moreover, this not only saved a diode, but the bipolar transistor effect results in passing current through the reverse-biased level-shifting diode, allowing the fast turn off of the inverting transistor.

So in those early times, when DTL circuits could be made only with bipolar diodes and with bipolar transistors, TTL was the best variant.

Later, when the bipolar diodes were replaced with Schottky diodes, which store negligible charge when on, and when diode clamps were used over the inverting transistor, so that it no longer reached deep saturation and it no longer stored a big charge, TTL was no longer the optimal implementation and some of the so-called Schottky TTL families were actually DTL circuits, not TTL, but they had retained TTL as a marketing term, as this had become almost synonymous with bipolar logic integrated circuit.

TTL could never be used in discrete circuits, because it is based on bipolar transistors with multiple emitters and/or multiple bases, which have never been available as discrete parts.


diodes are cheaper, smaller, and easier to solder than transistors; ttl took off with integrated circuits

ttl was the default choice for building discrete logic circuits until about 01980, after which point it was obsolete because cmos (74hcxxx, not cd4xxx) was better in every way except esd

if you're running an educational computer lab on a tight budget, esd is still the dominant consideration, because students will burn out all your cmos chips with static after only a few dozen uses, while ttl chips will survive most of their mistakes

but outside a circuit lab or possibly repair of 40-year-old devices there's no reason to use ttl


It depends how "discrete" you mean. If you're using gate ICs, TTL has most of the advantages. If, for some reason, you're limiting yourself to discrete transistors, TTL is going to be hard to implement. These transistor-based projects are mostly done for the bragging rights.


Ok, but diodes are more expensive than resistors, and from what I can gather you also need more components in total.


You can get small signal Schottky diodes for less than 0.01USD each, even in small quantities. The bulk of the cost is going to be the boards and assembly.


Yeah, ok, but I suppose you need more components, so more space, so a bigger board and higher assembly cost.


No, DTL circuits do not have more components than RTL, they normally have much less components.

A maximum or minimum circuit with diodes, (i.e. an OR or AND gate) has just one diode for each input and one resistor for the output. In most cases each AND or OR gate must be followed by one inverter, to provide amplification, i.e. to restore the logic levels to values compatible with an input.

The complexity of the inverter depends on what kind of transistors are available and on what switching speed is desired, but sometimes the inverter can be made just with a single transistor without any other biasing components.

The economy of components vs. RTL appears in any complex circuits, because it is very easy to make DTL gates with a very large number of inputs, while RTL gates are restricted to a much smaller number of inputs, due to insufficient amplification from the transistors, so you need many RTL gates to replace one DTL gate with many inputs.

Using a diode matrix (and a decoder circuit, which can be made with another diode matrix), you can make a PLA or a ROM memory (the difference between PLA and ROM is that in the former both diode matrices have arbitrary diode patterns, while in the latter the diode matrix of the decoder has a fixed pattern, for selecting 1 of 2^N outputs with an N-bit input), and such PLAs or ROMs made with discrete diodes were still used in computers (e.g. for storing microprograms) many years after the integrated circuits had replaced simpler gates and flip-flops, because the ICs still had cost and size disadvantages.

The diode matrices have disappeared completely only after the introduction of integrated PROMs and PLAs (during the early seventies) that could be programmed by the end-users, by burning internal NiCr fuses.


It sounds interesting. I wonder though if diodes cause more current spikes in a system, so that perhaps currents exceed maximum ratings of the components for very brief moments.


Because a diode that becomes on has a very low resistance, there will indeed be great spikes of current, which is a desirable thing, because this causes faster switching times between the logic levels.

This is a reason why DTL circuits can be much faster than the RTL circuits, because in the latter the resistances slow down the charging and discharging of the various parasitic capacitances of the circuit.

The current spikes are not a problem (because they are very short in time), they just require the presence of good decoupling capacitors close to the gates, to keep the current spikes localized, and various other shielding or decoupling measures may be needed, to avoid creating radio interference above what is accepted by standards. This is unavoidable for fast logic circuits, regardless of their schematic.

There are only two ways to make a logic circuit faster, either making it smaller so that its capacitances become smaller too, or increasing the current spikes that can be delivered by the transistors. The problem in logic circuits is that the transistors always limit the current spikes to lower values than desired, which limits the attainable clock frequency, and never that the current spikes are too high.


I remember I tried to make a modular full-bit adder with NPN transistors, diodes and resistors. I was a bit foolish expecting NPN transistors to act as simple switches and I was in way over my head. But I learned a lot, since I went from this is a logic gate to can we build this as a circuit to holy f*ck this is actually how people did it. A very interesting project


I remember I tried to make a modular full-bit adder with NPN transistors, diodes and resistors. I was a bit foolish expecting NPN transistors to act as simple switches and I was in way over my head. But I learned a lot, since I went from this is a logic gate to can we build this as a circuit to holy f*ck this is actually how people did it. A very interesting project


Nice to see more hardware articles.


FWIW this is how async paradigms will be looked back upon a few decades from now. Droll, pathos-laden gawk-bait.


Are you talking about asynchronous logic? I thought that already is pretty much a curiosity.


Not the worst parallel to draw, I reckon, especially in the wake of Copilot, GPT-3, etc.

And I'm sure that circuit designers who'd invested the majority of their career in that async paradigm, only to see it facing obsolescence due to 'inexorable' tooling (digital EDA being that era's Copilot/GPT) advances, would've also downvoted an analogous comment :D




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: