LIBRARY ieee;
USE ieee.std_logic_1164.all;
ENTITY sumator IS
PORT (a, b, c : IN STD_LOGIC;
c1, s : OUT STD_LOGIC);
END sumator;
ARCHITECTURE LogicFunction OF sumator IS
BEGIN
c1 <= (a AND b) OR (a AND c) OR (b AND c);
s <= (NOT a AND NOT b AND c) OR (a AND NOT b AND NOT c) OR (a AND b AND c) OR (NOT a AND b AND NOT c);
END LogicFunction;
LIBRARY ieee;
USE ieee.std_logic_1164.all;
entity sumator4 is
port (a, a1, a2, a3, b, b1, b2, b3: in std_logic;
s, s1, s2, s3, cs: out std_logic);
end sumator4;
architecture behv of sumator4 is
component sumator is
port(a, b, c: in std_logic;
c1, s: out std_logic);
end component;
signal c1, c2, c3: std_logic;
begin
M1: sumator port map(a, b, '0', c1, s);
M2: sumator port map(a1, b1, c1, c2, s1);
M3: sumator port map(a2, b2, c2, c3, s2);
M4: sumator port map(a3, b3, c3, cs, s3);
end behv;
{"html5":"htmlmixed","css":"css","javascript":"javascript","php":"php","python":"python","ruby":"ruby","lua":"text\/x-lua","bash":"text\/x-sh","go":"go","c":"text\/x-csrc","cpp":"text\/x-c++src","diff":"diff","latex":"stex","sql":"sql","xml":"xml","apl":"apl","asterisk":"asterisk","c_loadrunner":"text\/x-csrc","c_mac":"text\/x-csrc","coffeescript":"text\/x-coffeescript","csharp":"text\/x-csharp","d":"d","ecmascript":"javascript","erlang":"erlang","groovy":"text\/x-groovy","haskell":"text\/x-haskell","haxe":"text\/x-haxe","html4strict":"htmlmixed","java":"text\/x-java","java5":"text\/x-java","jquery":"javascript","mirc":"mirc","mysql":"sql","ocaml":"text\/x-ocaml","pascal":"text\/x-pascal","perl":"perl","perl6":"perl","plsql":"sql","properties":"text\/x-properties","q":"text\/x-q","scala":"scala","scheme":"text\/x-scheme","tcl":"text\/x-tcl","vb":"text\/x-vb","verilog":"text\/x-verilog","yaml":"text\/x-yaml","z80":"text\/x-z80"}