LIBRARY IEEE;
USE IEEE.STD_LOGIC_1164.ALL;
ENTITY cmp IS
PORT(a,b:IN STD_LOGIC;
y:OUT STD_LOGIC);
END ENTITY cmp ;
ARCHITECTURE one OF cmp IS
BEGIN
PROCESS(a,b)
BEGIN
IF a>b THEN
y<='100';
ELSIF a=b THEN
y<='010';
ELSIF a<b THEN
y<='001';
END IF;
END PROCESS;
ENDARCHITECTUREone ;