Implement a Function using 3×8 decoder (74LS138)

decoderdigital-logic

I need to implement the function below using 3×8 decoder (74LS138) and a minimum number of gates but I did not see 74LS138 before.

F = (A.B)'

I implement the function using a normal 3×8 decoder but I think it is not the best way to do that and I also need to use 74LS138.

My Solution:

enter image description here

Do you have any idea about the solution?

Thanks in advance.

Best Answer

The function can implemented using only the 74LS138. Look at the data sheet (for example at http://www.alldatasheet.com/datasheet-pdf/pdf/51039/FAIRCHILD/74LS138.html , truth table and logic diagram on page 2). The pins are G1, G2A, G2B, A, B, C, Y0, ... Y7. Functionality it can be described as:

Y[7:0] = (!G1 || G2A || G2B) ? 8'hFF : ~(1'b1 << {C,B,A})

There are may possible solutions. Pick a Y pin and choose an input configuration that matches your function. For example: A and B pins will connect to the corresponding names from your function. Set G1 high, G2A low, and G2B low. If C is set to low, then F will be Y3. If C is set to high, then F will be Y7.