0
1.7kviews
Write a VHDL code for full adder

Mumbai University > ELECTRO > Sem 3 > Digital Circuits and Designs

Marks: 10M

Year: Dec 2014

1 Answer
0
24views

library IEEE;

use IEEE.std_logic_1164.all;

entity fulladder is

port (a : in std_logic

b : in std_logic;

cin : in std_logic;

sum : out std_logic;

cout :out std_logic);

end adder;

architecture FA of fulladder is

begin

sum <= (a xor b) xor cin;

cout <= (a and b) or (cin and a) or (cin and b);

end FA;

Please log in to add an answer.