Thursday, 7 April 2011

VHDL code for full adder

RELATED POSTS:

1.VHDL Code for 4 bit comparator

2.VHDL code for d flip flop

3.VHDL code for 2 to 4 binary decoder

______________________________________________________________________________

Here is the VHDL code for FULL ADDER:



 

 

 

 

 

 

LIBRARY ieee ;
USE ieee.std_logic_1164.all ;

ENTITY fulladd IS
PORT (    Cin, x, y        : IN     STD_LOGIC ;
s, Cout            : OUT     STD_LOGIC ) ;
END fulladd ;

ARCHITECTURE beh OF fulladd IS
BEGIN
s <= x XOR y XOR Cin ;
Cout <= (x AND y) OR (Cin AND x) OR (Cin AND y) ;
END beh ;

Subscribe us for more such details directly to your mail,and write here for any of your queries and suggestions.

20 comments:

  1. in behavioural modelling there are two BEGINS in syntax , one is for declarative part and another is for statement part. The one in declarative part consist of process , u havn't shown them here.
    SYNTAX
    begin
    p1:process(A,B,Cin)
    begin
    S<=x XOR y XOR Cin;
    ............continued

    ReplyDelete
  2. very useful................

    ReplyDelete
    Replies
    1. can we create an full adder with 2 proccesses? like this

      P1: process (A, B)
      begin
      int1<= A xor B;
      int2<= A and B;
      end process;
      P2: process (int1, int2, Cin)
      begin
      D <= int1 xor C;
      int3 <= int1 and C;
      E <= int2 or int3;
      end process;

      Delete
    2. i need vhdl code for 16*16 booth multiplier.......plz send me

      Delete
  3. hi you have started architecture and started with begin keyword so you need one end extra.
    bye

    ReplyDelete
  4. shabina khatoon18 May 2012 at 00:47

    the [architecture _declarative_part ] is optional part ...so it can be written or left as per the requirement.

    ReplyDelete
  5. declarative part and statement part defines strutural modelling not behavioral...

    ReplyDelete
  6. i need the vhdl code for (adders,counters,flipflops,fsm,multiplexers,demiltiplexers)plz send it to my mail id

    ReplyDelete
  7. hi daniel , soon i will upload the same...!!!

    thanx

    ReplyDelete
  8. hi could you please email me the vhdl code for full adder and Decimal Arthmetic Unit Design.
    thank you
    hadi_077@hotmail.com

    ReplyDelete
  9. HI for the Full Adder code what is the input and how do we declare what to A, B and Cin is?
    Could you email me? tay_yiming@hotmail.com

    ReplyDelete
  10. could you please send testing of full adder circuit using vhdl coding

    ReplyDelete
  11. does this code work in Active HDL software

    ReplyDelete
  12. i need the vhdl code for modified carry select adder ..can u pls provide the code ....

    ReplyDelete
  13. I all the time used to study piece of writing in news papers but now as I am a user of web thus from now I am using net for posts, thanks to web.

    ReplyDelete
  14. hamizan engine8 May 2014 at 03:07

    Running ISim simulation engine ...
    This is a Full version of ISE Simulator(ISim).
    ERROR: Signal Unknown signal received

    ReplyDelete
  15. Vaibhav chauhan24 May 2014 at 12:08

    what does x,y,z mean in this program

    ReplyDelete
  16. could you send me code of 'dual 2 line to 4 line decoders/demultiplexers'.?

    ReplyDelete
  17. Vineeth george syriac26 December 2014 at 05:33

    Implement the function given by the equation y =Σm(4,5,9,10,12,13)

    ReplyDelete