instrunment lab eport, Exercises of Digital Electronics

IN this project you will find All about power supply

Typology: Exercises

2019/2020

Uploaded on 01/02/2020

technology-department
technology-department 🇵🇰

1 document

1 / 5

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
1
Experiment 7: Magnitude comparators
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
A
B
A=B
A<B
A>B
0
0
1
1
0
1
0
1
1
0
0
1
0
1
0
0
0
0
1
0
Module: Logic Design Lab
Name: ……………………….........................
University no:……………………..
Group no: ……………
Lab Partner Name: Mr. Mohamed El-Saied
pf3
pf4
pf5

Partial preview of the text

Download instrunment lab eport and more Exercises Digital Electronics in PDF only on Docsity!

Experiment 7 : Magnitude comparators

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

A B A=B AB

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= ( AB )' (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 ) '

A=B:

=A 1 'A 0 'B 1 'B 0 '+ A 1 'A 0 B 1 'B 0 +

A 1 A 0 'B 1 B 0 '+ A 1 A 0 B 1 B 0

=A 1 'B 1 '+ A 1 B 1 ) (A 0 'B 0 '+ A 0 B 0 )

= (A 1 B 1 ) ' (A 0 B 0 ) '

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.

Part A: Lab Practice

Procedure:

  1. Check all the components for their working.
  2. Insert the appropriate ICs into the IC base.
  3. Make connections as shown in the circuit diagram in figure 5.
  4. Verify the Truth Table and observe the outputs.
  5. Repeat the same steps but for the circuit diagram in figure (6) and apply inputs in the following table, also record the output at each:

Conclusions: Magnitude comparator is studied.

Part B: Lab. Exercise:

Students are directed to do the following exercise.

  1. Name the logic gate used for testing the equality of two bits. Also draw the logic symbol and truth table.
  2. Derive the Boolean expressions of 4-bit comparator. Draw the logic diagram for this comparator.
  3. Design an 8 bit comparator using a two chips of IC 7485?

Module: Logic Design Lab Name: ................................... University no :……………………….. Group no: ……………………………. Lab Partner Name: Mr. Mohamed El-Saied