



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
IN this project you will find All about power supply
Typology: Exercises
1 / 5
This page cannot be seen from the preview
Don't miss anything!




Objective :
Realization of 1-bit comparator using logic gates. Realization and implementation of 2-bit comparator using logic gates on breadboards. Implementation of 4-bit magnitude comparator using IC 7485.
Components Required:
Mini Digital Logic Trainer. IC Type 7486 Quadruple 2-input XOR gates. IC Type 7408 Quadruple 2-input AND gates. IC Type 7400 Quadruple 2-input NAND gates. IC Type 7411 Triple 3-input NAND gates. IC Type 74L85 4-bit magnitude comparator. Switches for inputs and LED displays for outputs.
Theory:
Magnitude comparator is a combinational logic circuit that compares between two binary numbers A and B and determines their relative magnitudes. The output of the circuit is specified by three binary variables whether: A>B, A=B or A<B.
Figure 1 Block diagram of n-bit Magnitude Comparator. One -bit Magnitude Comparator: A comparator used to compare two 1 - bit binary numbers. It has two binary inputs A, B and three binary outputs: greater than, equal and less than relations. Figure 2 below shows the block diagram and truth table of a single bit magnitude comparator.
(a)Block diagram (b) Truth table Figure 2
Module: Logic Design Lab Name: ………………………......................... University no :…………………….. Group no: …………… Lab Partner Name: Mr. Mohamed El-Saied
The Boolean functions describing the 1-bit magnitude comparator according to the truth table are: (A > B) = A'B (A = B) = A'B' + AB= ( A B )' (A < B ) = AB' The logic diagram for 1-bit binary comparator implemented by XOR and basic logic gates is shown
below in figure 3.
Figure 3 Logic Diagram of 1-bit Comparator So we conclude that digital comparators actually use Exclusive-NOR gates within their design for comparing their respective pairs of bits. Two -bit Magnitude Comparator: A comparator used to compare two 2-bit numbers. It has 4 binary inputs (number A: A 1 A 0 , number B: B 1 B 0 ) and 3 binary outputs: greater than, equal and less than relations. Figure 4 below shows the block diagram and truth table of a two bit magnitude comparator.
(a)Block diagram
(b) Truth table Figure 4 Using key-map, the simplified Boolean function for the outputs A>B, A=B and A<B is shown below:
A<B: =A 1 'B 1 +A 1 'A 0 'B 1 'B 0 +A 1 A 0 'B 1 B 0 = A 1 'B 1 +A 0 'B 0 (A 1 'B 1 '+A 1 B 1 ) = A 1 B 1 '+A 0 B 0 '(A 1 B 1 ) '
This IC can be used to compare two 4-bit binary words by grounding I (A>B), I (A<B) and I (A=B) connector input to Vcc terminal.
How 4-bit comparator it works? Equality: Word A equal word B iff: A 3 =B 3 , A 2 =B 2 , A 1 =B 1 , A 0 =B 0. Inequality: If A3 = 1 and B3 = 0, then A is greater than B (A>B). Or If A3 and B3 are equal, and if A2 = 1 and B2 = 0, then A > B. Or If A3 and B3 are equal & A2 and B2 are equal, and if A1 = 1, and B1 = 0, then A>B. Or If A3 and B3 are equal, A2 and B2 are equal and A1 and B1 are equal, and if A0 = 1 and B0 = 0, then A > B. If A3 = 0 and B3 = 1 , then A is less than B (A<B). Or If A3 and B3 are equal, and if A2 = 0 and B2 = 1 , then A < B. Or If A3 and B3 are equal & A2 and B2 are equal, and if A1 = 0 , and B1 = 1 , then A<B. Or If A3 and B3 are equal, A2 and B2 are equal and A1 and B1 are equal, and if A0 = 0 and B0 = 1 , then A < B.
Procedure:
Conclusions: Magnitude comparator is studied.
Students are directed to do the following exercise.
Module: Logic Design Lab Name: ................................... University no :……………………….. Group no: ……………………………. Lab Partner Name: Mr. Mohamed El-Saied