Professional Documents
Culture Documents
EXPERIMENT:13
THEORY:- The 2 bit comparater consists of Four input, three output to make selections. The input
bit A1,A0,B1.B0 is transmitted to output bits S(a<b), E(a=b) and G(a>b).
CIRCUIT DIAGRAM:-
TRUTH TABLE:-
17/IEC/031
NITISH KUMAR 17/IEC/031
INPUT OUTPUT
A1 A0 B1 B0 S E G
0 0 0 0 0 1 0
0 0 0 1 1 0 0
0 0 1 0 1 0 0
0 0 1 1 1 0 0
0 1 0 0 0 0 1
0 1 0 1 0 1 0
0 1 1 0 1 0 0
0 1 1 1 1 0 0
1 0 0 0 0 0 1
1 0 0 1 0 0 1
1 0 1 0 0 1 0
1 0 1 1 1 0 0
1 1 0 0 0 0 1
1 0 1 0 0 1
PROGRAM CODE:-
program
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
entity bit2comp is
Port ( a1,a0,b1,b0: in STD_LOGIC ;
s,e,g: out STD_LOGIC );
end bit2comp;
17/IEC/031
NITISH KUMAR 17/IEC/031
OUTPUT:-
RESULT:- The 2 bit comparater designe have been realized and simulated using VHDL codes.
17/IEC/031