I need to implement simple demux in HDL:
Demultiplexer logic would be:
{a, b} = {in, 0} if sel == 0
{a, b} = {0, in} if sel == 1
I've started from basic logic table and first of all I wrote all posible combinations of all pins and in result i got:
/**
* in | sel | a | b
* ----------------
* 0 | 0 | 0 | 0
* 1 | 0 | 0 | 0
* 0 | 1 | 0 | 0
* 1 | 1 | 0 | 0
* 0 | 0 | 1 | 0
* 1 | 0 | 1 | 0
* 0 | 1 | 1 | 0
* 1 | 1 | 1 | 0
* 0 | 0 | 0 | 1
* 1 | 0 | 0 | 1
* 0 | 1 | 0 | 1
* 1 | 1 | 0 | 1
* 0 | 0 | 1 | 1
* 1 | 0 | 1 | 1
* 0 | 1 | 1 | 1
* 1 | 1 | 1 | 1
*/
Working on gate with single output i would need to build logical expression where output is equal to 1. Now I'm bit confused how to simplify this logic table even if I know how final result should look like:
/**
* in | sel | a | b
* -----------------
* 0 | 0 | 0 | 0
* 1 | 0 | 1 | 0
* 0 | 1 | 0 | 0
* 1 | 1 | 0 | 1
*/
It would be great to get an idea how it is simplified, thanks.