Experiment-1: Simulation Result For Half Adder and Full Adder Circuit
Experiment-1: Simulation Result For Half Adder and Full Adder Circuit
Aim:- Write truth table, Boolean expression ,VHDL code ,synthesis report and
simulation result for half adder and full adder circuit.
Truth table:-
0 0 0 0
0 1 1 0
1 0 1 0
1 1 0 1
Boolean Expression:-
Sum=A’B+AB’=A XOR B
Carry=AB
Code:-
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
entity half is
end half;
architecture DF of half is
begin
s<=a xor b;
c<=a and b;
end DF;
Synthesis report:-
Number of Slices: 1 out of 768 0%
Number of IOs: 5
Circuit diagram:-
Schematic Diagram :-
Simulation Result:-
Activity 2:- Full adder circuit by using
i) Dataflow modeling.
Truth table:-
Boolean Expression:-
Carry = X’YZ+XY’Z+XYZ’+XYZ
= XY+YZ+XZ
Code:-
Dataflow Behavioral Structural
USE ieee.std_logic_1164.ALL;
ENTITY test2_fullbha IS
END test2_fullbha;
COMPONENT fullbha
PORT(
x : IN std_logic;
y : IN std_logic;
z : IN std_logic;
s : OUT std_logic;
c : OUT std_logic
);
END COMPONENT;
signal s : std_logic;
signal c : std_logic;
BEGIN
x => x,
y => y,
z => z,
s => s,
c => c
);
stim_proc: process
begin
x<='0';y<='0';z<='0';
x<='0';y<='0';z<='1';
x<='0';y<='1';z<='0';
x<='0';y<='1';z<='1';
wait for 100 ns;
x<='1';y<='0';z<='0';
x<='1';y<='0';z<='1';
x<='1';y<='1';z<='0';
x<='1';y<='1';z<='1';
wait;
end process;
END;
Circuit diagram:-
Schematic Diagram :-
Simulation Result:-
Conclusion/report:-