0% found this document useful (0 votes)
21 views

Program 1

The document summarizes the design and simulation of a half adder circuit using Verilog code. A half adder adds two input bits (A and B) to produce a sum bit and carry bit as output. It is realized using one XOR gate for the sum and one AND gate for the carry. The Verilog code for the half adder is written and simulated to verify the truth table and output waveform matches the expected behavior of a half adder.

Uploaded by

Bala Santosh
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views

Program 1

The document summarizes the design and simulation of a half adder circuit using Verilog code. A half adder adds two input bits (A and B) to produce a sum bit and carry bit as output. It is realized using one XOR gate for the sum and one AND gate for the carry. The Verilog code for the half adder is written and simulated to verify the truth table and output waveform matches the expected behavior of a half adder.

Uploaded by

Bala Santosh
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

PROGRAM 1

Aim: Synthesis and Simulation of half adder using Verilog code. EDA Tool Used: Xilinx ISE 8.1i Theory:
Half adder is a combinational arithmetic circuit that adds two numbers and produces a sum bit (S) and carry bit (C) as the output. If A and B are the input bits, then sum bit (S) is the X-OR of A and B and the carry bit (C) will be the AND of A and B. From this it is clear that a half adder circuit can be easily constructed using one X-OR gate and one AND gate. Half adder is the simplest of all adder circuit, but it has a major disadvantage. The half adder can add only two input bits (A and B) and has nothing to do with the carry if there is any in the input. So if the input to a half adder have a carry, then it will be neglected it and adds only the A and B bits. That means the binary addition process is not complete and thats why it is called a half adder. The truth table, schematic representation and XOR//AND realization of a half adder are shown in the figure below.

Circuit Diagram:-

Truth table: Input


A 0 0 1 1 B 0 1 0 1

Output
Sum 0 1 1 0 Carry 0 0 0 1

Expression:
Sum = A B Carry = AB

Verilog Code:
module ha1(a,b, sum,carry); input a,b; output sum,carry; xor(sum,a,b); and(carry,a,b); endmodule

RTL Schematic:

Waveform:

Result:
The half adder using verilog has been simulated and obtained the output waveform.

You might also like