You are on page 1of 6

QURTUBA UNIVERSITY OF SCIENCE & IT

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:

2.4 SUMMARY OF THEORY


The number of symbols in a number system is called die base or radix of that system. The decimal
number system uses ten counting symbols the digits 0 through 9 to represent quantities. Thus it is a base
ten system. In this system, we represent quantities larger than 9 by using positional weighting of the
digits. The position, or column, that a digit occupies indicates the weight of that digit in determining the
value of the number. The base ten number system is a weighted system because each column has a value
associated with it.
2.4.1 BINARY NUMBERS
Digital systems use two states to represent quantities and thus are binary in nature. The binary counting
system has a radix 2 and uses only the numbers 0 and 1. (These are often called bits, which is a
contraction of Binary digit). It too is a weighted counting system, with each column value worth twice
the value of the column to the immediate right. Because binary numbers have only two digits, large
numbers expressed in binary require a long string of Os and Is. Other systems, which arc related to
binary in a simple way, are often used to simplify these numbers. These systems include octal,
hexadecimal, and BCD.
2.4.2 OCTAL NUMBERS
The octal number system is a weighted number system using the digits 0 through 7. The column values in
octal are worth 8 times that of the column to the immediate right. You convert from binary to octal by
arranging the binary number in groups of 3 bits, starting at the binary point, and writing the octal symbol
for each binary group. You can reverse the procedure to convert from octal to binary. Simply write an
equivalent 3-bit binary number for each octal character.

EE xxxL DIGITAL LOGIC DESIGN LAB

Page | 1

QURTUBA UNIVERSITY OF SCIENCE & IT


ENGINEERING

DEPARTMENT OF ELECTRICAL

2.4.3 HEXADECIMAL SYSTEM


The hexadecimal system is a weighted number system using 16 characters. The column values in
hexadecimal (or simply hex) are worth 16 times that of the column to the immediate right. The characters
are the numbers 0 through 9 and the first six letters of the alphabet, A through F. Letters were chosen
because of their sequence, but remember that they are used to indicate numbers, not letters. You convert
binary numbers to hexadecimal numbers by arranging the binary number into 4-bit groups, starting at the
binary point. Then write the hex symbol for each group of four bits. You convert hex numbers to binary
by reversing the procedure. That is, write an equivalent 4-bit binary number for each hexadecimal
character.

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.

Figure 2-1: MANI seven-segment display


2.5 CONVERSIONS BETWEEN NUMBER SYSTEMS

EE xxxL DIGITAL LOGIC DESIGN LAB

Page | 2

QURTUBA UNIVERSITY OF SCIENCE & IT


ENGINEERING

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.

EE xxxL DIGITAL LOGIC DESIGN LAB

Page | 3

QURTUBA UNIVERSITY OF SCIENCE & IT


ENGINEERING

DEPARTMENT OF ELECTRICAL

Figure 2-4

EE xxxL DIGITAL LOGIC DESIGN LAB

Page | 4

QURTUBA UNIVERSITY OF SCIENCE & IT


ENGINEERING

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

1. Convert each number shown into the other bases:


Binary
01001100
________

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?

EE xxxL DIGITAL LOGIC DESIGN LAB

Page | 5

QURTUBA UNIVERSITY OF SCIENCE & IT


ENGINEERING

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

Total Score in Lab

EE xxxL DIGITAL LOGIC DESIGN LAB

Page | 6

You might also like