library ieee; use ieee.std_logic_1164.all; use ieee.numeric_std.all; entity comparator is port(A, B: in std_logic_vector (3 downto 0); C, D: out std_logic_vector (3 downto 0) ); end comparator; architecture behavorial of comparator is begin process(A,B) begin if A > B then C<=B; D<=A; else C<=A; D<=B; end if; end process; end behavorial;