Which of the following is an entity declared for a full adder?

Which of the following is an entity declared for a full adder?
A.
Code:
ENTITY full_adder IS
    PORT(a, b, c : IN BIT;
    s, co : OUT BIT);
   END full_adder;
B.
Code:
ENTITY full_adder IS
    PORT (a ,b : IN BIT;
    s, c : OUT BIT);
    END full_adder;
C.
Code:
ENTITY full_adder
    PORT(a, b, c : IN BIT;
    s, co : OUT BIT);
   END full_adder;
D.
Code:
ENTITY full_adder IS
    PORT (a, b, c, s, co : BIT);
    END full_adder;
 
Answer: a
Explanation: A full adder has three inputs and two outputs. Inputs are two bits to be added and some carry. Outputs are sum and carry. Therefore, option a shows the correct declaration of entity full_adder. In this, a and b are the bits to be added and c is the input carry whereas, s is the sum output and co is the carry output.
 

Tìm kiếm

Back
Top