Giter Club home page Giter Club logo

adder's Introduction

Ex. No. 3

Date:8.4.23

Implementation of half adder and full adder circuit using Verilog HDL

Aim :

To design and implement half adder and full adder circuit using Verilog HDL and verify its truth table.

Components Required:

  1. Laptop with Quartus software and modelsim software.

Theory:

Adders are digital circuits that carry out addition of numbers.

1. Half Adder

Half adder is a combinational circuit that performs simple addition of two binary numbers. The input variables designate the augend and addend bits; the output variables produce the sum and carry. It is necessary to specify two output variables because the result may consist of two binary digits.

Truth table

image

Sum = A’B+AB’ = A image B Carry=AB

Logic Diagram

image

2. Full Adder

Full adder is a digital circuit used to calculate the sum of three binary bits. It consists of three inputs and two outputs. Two of the input variables, denoted by A and B, represent the two significant bits to be added. The third input, Cin, represents the carry from the previous lower significant position. Two outputs are necessary because the arithmetic sum of three binary digits ranges in value from 0 to 3, and binary 2 or 3 needs two digits. The two outputs are sum and carry.

Truth table

.image

K-map Simplification

image

Sum =A’B’Cin+A’BCin’+ABCin+AB’Cin’=A image B image Cin Carry = AB + ACin+BCin

Logic Diagram

image

Procedure:

  1. Type the program in Quartus software.
  2. Compile and run the program.
  3. Generate the RTL schematic and save the logic diagram.
  4. Create nodes for inputs and outputs to generate the timing diagram.
  5. For different input combinations, generate the timing diagram.

Program:

1.Half adder:
module exp3a(a,b,sum,carry);
input a,b;
output sum,carry;
xor(sum,a,b);
and(carry,a,b);
endmodule

2.Full adder:
module exp3b(a,b,c,sum,carry);
input a,b,c;
output sum,carry;
wire x,p,q,r;
xor(x,b,c);
xor(sum,x,a);
and(p,a,b);
and(q,b,c);
and(r,a,c);
or(carry,p,q,r);
endmodule

RTL Schematic:

1.Half adder:

ex3 logic

2.Full adder:

digital 3rdl

Timing Diagram:

1.Half adder: waveform ex3a

2.Full adder: wave 3

Result:

Thus the half adder and full adder circuits are designed and implemented and the truth tables are verified.

adder's People

Contributors

bala291 avatar rvinifa avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.