Use a K-Map to design a circuit that has two operations. In mode 1, it outputs the value of the 3-bit input multiplied by 3. In mode 2, it outputs the number of 1's in the 3-bit input. Design a circuit that implements this function. Write the VHDL code.