半加器1
LIBRARY IEEE;
USE IEEE.STD_LOGIC_1164.ALL;
ENTITY halfadder IS
PORT (A,B:IN STD_LOGIC;
Co: out STD_LOGIC;
S: out STD_LOGIC);
end halfadder;
ARCHITECTURE rtl OF halfadder IS
BEGIN
S <=A XOR B;
Co <=A AND B;
END rtl;
半加器1LIBRARYIEEE;USEIEEESTD_LOGIC_1164ALL;ENTITYhalfadderISPORT(A,B:INSTD_LOGIC;Co:outSTD_LOGIC;S:out
半加器1
LIBRARY IEEE;
USE IEEE.STD_LOGIC_1164.ALL;
ENTITY halfadder IS
PORT (A,B:IN STD_LOGIC;
Co: out STD_LOGIC;
S: out STD_LOGIC);
end halfadder;
ARCHITECTURE rtl OF halfadder IS
BEGIN
S <=A XOR B;
Co <=A AND B;
END rtl;