📄 adder_1.vhd
字号:
entity xor2 is
port(x,y:in bit;z:out bit);
end;
architecture one of xor2 is
begin
z<=x xor y;
end one;
entity and_2 is
port(x,y:in bit;z:out bit);
end;
architecture one of and_2 is
begin
z<=x and y;
end one;
entity adder_1 is
port(a,b:in bit:='0';sum,cry:out bit);
end;
architecture one of adder_1 is
component xor2
port(x,y:in bit;z:out bit);
end component;
component and_2
port(x,y:in bit;z:out bit);
end component;
begin
x1: xor2 port map(a,b,sum);
A1: and_2 port map(a,b,cry);
end;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -