Friday 24 January 2014

How to Design a Half Adder using Data Flow Modelling in Verilog Code in Xilinx Software

Posted by Sudhir Ufaniya  |  at  23:28 No comments

Aim of the experiment :-

To Design a Half Adder using Data Flow Modelling In verilog Code And show results in testbench form.

Theory : 

It is a combinational circuit with two binary inputs and outputs. Its adds the input and produces the corresponding sum and carry bits . its is an arithmetic circuit used to perform arithmetic operation of addition of two single bit words .

Here,
                   
where A and B are the two binary inputs
 The Sum bit and Carry bit , acccording to the rules of binary addition  are given by :
 The sum (s) is the Xor of A and B ( It Represents the LSB of the sum).The Carry (C) is the and
 Of the A and B ( It Is 0 unless both the inputs are 1). Therefore  C = A.B

A Half Adder can therefore be realized by using one X-OR gate and one And Gate .
A Half Adder Can also be realized in universal logic by using either only NAND Gates  or Only NOR Gates .

In Data flow modelling instead of using ' XOR '   ' AND '   Commands in the module we use
Operators assigned to those logic gates .

Verilog Code :-


module halfadder( s,c,a,b);

output s;
output c;
input a;
input b;

assign s = a^b ;
assign c= a&b;

endmodule


Conclusion :-

The Half Adder Circuit was designed and simulated using Xilinx Verilog Software.

If You Like This Article Then Share This With Your Friends .......... Thank You For Your Support @

Tips From the Author

Did you like This Article? Make Sure You Do not miss a new article By Like Our Facebook Page , Google Page and Subscribing to Our email newsletter Note: Please SUBSCRIBE to newsletter and download the FREE e-Book . Thanks for visiting!

Get Updates

Subscribe to our e-mail newsletter to receive updates.

Enter your email address:

Delivered by FeedBurner

Share This Post

Related posts

0 comments:

© 2013 Campus Exams. WP Theme-junkie converted by BloggerTheme9
Blogger templates. Proudly Powered by Blogger.
back to top