0% found this document useful (0 votes)
61 views25 pages

Iklan Pemandu - UPK

X = ..................................................................................... Table 1.8 A B X 0 0 NAND gate 2 0 1 (IC 7400) 1 0 1

Uploaded by

Ah Long
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
61 views25 pages

Iklan Pemandu - UPK

X = ..................................................................................... Table 1.8 A B X 0 0 NAND gate 2 0 1 (IC 7400) 1 0 1

Uploaded by

Ah Long
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 25

Laboratory Manual

DIGITAL SYSTEM 1

ECE351

Editors

Nur Athiqah Harron


Faridah Abd Razak
TABLE OF CONTENTS

Experiment 1 : LOGIC GATES & BINARY ARITHMETIC……………………………….1


Result Sheet Experiment 1………………………………………………………………………....9
Experiment 2 : ENCODER & DECODER CIRCUIT……………………………………14
Result Sheet Experiment 2………………………………………………………………………..19
Appendix A………………………………………………………………………………….............22
Rubric………………………………………………………………………………………………..23

i
FACULTY OF ELECTRICAL ENGINEERING

UNIVERSITI TEKNOLOGI MARA

DIGITAL SYSTEM 1 LABORATORY

(ECE351)

EXPERIMENT 1

LOGIC GATES AND BINARY ARITHMETIC

OBJECTIVES
1. To be familiar with TTL IC physically and understand them according to data sheet.
2. To understand the function of each TTL IC and combination of them.
3. To produce the Truth Table and Boolean expression of each logic circuit.
4. To know and construct Binary Arithmetic and comparator circuits using logic gates.

LIST OF REQUIREMENTS
Equipment
1. Digital Logic Trainer

Components
1. IC TTL : 7400 (NAND), 7408 (AND), 7404 (INVERTER), 7402 (NOR),
7432 (OR) & 7486 (XOR)

1
THEORY

Logic gate is an elementary building block of a digital circuit. Most logic gates have two
inputs and one output. At any given moment, every terminal is in one of the two binary
conditions low (0) or high (1), represented by different voltage levels. In most log ic gates, the
low state is approximately zero volts (0 V), while the high state is approximately five volts
positive (+5 V).

There are seven basic logic gates: AND, OR, XOR, NOT, NAND, NOR, and XNOR. These
gates can be combined with each other to produce other type of application and function,
such as half-adder, full-adder, comparators, flip flops etc.

Truth Table
Truth table is a table that describes the behaviour of a logic gate. It lists the value of the
output for every possible combination of the inputs and can be used to simplify the number
of logic gates and level of nesting in an electronic circuit.

Boolean Expression
Boolean algebra (or Boolean logic) is a logical calculus of truth values. A Boolean
expression is an expression that results in a Boolean value, that is, TRUE (1 bit) or FALSE
(0 bit). Thus, circuits can be described by expressions containing variables. Furthermore,
every possible input-output behaviour in a digital circuit can be modelled by a suitable
Boolean expression.

Binary Arithmetic
All arithmetic operations can be implemented using adders formed from the basic logic
gates. For a large number of digits we use medium-scale-integrated (MSI) circuits, which
actually have several adders within a single integrated package.

Adders are very important in many types of digital systems in which numerical data are
processed. An understanding of their basic operation is fundamental to a through grasp of
digital systems concepts.

2
1. Half-Adder
Recall the basic rules for binary addition:
0+0=0
0+1=1
1+0=1
1 + 1 = 0 carrying 1

These operations are performed by a logic circuit called a half-adder. The half-adder accepts
two binary digits on its inputs and produces two binary digits on its outputs, a S (sum) bit and
a Co (carry) bit, as shown by the logic symbol in Figure 1.1.

Table 1.1

Figure 1.1: Half-adder and truth table

2. Full-Adder
The full-adder accepts three inputs and generates a sum output and a carry output. So the
basic difference between a full-adder and a half-adder is that the full-adder accepts an
additional input, which allows it to handle input carries. A logic symbol for a full-adder is
shown in Figure 1.2.

Comparator
The basic function of a comparator is to compare the magnitudes of two binary quantities to
determine the relationship of those quantities. It determines if a binary number is greater
than, less than or equal to another binary number.

3
Table 1.2

