25.08.2021 Views

082-Engineering-Mathematics-Anthony-Croft-Robert-Davison-Martin-Hargreaves-James-Flint-Edisi-5-2017

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

18 Chapter 1 Review of algebraic techniques

Engineeringapplication1.5

Seven-segmentdisplays

The number displays found on music systems, video and other electronic equipment

commonly employ one or more seven-segment indicators. A single sevensegment

indicator is shown in Figure 1.2(a). The individual segments are typically

illuminatedwithalight-emittingdiode(LED)orsimilaropticaldeviceandareeither

onoroff.ThesegmentsareilluminatedaccordingtothetableshowninFigure1.2(b),

where 1 indicates thatthe segment is turned on and 0 indicates thatitisturned off.

b.c.d.

number a b c d e f g

0000 1

1 1 1 1 1 0

0001

0 1 1 0 0 0 0

0010

1 1 0 1 1 0 1

a

0011

0100

1 1 1 1 0 0 1

0 1 1 0 0 1 1

f

g

b

0101

0110

1 0 1 1 0 1 1

1 0 1 1 1 1 1

e

d

c

0111

1000

1001

1 1 1 0 0 0 0

1 1 1 1 1 1 1

1 1 1 1 0 1 1

(a)

(b)

Figure1.2

(a) Seven-segment LED display. (b)Seven-segment coding.

The numbers in the microprocessor system driving the display are typically

stored in binary format, known as, binary coded decimal (b.c.d.). As an example

we consider displaying binary number 11101010 2

as a decimal number on sevensegment

displays. This represents the decimal number 234, which requires three

seven-segment displays.

Themicroprocessorfirstdividestheinputnumberby100andinthiscaseobtains

the result 2 with a remainder of 34. This can be done directly on the binary number

itself via a series of operations within the assembly language of the microprocessor

without first converting to a decimal number. The result 2 = 0010 2

is then decoded

usingFigure1.2(b),givingthebitpattern1101101whichispassedtothe‘hundreds’

display.

Theremainderof34isthendividedby10giving3withafinalremainderof4.The

number 3 = 0011 2

and so this can be outputted to the ‘tens’ display as the pattern

1111001. Finally, 4 = 0100 2

, which ispassed tothe display as the pattern 0110011.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!