
Americo M. answered 08/03/22
Computer Engineering, AI & Robotics | Mentor of Students Now at NVIDIA
The problem defines the solution. It says: "Assuming there are three inputs, INPUT A, INPUT B and INPUT Condition and on OUTPUT Z, If input Condition == 0 the output must be INPUT A else if input Condition == 1 the output must be INPUT B". That is the definition of the functionality of a 1-bit multiplexer. Inputs A and B connect to the A and B inputs of the multiplexer and the Condition input to the selector input. The output will then be as specified.
If you want a more basic logic gates implementation then you will have an AND gate with inputs A and Condition and its output goes as one of the inputs of a second stage OR gate. You will have the Condition input also going to an inverter and the output to that inverter goes as an input to another AND gate and Input B is the other input to this second AND gate. The output of this second AND gate is the second input to the second stage OR gate. The output of the OR gate will be your Output Z.
In C language bitwise logical notation it will be Z = Condition&A | (!Condition)&B.