Figure 1.2: Full-adder and truth table

PROCEDURE

PART A: Logic Gates Circuit


1. Construct the circuit as shown in Figure 1.3 – 1.11. Refer to the Appendix A and the
data sheet for pin allocation.
2. Power ON the trainer and observe the LEDs indicator.
3. Fill in Table 1.3 – 1.11 in the result sheet with 0s and 1s to match the LEDs indications
in the right side of the table. If the LED is ON, the logic is ‘1’ and if the LED is OFF, logic
is ‘0’.
4. Write the Boolean Expression for each output.

LOGIC GATES CIRCUIT

NOT gate
(IC 7404)

Figure 1.3

4
OR gate
(IC 7432)

Figure 1.4

NOR gate
(IC 7402)
Figure1.5

AND gate
(IC 7408)
Figure 1.6

NAND gate 1
(IC 7400)
Figure 1.7

NAND gate 2
(IC 7400)

Figure 1.8

XOR gate
(IC 7486)
Figure 1.9

5
Combination
Gates 1

Figure 1.10

Combination
Gates 2

Figure 1.11

PART B: Half-Adder
1. Construct the circuit as shown in Figure 1.12 (Refer data sheet given on Appendix A).
2. Configure switch A and B according to data in result sheet Table 1.12.
3. Fill in the Table 1.12 in result sheet with 0s and 1s to match the output
(LEDs indications). If the LED is ON, the logic is ‘1’ and if the LED is OFF, logic is ‘0’.
4. Write the Boolean Expression for each output.

Figure 1.12: Half-Adder

6
PART C: Full-Adder
1. Construct the circuit as shown in Figure 1.13.
2. Configure switch A ,B and Cin according to data in result sheet Table 1.13.
3. Fill in the Table 1.13 in result sheet with 0s and 1s to match the output
(LEDs indications). If the LED is ON, the logic is ‘1’ and if the LED is OFF, logic is ‘0’.
4. Write the Boolean Expression for output S and C 0.

Figure 1.13: Full-Adder

PART D: Comparator Circuits


1 bit comparator
1. Set up the circuit as shown in Figure 1.14 using XOR, AND and NOT gate.
2. Assign your A<B and A>B logic gates accordingly.
3. Complete Table 1.14 in the result sheet.

Figure 1.14: 1 bit Comparator

7
QUESTIONS/DISCUSSION
1. A full-adder can be implemented using half-adder and OR gate. Draw the circuit using 2
block diagram symbols of half-adder and an OR gate given in Figure 2.5.
2. From Figure 1.10, explain how you were able to determine the circuit as a comparator.

CONCLUSION
In your conclusion, comment on the results obtained and the problems encountered.

REFERENCES

Ali, M.Y., Mokhtar, N.F., Hamzah, I.H., Yusuf, R., Saad, N.H., Omar, N. (2007). Laboratory
Manual: KEU 171 Electrical Engineering Laboratory 2, Logic Gates. Faculty of
Electrical Engineering, Universiti Teknologi MARA Pulau Pinang.

Tocci, R.J., Wildmer, N.S., Moss, G.L. (2007). Digital Systems: Principles and Applications.
New Jersey, USA: Pearson Prentice Hall.

8
RESULT SHEET
EXPERIMENT 1: LOGIC GATES
NAME:
GROUP: STUDENT ID: /50
PART A: Logic Gates Circuit

LOGIC GATES CIRCUIT


Table 1.3
A X

NOT gate 0
(IC 7404) 1

X = ………………………………………………………………………….

Table 1.4
A B X
0 0

OR gate 0 1
(IC 7432) 1 0
1 1

X = ………………………………………………………………………….

Table 1.5
A B X
0 0

NOR gate 0 1
(IC 7402) 1 0
1 1

X = ………………………………………………………………………….

Table1.6
A B X
0 0

AND gate 0 1
(IC 7408) 1 0
1 1

X = ………………………………………………………………………….

9
Table 1.7
A B X
0 0

NAND gate 0 1
(IC 7400) 1 0
1 1

X = ………………………………………………………………………….

Table 1.8
A B X
0 0
NAND gate 0 1
(IC 7400) 1 0
1 1

X = ………………………………………………………………………….

Table 1.9
A B X
0 0

