2

This table, part of the SN74LS138 datasheet, explains how inputs relate to outputs:

SN74S138A function table

However, I'm no electrical engineer and I don't understand the bit I've circled in red which says \$\small\mathrm{\overline G2=\overline G2A +\overline G2B}\$.

I don't even know what to call those overlined characters, so I'm stumped on how to search for the meaning of this.

I do know that the chip has inputs G1, G2A, and G2B. In my case two of the inputs are even hardwired to fixed values: G1 is high and G2B is low, so it's really only G2A that I need/get to control.

Question:
If I'm interested in the yellow cell I've highlighted in the image above, I know how to monitor output Y2, but should I set G2A low or high? I suppose it should be set to the opposite state when I'm checking the other 138s that cover other parts of the keyboard.

Bonus question:
What is the name of these overlined characters, and what is the idea behind its usage?

Super duper bonus question:
Isn't this backwards? Why are all the outputs except one set high? I would've expected the "chosen" pin to be the only one set high, with all the others set low. This way (in a keyboard matrix), all return lines will be high except for the one with the keypress in it. Why isn't the default state low?

SamGibson
  • 17,231
  • 5
  • 37
  • 58
noughtnaut
  • 185
  • 5

1 Answers1

4

The data sheet describes G1, G2A and G2B as the enable inputs. G1 is described as active-high, and G2A and G2B are active-low. It is common to designate active-low signals by a bar over the signal name. See also Convention for inverted signal.

In the equation, the + sign is the logical OR operator. This means that G2 will be H if either G2A or G2B is H. If both G2A and G2B are L, then G2 will be L.

To get Y2 to be L, you must set G1 to be H and both G2A and G2B to be L. Since you said G1 is hardwired to H and G2B is hardwired to L, you simply need to set G2B to L.

Why are all the outputs except one set high?

The data sheet says:

Two active-low and one active-high enable inputs reduce the need for external gates or inverters when expanding.

toolic
  • 5,637
  • 5
  • 20
  • 33
  • 1
    Adding to this, the reason all outputs except one are high is that this is simply how that chip works - if you need it the other way round, you need to use the 74...238. – Mezgrman Sep 16 '22 at 06:55