Bit Com Case
Bit Com Case
Bit Com Case
use ieee.std_logic_1164.all;
entity bitcomcase is
port(a,b:in std_logic;
c,d,e:out std_logic);
end bitcomcase;
architecture ar of bitcomcase is
signal s:std_logic_vector(1 downto 0);
begin
s<=a&b;
process(s)
begin
case s is
when "00" =>
c<='0';
d<='1';
e<='0';
when "01" =>
c<='1';
d<='0';
e<='0';
when "10" =>
c<='0';
d<='0';
e<='1';
when "11" =>
c<='0';
d<='1';
e<='0';
when others =>
c<='Z';
d<='Z';
e<='Z';
end case;
end process;
end;