If this is a buffer, why use an AND gate, aside from better availability of that gate in a single package? This is on an Analog Devices SHARC eval board.
Electronic – the purpose of an AND gate with the same signal on both inputs
bufferlogic-gates
Related Solutions
It's not the fact that it's tri-state that makes the difference, it's the fact that it's a buffer. Buffers are generally designed to supply more current than a normal logic stage.
They still have a fanout limit; it's just a higher limit. What that limit is, you will have to learn from the datasheets for your logic family and your buffer.
A 74LS00 input can consume 20 uA pulled high, or 0.4ma pulled low. The 74LS00 gate can source 400 uA and sink 8 ma, 20x as much as the input current, so its fanout is 20.
But the 74LS240 driver can source 15ma and sink 24ma, so it can pull 60 TTL inputs low, and its fanout is therefore 60.
If one buffer isn't enough you can connect 2 or more in parallel (up to the normal fanout for your logic stage) each driving a different set of gates.
You might well ask why it can source 15ma instead of just 60 * 20ua = 1.2ma. That's because buffers also have to drive relatively long wires with high capacitance, and doing so at any speed takes current in both directions (pulling both high and low). If you need 15ma to drive the cable fast enough, you would also have to reduce the fanout (number of inputs it can pull low) or live with slightly lower speed.
You might also ask why I'm using a logic family about as old as Abba : that's because modern CMOS logic requires so little input current that any fanout number is likely to be in the thousands; other issues like the wire speed problem matter much more.
Fanout is still there in the background and shouldn't be totally forgotten, but any logic course that gives it much attention probably needs updating!
Buffers are used whenever you need... well... a buffer. As in the literal meaning of the word. They're used when you need to buffer the input from the output. There are countless ways to use a buffer. There are digital logic gate buffers, which are passthroughs logicwise, and there are analog buffers, which act as passthroughs but for an analog voltage. The latter is kind of outside the scope of your question, but if you're curious, look up 'voltage follower'.
So when or why would you use one? At least when the simplest and cheapest buffer of all, a copper wire/trace is readily available?
Here are a few reasons:
1. Logical Isolation. Most buffers have an ~OE pin or similar, an output enable pin. This allows you to turn any logic line into a tristate one. This is especially useful if you want to be able to connect or isolate two busses (with buffers both ways if needed), or maybe just a device. A buffer, being a buffer between those things, lets you do that.
2. Level Translation. Many buffers let the output side be powered from a different voltage than the input side. This has obvious uses for translating voltage levels.
3. Digitization/repeating/cleanup. Some buffers have hysteresis, so they can take a signal that is trying real hard to be digital, but just doesn't have very good rise times or isn't quite playing right with thresholds or whatever, and clean it up and turn it into a nice, sharp, clean-edged digital signal.
4. Physical Isolation You have to send a digital signal further than you like, things are noisy, and a buffer makes a great repeater. Instead of a GPIO pin on the receiving end having a foot of pcb trace connected to it, acting as an antenna, inductor, and capacitor and literally vomiting whatever the heck noise and awfulness it wants directly into that poor pin's gaping mouth, you use a buffer. Now the GPIO pin only sees the trace between it and the buffer, and the current loops are isolated. Heck, you can even properly terminate the signal now, like with a 50Ω resistor (or whatever), because you have a buffer on the transmit end too and can load them in ways you could never load a wimpy little µC pin.
5. Driving loads. Your digital input source is high impedance, too high to actually interface with the device you want to control. A common example might be an LED. So you use a buffer. You select one that can drive, say, a hefty 20mA easily, and you drive the LED with the buffer, instead of the logic signal directly.
Example: You want status indication LEDs on something like a I2C bus, but adding LEDs directly to the I2C lines would cause signaling issues. So you use a buffer.
6. Sacrifice. Buffers often have various protection features, like ESD protection, etc. And often they do not. But either way, they act as a buffer between something and another thing. If you have something that might experience some sort of transient condition that could damage something, you put a buffer between that thing and the transient source.
Put another way, chips love exploding almost as much as they love semiconducting. And most of the time, when something goes wrong, chips explode. Without buffers, often whatever transient that is popping chips left and right will reach deep into your circuit and destroy a bunch of chips at once. Buffers can prevent that. I'm a big fan of the sacrificial buffer. If something is going to explode, I'd prefer it be a 50¢ buffer and not a $1000 FPGA.
Those are some of the most common reasons I could think of off the top of my head. I'm sure there are other situations, maybe you'll get more answers with more uses. I think everyone will agree that buffers are terribly useful, even if at first glance, they seem rather pointless.
Best Answer
This is a buffer. Two gates means twice the output current. But why use AND gates instead of buffers, you might ask? I was originally going to say that they probably used one or two AND gates elsewhere in the circuit and just popped down a single quad AND gate chip, using two of the AND gates as buffers instead of calling for an actual buffer to save board space and parts count. However, it seems they are the single gate variety. So I presume they had a lot of AND gate chips on hand for whatever reason - perhaps they are used elsewhere in the circuit, or in other designs manufactured on the same production line - and they didn't want to pay for another line item/part feeder on the pick and place machine, so they just specified more AND gates instead of some AND gates and some buffers.
One thing to note about using two AND gates (or another two input logic gate) in this way instead of buffers (or inverters) is that there are twice as many input pins, so the input capacitance will be double. This probably won't be an issue in most cases. If it could possibly be an issue, tie one input high (or low, depending on the gate) instead of connecting both to the input signal.
Edit: looks like one of them is marked DNP, and hence may be an empty footprint on the board. I presume this was done just in case one gate couldn't provide sufficient drive strength, they could add a second without having to re-spin the board.