Sunteți pe pagina 1din 13

Combinational Circuits

Lim Zhe Xian (0318196)

Khew Leong Fung (0319414)

7/5/2014

Date of Experiment:
Report due date:
Report submission date:
Checked by:

Item/marks
Format/10
Abstract and Introduction/10
Figures and Diagrams/15
Materials and Method/10
Results Discussions/45
References/10
Total
Abstract
The aim of this experiment is to learn the uses of comparators and the uses of
multiplexers. The magnitude comparator is a combinational circuit that compares 2 inputs binary
quantities and generates outputs to indicate whether the inputs are equal or which input is greater
than the other. [1] But in this experiment, we are instructed to only focus on the output when the
two binary numbers are equal. The output, Q will be high if two of the binary numbers are equal.
Multiplexers are very useful in constructing circuits, by using multiplexers, we can have many
inputs but only one output will be obtained. In this experiment, we let the inputs to be fixed and
let the select inputs to be the independent variable. From there we will know how the output will
be varying by changing the select inputs.

Introduction
2-Bit Magnitude Comparator compares 2 two bits numbers which is labelled as A1, A0,
B1 and B0 in this experiment. Magnitude comparators has 3 outputs, which are A > B, A = B and
A < B. It is to be used to compare the binary numbers and the comparators will indicate whether
it is identical or which number is bigger. For the 2-bit magnitude comparator, for each 2-bits
binary input A and B, the comparator will determine the outputs by comparing the 2 inputs
binary quantities. For instance, when A1A0 is 01 and B1B0 is 00, the output for A > B will be 1
while the output for A = B and A < B will be 0; when A1A0 is 11 and B1B0 is 11, the output for A
= B will be 1 while the output for A > B and A < B will be 0 and when A1A0 is 00 and B1B0 is
10, the output for A < B will be 1 while the output for A = B and A > B will be 0. In most cases,
a comparator uses XNOR gates to test for equality.
In digital systems, it is often to see a single line carrying two or more different digital
signals. However, only 1 signal can be place on that one line. Multiplexer is the device that
allows us to select the signal we need on that common line. [2] When multiplexers have two or
more input lines, the select inputs will select the particular data line which input lines needed to
be routed to the output. If there are 4 lines to be multiplexed onto the output and the values of the
input lines are initially set, 2 select inputs will be needed to select which data inputs is needed to
be appeared at the output. Assume that the 4 input lines are named as I0, I1, I2 and I3, and the two
select inputs are named as S0 and S1. The select inputs have 4 input values for S1 S0 which are 00,
01, 10 and 11. When the select inputs are 00, the multiplexer will choose I0 to be routed to the
output. When the select inputs are 01, the multiplexer will choose I1 to be routed to the output.
When the select inputs are 10, the multiplexer will choose I2 to be routed to the output. When the
select inputs are 11, the multiplexer will choose I3 to be routed to the output.
Figures and Diagrams
Experiment (I)

Figure 1: Input (A1A0B1B0) = 0000

Figure 2: Input (A1A0B1B0) = 0101


Figure 3: Input (A1A0B1B0) = 1010

Figure 4: Input (A1A0B1B0) = 1111

Figure 5: Logic Gates Circuit Connection (Logic Comparator)


Experiment (II)

Figure 6: Select Inputs (S1S0) = 00

Figure 7: Select Inputs (S1S0) = 01


Figure 8: Select Inputs (S1S0) = 10

Figure 9: Select Inputs (S1S0) = 11


Figure 10: Multiplexer

Figure 11: Logic Gates Circuit Connection (Multiplexer)


Materials
1. 7486 quad XOR gate IC
2. 7404 quad NOT gate IC
3. 7408 quad AND gate IC
4. 7432 quad OR gate IC
5. 2 LEDs
6. 330Ω resistors
7. Bread-board
8. Power supply
9. Crocodile Clips and Wires

Method

