Professional Documents
Culture Documents
ENGINEERING
DEPARTMENT OF ELECTRICAL
Lab - 2
Number Systems
2.1 OBJECTIVES
Convert between binary, BCD, octal, hexadecimal, and base ten number systems.
Construct a circuit that demonstrates conversions between number systems.
2.2 REFERENCE READING
Floyd, Digital Fundamentals, Chapter 2; Section 2-1 to 2-9.
2.3 MATERIALS NEEDED
Four LEDs
7447A BCD/decimal decoder
MAN1 seven-segment display
Four-position DIP switch
Resistors:
Page | 1
DEPARTMENT OF ELECTRICAL
The BCD system uses four binary bits to represent each decimal digit. It is a convenient code because it
allows ready conversion from base ten to a code that a machine can understand; however, it is wasteful of
bits. A 4-bit binary number could represent the numbers 0 to 15, but in BCD it represents only the
quantities 0 through 9. The binary representations of the numbers 10 through 15 are not used in BCD and
are invalid.
A simple circuit can illustrate the various number systems discussed above. The circuit in this experiment
uses light-emitting diodes (LEDs) to show the binary or BCD number and a seven-segment display; to
show the equivalent base ten numbers. A seven segment display is a special arrangement of LEDs that
can form the numbers 0 through 9 and some letters. Figure 2-1 illustrates the arrangement of diodes in a
seven-segment display. The circuit uses an IC called a decoder to convert the binary input to a sevensegment value. Decoder circuits will be studied later in the course.
Page | 2
DEPARTMENT OF ELECTRICAL
1. Connect the circuit shown in Figure 2-2. Test each switch to see that it turns on an LED. This portion
of the circuit represents the input binary number. A lighted LED represents a binary one, and an un
lighted LED represents a binary zero. The least significant bit (LSB) is on the right and represents the
1s column. The most significant bit (MSB) is on the left.
Column weight of MSB = ___________
+5.0 V
4-position
DIP switch
Switch
MSB
330
LSB
330
330
330
Figure 2-2
2. Now remove power and add the circuit shown in Figure 2-3. The pin numbers for the MANI display
are shown in Figure 2-1, and 7447A pin numbers are shown in Figure 2-4. Note that the 7447 has 16
pins and the MAN1 seven-segment display has only 14 pins. Both are numbered counterclockwise
starting from the top left.
Connect pins 3,4 and 5 on the 7447 A to a 1 k resistor connected to +5 V. Connect pin 14 of the
MANI to +5 V. Be sure to connect each output from the 7447A through a 330 resistor to the
segment display as shown on the circuit drawing.
3. When you have completed wiring the circuit, test it by checking each switch combination shown in
Table 2-1 on the next page. Set the binary number on the switches by closing a switch for a 1 and
opening a switch for a 0. Complete each column for the table by writing the input numbers as BCD,
octal, and hexadecimal. Show the output from the seven-segment display in the right-hand column.
The last six invalid BCD codes will show a unique code in the seven-segment display.
Page | 3
DEPARTMENT OF ELECTRICAL
Figure 2-4
Page | 4
DEPARTMENT OF ELECTRICAL
Input
Binary
Number
Output
BCD
Number
Octal
Number
Hex
Number
Seven-Segment
Display
0000
0001
0010
0011
0100
0101
0110
0111
1000
1001
1010
1011
1100
1101
1110
1111
Table 2-1
2.5.1 REVIEW QUESTIONS
Octal
________
304
________
________
________
________
________
________
Hex
______
__
______
__
E6
Decimal
________
______
__
______
__
57
________
________
________
BCD
_______
_
_______
_
_______
_
_______
_
0100100
1
2. Assume that you set the switches in Figure 2-3 for 1000, but the seven-segment display shows a 0.
What are the possible causes for this malfunction?
Page | 5
DEPARTMENT OF ELECTRICAL
3. Look up the 7447A in the data book. Find the maximum available output current for segments a-g.
Note that a positive sign is for conventional current (plus to minus) flowing INTO the IC. A negative
sign is for conventional current flowing OUT of the IC. Note that IOL is several orders of magnitude
greater than IOH. Thus, current into the device can be much larger than the current from the device.
This situation is typical of TTL logic, although the values for the 7447 A are somewhat larger than
most TTL ICs. Fill in the values for IOL and IOH:
7447A IOL = _________
7447A IOH = _________
2.6 ASSESSMENT SHEET
Name: ___________________________
Reg. No. : ________________________
Date of Lab: _____________________
Table 2-1
Problem
Number
Lab
Performance
Review Question
Review Question
Review Question
Working
Viva
Page | 6