How to choose which function to use depending on the parameter value? (MUX and Gates implementation)?


#1

Let’s say we have A,B,C , which are all representations of decimal numbers. A and C are 4bit, B is 2bit.

  • if A is any of those numbers (eg: 0,5,6,11 ), the function is
F(A,B,C) = AB+C
  • If A is the rest of the numbers , the function is :
F(A,B,C) = B+C

We can use only 2x1 MUX, 2input logic gates (both as much as needed), and of course FA for the implementation.

I don’t have issues as to how to implement/use the adder (for additions and/or multiplications).My issues start of how to chose the A3A2A1A0 correct inputs.

I tried to treat the numbers as minterms, and use K-map for A3A2A1A0. Where is the 2to1 MUX involved? How exactly should I choose how to operate based on the value of the numbers?

1) Should I treat the numbers as minterms?

2) In the second function, basically the A is missing, and it is an actual multiplication, is it wise to treat it as 1? . B+C is still 1B+C . Is my thought correct?

3) Should I represent every number with gates from scratch, no K-Map needed? What about the MUX?