XOR gate 0 1
(IC 7486) 1 0
1 1

X = ………………………………………………………………………….

Table 1.10
A B X Y
0 0
0 1
Combination 1 0
Gates
1 1

X = ………………………………………………………………………….

Y = ………………………………………………………………………….

10
Table 1.11
A B C X
0 0 0
0 0 1
0 1 0

Combination 0 1 1
Gates 1 0 0
1 0 1
1 1 0
1 1 1

X = ………………………………………………………………………….

PART B: Half-Adder

Table 1.12
A B C0 S S = ………………………………………….

0 0
0 1 C0 = ………………………………………..

1 0
1 1

PART C: Full-Adder

Table 1.13
A B C C0 S S = ………………………………………….

0 0 0
0 0 1 C0 = ………………………………………..

0 1 0
0 1 1
1 0 0
1 0 1
1 1 0
1 1 1

11
PART D: Comparator Circuits

Table 1.14
A B A=B A<B A>B
0 0
0 1
1 0
1 1

QUESTIONS/DISCUSSION

1. A full-adder can be implemented using half-adder and OR gate. Draw the circuit using 2
block diagram symbols of half-adder and an OR gate given in Figure 2.5.

2. From Figure 1.10, explain how you were able to determine the circuit as a comparator.

_________________________________________________________________________
_________________________________________________________________________
_________________________________________________________________________
_________________________________________________________________________
_________________________________________________________________________
_________________________________________________________________________

12
CONCLUSION

_________________________________________________________________________
_________________________________________________________________________
_________________________________________________________________________
_________________________________________________________________________
_________________________________________________________________________
_________________________________________________________________________
_________________________________________________________________________
_________________________________________________________________________
_________________________________________________________________________
_________________________________________________________________________
_________________________________________________________________________
_________________________________________________________________________
_________________________________________________________________________
_________________________________________________________________________
_________________________________________________________________________
_________________________________________________________________________
________________________________________________________________________

13
FACULTY OF ELECTRICAL ENGINEERING

UNIVERSITI TEKNOLOGI MARA

DIGITAL SYSTEM 1 LABORATORY

(ECE351)

EXPERIMENT 2

ENCODER & DECODER CIRCUIT

OBJECTIVES
1. To construct various encoders and decoders using TTL IC.

LIST OF REQUIREMENTS
Equipment
1. Digital Logic Trainer

Components
1. IC TTL : 7400, 7402, 7404, 7408 and 7432
2. Decoder IC: 7442
3. Encoder IC: 74147

THEORY

Decoders
The decoder is a basic building block that is useful in selecting one-out-of-N lines. The input
to a decoder is an 1-bit binary (i.e., encoded) number and the output is 2 I bits of decoded
data.

14
Figure 3.1 shows a 2-to-4 decoder and its logical implementation. Among the 2 I outputs of
a decoder, only one output line is 1 at any time as shown in the Table 3.1.

Figure 3.1: A 2-to-4 decoder block diagram

Encoders
Encoders perform the reverse operation of decoders. Encoders take 2 B input lines and
generate a B-bit binary number on B output lines. The basic truth table of an encoder is
similar to the decoder with the inputs and outputs interchanged. The output of an encoder is
valid as long as only one of the inputs is 1.

Encoders need a way to indicate when the output is valid so that the presence of invalid
inputs can be conveyed to the output side. This is typically done by an additional output
control line as shown in Figure 3.2.

Figure 3.2 also shows how an enable input can be incorporated into the logic. Notice that
the output is valid only when the enable input is high. Furthermore, the output is 00 when the
input line I 3 I 2 I 1 I 0 = 0001 or 0000. To distinguish these two cases, we can use the valid-
input control signal, which is one whenever at least one of the four input signals is one.

Figure 3.2: A 4-to-2 encoder block diagram

15
PROCEDURE

Constructing Decoders and Encoders with TTL IC


PART A: Decoders
1. Construct a 4-to-10 decoder using 7442 IC as shown in Figure 3.3. Connect Vcc to +5V
and GND to power ground for IC.
2. Connect the four inputs A, B, C and D to four switches and the ten outputs O0 – O9 to
ten LEDs.
3. Connect Vcc to +5V and GND to power ground for both ICs.
4. Set the data switches to four different combinations and examine which output line will
be activated (indicated by an unlighted LED) for different inputs.
5. Record the results in Table 3.3 in the result sheet.

