Binary To Excess 3 VHDL Code Using Structural Modeling
Binary To Excess 3 VHDL Code Using Structural Modeling
Library declaration
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
--------------------------------------------------------entity B_xcess is
Port ( bin: in std_logic_vector (1 downto 0 );
exss: out std_logic_vector (3 downto 0);
end B_xcess;
Entity declaration.
bin :- input port bits.(code that will be
converted in to its equivalent excess 3
representation.)
exss: - output port bits. (Converted code).
------------------------------------------------------------------begin
bin2bar<= not bin(2);
bin1bar<= not bin(1);
bin0bar<= not bin(0);
xcess(3)<= (bin(3) and (bin(2)and(bin(0) or bin(1))));
xcess(2)<= ((bin2bar and (bin(1)or bin(0))) or
(bin(2)and bin1bar and bin0bar));
xcess(1)<= bin(1) xnor bin(0);
xcess(0)<= not bin(0);
end Behavioral_binexss;
-------------------------------------------------------------------end Behavioral_bxcess;
RTL VIEW:-
INFOOP2R.WIX.COM/OP2R