PPT ½½¶óÀ̵å
- Arithmetic Operator (4)
-- Overflow¿¡ ´ëÇÑ °í·Á.
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.all;
entity adder is
port (
a,b : in std_logic_vector(3 downto 0);
y : out std_logic_vector(4 downto 0)
);
end adder;
architecture a_adder of adder is
begin
y <= (¡®0¡¯ & a ) + (¡®0¡¯ & b );
end a_adder;