Experiment A
1) The circuit is constructed based on figure 5.
2) Pin no. 7 for the 7486 quad XOR gate IC, 7408 quad AND gate IC and the 7404 quad
NOT gate are connected to the GND point by using wires.
3) Pin no. 14 of the 3 ICs are connected to the +5V point by using crocodile clips.
4) Pin no. 3 of the XOR gate IC is connected to pin no.1 of the NOT gate IC.
5) Pin no. 6 of the XOR gate IC is connected to pin no. 3 of the NOT gate IC.
6) Pin no. 2 of the NOT gate IC is connected to pin no. 1 of the AND gate IC.
7) Pin no. 4 of the NOT gate IC is connected to pin no. 2 of the AND gate IC.
8) Pin no. 3 of the AND gate IC is connected to a 330Ω resistor.
9) The resistor is then connected to the longer leg of the LED which is the anode.
10) The shorter leg of the LED which is the cathode is connected to the GND point.
11) Pin no. 1 of the XOR gate IC is labelled as A1.
12) Pin no. 2 of the XOR gate IC is labelled as B1.
13) Pin no. 4 of the XOR gate IC is labelled as A0.
14) Pin no. 5 of the XOR gate IC is labelled as B0.
15) Pin no. 1, 2, 4 and 5 of the XOR gate are the inputs of the logic comparator, they are set
from 0000 to 1111 and it is tabulated in the truth table below.
16) The power supply is switched on, the results of the experiment are observed and
tabulated in the truth table.
Experiment B
1) The circuit is constructed based on figure 11.
2) Pin no. 7 of 2 AND gate ICs, 1 OR gate IC and a NOT gate IC are connected to the GND
point.
3) Pin no. 14 of the 4 ICs are connected to the +5V point.
4) S1 is connected to pin no.1 of NOT gate IC.
5) S0 is connected to pin no. 3 of NOT gate IC.
6) Pin no. 2 of NOT gate IC is connected to pin no. 1 of 1st AND gate IC.
7) Pin no. 4 of NOT gate IC is connected to pin no. 2 of 1st AND gate IC.
8) Pin no. 3 of 1st AND gate IC is connected to pin no. 4 of 1st AND gate IC.
9) The inputs, I0, I1, I2 and I3 are set to be 0, 1, 1, 0 respectively.
10) I0, which is 0 is connected to pin no. 5 of 1st AND gate IC.
11) Pin no. 6 of 1st AND gate IC is connected to pin no. 1 of OR gate IC.
12) S0 is connected to pin no. 5 of NOT gate IC.
13) Pin no. 6 of NOT gate IC is connected to pin no. 10 of 1st AND gate IC.
14) S0 is connected to pin no. 9 of 1st AND gate IC.
15) Pin no. 8 of 1st AND gate IC is connected to pin no. 13 of 1st AND gate IC.
16) I1, which is 1 is connected to pin no. 12 of 1st AND gate IC.
17) Pin no. 11 of 1st AND gate is connected to pin no. 2 of OR gate IC.
18) Pin no. 3 of OR gate IC is connected to pin no. 4 of OR gate IC.
19) S0 is connected to pin no. 9 of NOT gate IC.
20) Pin no. 8 of NOT gate IC is connected to pin no. 1 of 2nd AND gate IC.
21) S0 is connected to pin no. 2 of 2nd AND gate IC.
22) Pin no. 3 of 2nd AND gate IC is connected to pin no. 4 of 2nd AND gate IC.
23) I2, which is 1 is connected to pin no. 5 of 2nd AND gate IC.
24) Pin no. 6 of 2nd AND gate IC is connected to pin no. 10 of OR gate IC.
25) Pin no. 8 of OR gate IC is connected to pin no. 5 of OR gate IC.
26) S1 is connected to pin no. 10 of 2nd AND gate IC.
27) S0 is connected to pin no. 9 of 2nd AND gate IC.
28) Pin no. 8 of 2nd AND gate IC is connected to pin no. 13 of 2nd AND gate IC.
29) I3, which is 0 is connected to pin no.12 of 2nd AND gate IC.
30) Pin no. 11 of 2nd AND gate IC is connected to pin no. 9 of OR gate IC.
31) Pin no. 6 of 2nd AND gate IC is connected to the resistor.
32) The resistor is then connected to the longer leg of the LED which is the anode.
33) The shorter leg of the LED which is the cathode is connected to the GND point.
34) The select inputs, S1 and S2 are set to have values of 00, 01, 10 and 11, they are tabulated
in the truth table below.
35) The power supply is switched on, the results of the experiment are observed and
tabulated in the truth table.
Results
a) 0 in the INPUT shows that the switch is in OFF state and it is connected to the GND.
b) 1 in the INPUT shows that the switch is in ON state and it is connected to the power
source.
c) 0 in the OUTPUT indicates that the LED will not light up on the circuit while 1 in the
OUTPUT indicates that the LED will light up.

