summaryrefslogtreecommitdiff
path: root/6.md
blob: ec583fb0ddd719e51fba9372defbe14cc0c0dcbc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
[\<- Additional K-map concepts: solving for 0's and use of don't cares](5.md)

---

# Multiplexers

## Enable and Disable

- Enable: allow the other input to pass thru
	- `X*1` = `X`
	- `X+0` = `X`
- Disable: make the other input irrelevant
	- `X*0` = `0`
	- `X+1` = `1`

![diagram](6.1.png)

---

## 2-to-1 mux

- "mux" is short for multiplexer

### Multiplexer

- Use a select signal to "pass" thru one of the two inputs
	- Only one of the two paths is "enabled"
- It doesn't matter what w0 and w1 are in the example below

![diagram](6.2.png)

---

## 4-to-1 mux

- If we have four choices we need 2 selects
	- N select signals allows 2^N choices
- Each AND gate has a unique "enable", and exactly one is enabled at any time

![diagram](6.3.png)

---

## Abstraction/schematic symbol for muxes

### Multiplexers as an abstraction

- So common (and useful) that there is a symbol for it
	- We don't have to keep drawing out the gates
- Values to pass thru are "data" inputs, or ports
- Be careful if/when ports aren't labeled
- Can be extended to any number of choices

![diagram](6.4.png)

---

## Hierarchy of muxes

### A 4:1 mux using 2:1 muxes

- A 2:1 mux can only take 2 inputs
	- Need two 2:1 muxes at least
	- Only narrows the choices from 4 to 2
	- So, one more mux to make final choice
- What are A,B,C in terms of S1,S0 in the diagram below?


![diagram](6.5.png)

### Extending the concept

- A 16-to-1 made up of 4-to-1 muxes:

![diagram](6.6.png)

---

[Shannon's expansion and FPGAs ->](7.md)