library ieee; use ieee.std_logic_1164.all; entity comparator is port(A, B : in std_logic_vector(3 downto 0); Result : out std_logic_vector(1 downto 0)); end comparator; architecture JMJS_Logic of comparator is begin process(A, B) begin if(A > B) then Result <= "01"; elsif(A < B) then Result <= "10"; else Result <= "11"; end if; end process; end JMJS_Logic;