entity exam1 is
port(
d0,d1 : in std_logic;
s : in std_logic_vector(1 downto 0);
op : out std_logic
);
end exam1;
architecture behav of exam1 is
signal a : std_logic;
begin
process(s)
begin
case s is
when "00" =>
a<=d0;
when "01" =>
a<=d1;
when "10" =>
a<=not a;
when others =>
a<='0';
end case;
end process;
op<=a;
end behav;