Blocks inside blocks
Figure: Three small 2-to-1 MUX blocks on the left, an arrow
A modern chip has billions of gates. Nobody draws them one at a time. Instead they build a small block, verify it once, then treat it as a single part and wire copies of it into bigger blocks. That nesting is hierarchy.
You already have a block worth reusing: the 2-to-1 MUX.
The 4-to-1 from 2-to-1s
Figure: A tree of three 2-to-1 multiplexers
Wire three 2-to-1 MUXes into two stages:
- Stage 1, two MUXes controlled by :
- MUX A picks between and .
- MUX B picks between and .
- Stage 2, one MUX controlled by :
- MUX C picks between the outputs of A and B.
The same four-input selection as the last lesson, built entirely from a block you already trust.
Splitting the address
The two stages split the 2-bit address between them.
- , the low bit, tells each stage-1 MUX whether to take the lower or upper of its pair.
- , the high bit, tells stage 2 which pair to keep.