library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use ieee.numeric_std.all;

entity add_signed_unsigned is
end add_signed_unsigned;

architecture Behavioral of add_signed_unsigned is
signal a_u : unsigned(11 downto 0);
signal b_u : unsigned( 1 downto 0);
signal c_u : unsigned(11 downto 0);
signal a_s :   signed(11 downto 0);
signal b_s :   signed( 1 downto 0);
signal c_s :   signed(11 downto 0);
begin
a_u <= X"123";
b_u <= "11"; -- 3
c_u <= a_u + b_u; -- b_u is extended to 12 bits with 0, 
						-- result is X"126"
a_s <= X"123";
b_s <= "11"; -- -1
c_s <= a_s + b_s; -- b_s is extended to 12 with sign bit (1),
					-- result is X"122" 
				--since 100100010 + 111111111111 = 1000100100010
end Behavioral;

