You are on page 1of 1

BINARY TO GREY CODE CONVERSION

Library IEEE; use ieee.std_logic_1164.all; use ieee.std_logic_unsigned.all; entity bi_to_g is port(b:in std_logic_vector(3 downto 0); g:out std_logic_vector(3 downto 0)); end bi_to_g; architecture df of bi_to_g is begin g(3)<=b(3); g(2)<=b(3) xor b(2); g(1)<=b(2) xor b(1); g(0)<=b(1) xor B(0); end df;

You might also like