When sel is 0, a AND sel is always 0, You need to do something to sel to get a variable that will work correctly with AND and a.
Sometimes it helps to add columns with intermediate results to your truth table:
| sel | a | b | | | x | (x a) | (sel b) | | | out | |
|---|---|---|---|---|---|---|---|---|---|
| 0 | 0 | 0 | | | 1 | 0 | 0 | | | 0 | |
| 0 | 0 | 1 | | | 1 | 0 | 0 | | | 0 | |
| 0 | 1 | 0 | | | 1 | 1 | 0 | | | 1 | |
| 0 | 1 | 1 | | | 1 | 1 | 0 | | | 1 | |
| 1 | 0 | 0 | | | 0 | 0 | 0 | | | 0 | |
| 1 | 0 | 1 | | | 0 | 0 | 1 | | | 1 | |
| 1 | 1 | 0 | | | 0 | 0 | 0 | | | 0 | |
| 1 | 1 | 1 | | | 0 | 0 | 1 | | | 1 |
What logical operation do you use to get x from sel?
What logical operation do you use to combine (x AND a) and (sel AND b)?
--Mark
| Free forum by Nabble | Edit this page |