Professional Documents
Culture Documents
Verilog EXPERIMENT 2
Verilog EXPERIMENT 2
Verilog EXPERIMENT 2
AIM: To implement Verilog HDL code for combinational circuits like Half adder, full adder
and full subtractor.
Important Concept/ Theory:
Combinational Logic Circuits are memoryless digital logic circuits whose output at any
instant in time depends only on the combination of its inputs. Combinational Circuits are
circuits made up of different types of logic gates. The outputs of Combinational Logic
Circuits are only determined by the logical function of their current input state, logic “0” or
logic “1”, at any given instant in time. The result is that combinational logic circuits have no
feedback, and any changes to the signals being applied to their inputs will immediately have
an effect at the output. In other words, in a Combinational Logic Circuit, the output is
dependant at all times on the combination of its inputs. Thus, a combinational circuit is
memoryless.
Half Adder: The half adder adds two binary digits called as augend and addend and
produces two outputs as sum and carry; XOR is applied to both inputs to produce sum
and AND gate is applied to both inputs to produce carry.
A S
HALF ADDER
B C
Fig.1 – Logic Circuit of Half Adder Fig.2 – Block Diagram of Half Adder
A S
B
FULL ADDER Cout
Cin
Full Subtractor: Full subtractor is an electronic device or logic circuit which performs
subtraction of two binary digits. A full subtractor is formed by two half subtractors,
which involves three inputs such as minuend, subtrahend and borrow, borrow bit
among the inputs is obtained from subtraction of two binary digits and is subtracted
from next higher order pair of bits, outputs as difference and borrow.
A D
B FULL SUBTRACTOR
Bout
Bin
Design Analysis:
Codes:
1. Half Adder Code:
2. Full Adder Code:
Full Subtractor:
Full Adder:
Full Subtractor:
Full Subtractor:
Fig.14 – Tech Schematic for Full Adder
Full Adder:
Fig.17 – Area Report for Full Adder
Full Subtractor:
Full Subtractor:
Concept (A) 2
Implementation (B) 2
Performance (C) 2
Total 6