Implement a function 3×8 Decoder with 4 variables

boolean-algebradecoderdigital-logic

I'm required to implement a function

F = ~ABC~D + ~A~B~C~D + ~ABC + B~CD

using a 3×8 Decoder and any other additional combinational logic.

How can I implement this function if there are 4 variables (ABCD) in the expression but only 3 inputs in my 3×8 Decoder?

If I take only ABC as my 3 inputs on my decoder how can I include D to complete my function.

Best Answer

If you cant reduce the equation to a simpler one that only has two variables you need to use two 3:8 decoders and the MSB variable assign it to the enable of both decoders, connect it to the first decoder enable pin inverted and directly to the second decoder enable pin. This way you divide the truth table in half activating the first decoder when A is 0 and deactivating it and activating the second decoder when A is 1