Part A (Logic Comparator Experiment):

(INPUT) (OUTPUT)

A1 A0 B1 B0 Q

0 0 0 0 1

0 0 0 1 0

0 0 1 0 0

0 0 1 1 0

0 1 0 0 0

0 1 0 1 1

0 1 1 0 0

0 1 1 1 0

1 0 0 0 0

1 0 0 1 0

1 0 1 0 1

1 0 1 1 0

1 1 0 0 0

1 1 0 1 0

1 1 1 0 0

1 1 1 1 1
Part B (Multiplexer):

The 4 inputs, I0, I1, I2 and I3 are set and they are fixed throughout the experiment:

I3 = 0, I2 = 1, I1 = 1, I0 = 0

(Select Inputs) (Output)

S1 S0 Y

0 0 0

0 1 1

1 0 1

1 1 0
Discussion
For experiment A (Logic Comparator Experiment), only the A=B output is considered, so
the LED will light up when the output is 1. The output will be 1 when both the 2-bit inputs have
the identical values. The LED will not light up when the 2-bit inputs do not have the same
values. A K-map can be drawn by using the truth table in experiment A.

Therefore, the Boolean algebra expressions can be simplified and have an equation of:

A = B: = A1’A0’B1’B0’ + A1’A0B1’B0 + A1A0’B1B0’ + A1A0B1B0

For experiment B (Multiplexer Experiment), the inputs (I0, I1, I2 and I3) are first set to
values of 0, 1, 1 and 0 respectively. As stated in the introduction, when the select inputs are 00,
the multiplexer will choose I0 to be routed to the output, the LED will not light up. When the
select inputs are 01, the multiplexer will choose I1 to be routed to the output, the LED will light
up. When the select inputs are 10, the multiplexer will choose I2 to be routed to the output, the
LED will light up. When the select inputs are 11, the multiplexer will choose I3 to be routed to
the output, the LED will not light up.

Conclusion
In conclusion, we have learned how to use magnitude comparators and multiplexer in a
circuit. As we have stated in the introduction, when both the 2-bit inputs have the same values,
the output will be high. By using the theory given above, we have carried out the experiment.
The LED lights up when the inputs (A1A0B1B0) are 0000, 0101, 1010 and 1111, this shows that
the experiment supports the theory and it can be validated. For the multiplexer, we know that the
inputs selected by the multiplexer are depend on the select inputs. In the experiment, the inputs
for I0, I1, I2 and I3 are set to have values of 0, 1, 1 and 0 respectively. The LED only lights up
when the select inputs (S1S0) are 01 and 10, this is because when the select inputs are 01 and 10,
I1 and I2 are selected to be routed to the output. The outputs obtained are 1 which made the LED
lights up.
References

[1] "Digital Comparators," UMM AL-QURA UNIVERSITY, [Online]. Available:


http://uqu.edu.sa/cis/images/CE_Labs/S6.pdf. [Accessed 12 May 2014].
[2] R. Bigwood, "Current Implementation Using Multiplexers," University of Surrey, 2005. [Online]. Available:
http://www.ee.surrey.ac.uk/Projects/CAL/digital-logic/multiplexer/index.html. [Accessed 12 May 2014].

S-ar putea să vă placă și