Figure 3.3: A 4-to-10 decoder

16
PART B: Encoders
1. Refer to the data sheet for the 74147. Note that the inputs are active LOW. Grounding
one (and only one) input will result in a binary code being produced at the encoder
outputs, which represent the number of the input activated. Note also that the outputs
are active LOW. Therefore the output code will be inverted BCD.
2. Construct a 10-to-4 encoder using 74147 and 7404 ICs as shown in Figure 3.4.
3. Connect Vcc to +5V and GND to power ground for both ICs. Connect the ten inputs
I1 – I9 to ten switches SW1 – SW9 and the four outputs A,B,C and D of the inverters to
four LEDs respectively.
4. Power ON. Switch on SW1 and record the results in Table 3.4 in the result sheet.
5. Try to activate only one switch each time and observe the all four LEDs indicator.
6. Fill in Table 3.4 with 0s and 1s to match the LEDs indications.

Figure 3.4: A 10-to-4 encoder

17
QUESTION/DISCUSSION
1. What are the applications of decoder?
2. What is the difference between decoder and encoder?
3. How many input lines and how many output lines are there for a n – 2n decoder?

CONCLUSION
In your conclusion, comment on the results obtained and the problems encountered.

REFERENCES
Dandamudi, Sivarama P. (2003) Fundamentals of Computer Organization and Design.
Springer.
Deloach, Jim. C., Ambrosio, Frank J. (2001) Lab Manual: A Troubleshooting Approach to
accompany Digital systems: Principles and Applications, Eight Edition. New Jersey:
Prentice Hall, Inc.
Edwin Hou, Arthur Glaser. (2005) Laboratory Manual Version 4.1: ECE 394 Digital Systems
Laboratory, Department of Electrical and Computer Engineering. Newark, New Jersey:
New Jersey Institute of Technology

18
RESULT SHEET
EXPERIMENT 1: LOGIC GATES
NAME:
GROUP: STUDENT ID: /50
Constructing Decoders and Encoders with TTL IC

PART A: Decoders

Table 3.3

BCD Input 7442 Output Conditions


Decimal
D C B A O0 O1 O2 O3 O4 O5 O6 O7 O8 O9 Digit

0 0 0 0 0 1 1 1 1 1 1 1 1 1 0

0 0 0 1

0 0 1 0

0 0 1 1

0 1 0 0

0 1 0 1

0 1 1 0

0 1 1 1

1 0 0 0

1 0 0 1

19
PART B: Encoders

Table 3.4

INPUT OUTPUT

BCD Output
Input Activated Decimal Digit
O3 O2 O1 O0

None 0 0 0 0 0

I1 1

I2 2

I3 3

I4 4

I5 5

I6 6

I7 7

I8 8

I9 9

QUESTIONS/DISCUSSION
1. What are the applications of decoder?
_________________________________________________________________________
_________________________________________________________________________
_________________________________________________________________________
_________________________________________________________________________
_________________________________________________________________________
_________________________________________________________________________
_________________________________________________________________________
________________________________________________________________________

20
2. What is the difference between decoder and encoder?
_________________________________________________________________________
_________________________________________________________________________
_________________________________________________________________________
_________________________________________________________________________
_________________________________________________________________________
_________________________________________________________________________
_________________________________________________________________________
________________________________________________________________________

3. How many input lines and how many output lines are there for a n – 2n decoder?
_________________________________________________________________________
_________________________________________________________________________
_________________________________________________________________________
_________________________________________________________________________
_________________________________________________________________________
_________________________________________________________________________
_________________________________________________________________________
________________________________________________________________________

CONCLUSION

_________________________________________________________________________
_________________________________________________________________________
_________________________________________________________________________
_________________________________________________________________________
_________________________________________________________________________
_________________________________________________________________________
_________________________________________________________________________
_________________________________________________________________________
_________________________________________________________________________
_________________________________________________________________________
_________________________________________________________________________
_________________________________________________________________________
________________________________________________________________________

21
APPENDIX A: IC PIN CONFIGURATION

22
RUBRIC

23

You might also like