|
So the theoretical description
/*
* 4-way demultiplexor:
* {a, b, c, d} = {in, 0, 0, 0} if sel == 00
* {0, in, 0, 0} if sel == 01
* {0, 0, in, 0} if sel == 10
* {0, 0, 0, in} if sel == 11
*/
should be read as
/*
* 4-way demultiplexor:
* {a, b, c, d} = {in, 0, 0, 0} if sel[1] == 0, sel[0] == 0
* {0, in, 0, 0} if sel[1] == 0, sel[0] == 1
* {0, 0, in, 0} if sel[1] == 1, sel[0] == 0
* {0, 0, 0, in} if sel[1] == 1, sel[0] == 1
*/
That would explain it. I guess I missed the point about hardware bit numbering somewhere along the line!
|