# The role of resistor in e.g. an AND gate

What is the role of the resistor in e.g. an AND gate like this one? :

One often sees lots of resistors in electric circuits, but I haven't really understood their role.

-
This is rather more a technology question that one of physics per se. I'll ask the mods at Electronics.SE if they want it. – dmckee♦ Dec 6 '11 at 16:29
I suppose that is why I can't find the answer in my High School basic physics books. – Anders Hovgaard Dec 6 '11 at 16:38
It's a "pull-up" resistor that pulls the out terminal up to +5 volts. – John McVirgo Dec 6 '11 at 16:48

1
Pull up is lab slang, it does not explain what the resistor does when A or B or both are low: limiting the current through the diodes and acting as a voltage divider between itself and the equivalent resistance of the diodes when conducting. Funny that such oldfashioned RDL pops up again :=) AFAIK RDL was never produced as integrated circuits, integration started with RTL, but I am not absolutely shure. – Georg Dec 6 '11 at 17:55
The question can be analyzed by the methods of physics and Electronics.SE doesn't want it (too basic), so I'm not going to close it, but lets have answers with physics in them. – dmckee♦ Dec 6 '11 at 18:40

## 2 Answers

The resistor provides the logic one when both inputs are high. As far as choosing a resistor, this is a matter of two contradictory requirements.

(1) You want the resistor to be low so that the circuit's propagation delay for low to high transitions is short. That is, you want it to drive a capacitive load (for example, wire plus parasitic capacitances) quickly. If the load is C and your time budget for the rise time delay is T, then you want $RC < T$ so pick $R < C/T$.

(2) You want the resistor to be high so that the circuit does not dump a lot of current through the diodes when the output is low. If the maximum current your weakest input can sink (at its low voltage level) is I, then you want $IR > V - V_d$ where $V_d$ is the voltage drop of the forward biased diode, so $R> (V-V_d)/I$.

This type of AND gate is somewhat primitive in that its low output voltage is a diode drop higher than its low voltage input. Therefore its output has a diode drop less noise immunity than its input (as compared to the same high voltage level). One can only do this so many times before running out of noise margin. This is why modern logic families have less primitive output stages.

-

Resistors are generally used to dimension electrical devices to the ranges in voltage, current, time constants, what have you, that are needed. In this specific example the resistor is used to dimension the voltage drop in case one of the inputs has low voltage (lower than $V$), so that a current flows from $V$ to the input (it can only flow in this direction because of the way the diodes are connected).

Once a current $I$ flows, a drop of $V_{drop}=IR$ will drop across the resistor and lower the output voltage. This ensures the functionality as an AND gate. If both input voltages are high, no or only little current will flow, thus only a small voltage will drop keeping the output voltage high. If one of the too inputs has low voltage, the output oltage will drop.

In logical terms high voltages are logical 1s and low voltages are logical 0s.

To summarize $V$ is dimensioned to define what "low" and "high" voltages are. and $R$ is dimensioned to define how big the voltage drop is going to be.

-
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 11, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "github"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "english_confidence": 0.9424561858177185, "perplexity_flag": "middle"}