LIBRARY ieee; USE ieee.STD_LOGIC_1164.ALL; ENTITY vending IS PORT( Q1, Q2, Q3, L : IN STD_LOGIC; P, C : OUT STD_LOGIC); END vending; ARCHITECTURE a OF vending IS SIGNAL input: STD_LOGIC_VECTOR (3 DOWNTO 0); SIGNAL output: STD_LOGIC_VECTOR (1 DOWNTO 0); BEGIN -- Concurrent Signal Assignment input (3) <= L; input (2) <= Q3; input (1) <= Q2; input (0) <= Q1; -- Selected Signal Assignment WITH input SELECT output <= "00" WHEN "0000", "00" WHEN "0001", "00" WHEN "0010", "00" WHEN "0011", "00" WHEN "0100", "00" WHEN "0101", "00" WHEN "0110", "10" WHEN "0111", "11" WHEN "1000", "11" WHEN "1001", "11" WHEN "1010", "11" WHEN "1011", "11" WHEN "1100", "11" WHEN "1101", "11" WHEN "1110", "11" WHEN "1111", "00" WHEN others; P <= output(1); C <= output(0); END a;