74139
The 74139 (common variants 74LS139, 74HC139) is a dual 2-to-4-line decoder/demultiplexer in the 7400 series. Each side of the chip is a decoder with one active low enable from a 2-bit address to four active low signals. The two decoders can be wired independently, or a /Y from one decoder can be wired to the /EN on the other to calculate more complex combinational logic functions.
.---v---.
A /EN -o|1 16|-- VCC
A S0 --|2 15|o- B /EN
A S1 --|3 14|-- B S0
A /Y0 -o|4 13|-- B S1
A /Y1 -o|5 12|o- B /Y0
A /Y2 -o|6 11|o- B /Y1
A /Y3 -o|7 10|o- B /Y2
GND --|8 9|o- B /Y3
`-------'
The chip includes two independent decoders.
- VCC, GND : power supply
- S0, S1 : select which /Yx line to pull low
- /EN : force all /Yx outputs to be high when this pin is high
- /Y0-/Y3 : output signals
| Truth Table | ||||||
|---|---|---|---|---|---|---|
| /EN | S1 | S0 | /Y0 | /Y1 | /Y2 | /Y3 |
| 0 | 0 | 0 | 0 | 1 | 1 | 1 |
| 0 | 0 | 1 | 1 | 0 | 1 | 1 |
| 0 | 1 | 0 | 1 | 1 | 0 | 1 |
| 0 | 1 | 1 | 1 | 1 | 1 | 0 |
| 1 | x | x | 1 | 1 | 1 | 1 |
The NES contains a 74LS139 to produce the /ROMSEL signal from M2 and A15, as well as the /CS signals for the internal CPU RAM and PPU memory-mapped registers.