4 Bit Ripple Carry Model using For Statement
architecture forloop of adder4bit is
signal c : std_logic_vector(4 downto 0); -- temporary signals for internal carries.
sum(i) <= a(i) xor b(i) xor c(i);
c(i+1) <= (a(i) and b(i)) or (c(i) and (a(i) or b(i)));