1's Complement VHDL Code Using Structrucral Modeling
1's Complement VHDL Code Using Structrucral Modeling
Library declaration
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
-----------------------------------------------------------------entity ones_comp is
Port ( a : in STD_LOGIC_VECTOR (3 downto 0);
e: in std_logic;
y : out STD_LOGIC_VECTOR (3 downto 0));
end ones_comp;
------------------------------------------------------------------
Entity declaration.
a: - input port bits.
e: - enable pin. If e=1 circuit will produce ones
complement otherwise it will act as a buffer.
y: - output port bits.(1s complement of input).
end Behavioral_1scomp;
RTL VIEW:-
INFOOP2R.WIX.COM/OP2R