Sei sulla pagina 1di 107

n

kev|ew of number system convers|on from one to another


-Introduction to Number System
-Number Systems (Radix-R- Representation)
- Common Number Systems
-Conversion Among Various Bases
-Why Binary No.?
Introduct|on to Number System
number sysLem deals ln Lhe represenLaLlon of
varlous sysLems used for Lhe represenLaLlon of
numbers
1he knowledge of number sysLems ls very useful
for undersLandlng analyzlng and deslgnlng dlglLal
clrculLs
1he number SysLem ls classlfled lnLo
NonWe|ghted Number System
We|ghted Number System
InA? nASSA 11/21/2011
NUM8Lk SS1LMS
(AuO 9Sn1A1n)
ueclmal number expanslon
7362S
10
(710
4
)+(310
3
)+(610
2
)+(210
1
)+(S10
0
)
8lnary number represenLaLlon
10110
2
(12
4
)+(02
3
)+(12
2
)+(12
1
)+(02
0
)22
10
Pexadeclmal number represenLaLlon
3L488
16
(316
4
)+(14 16
3
)+(416
2
)+(11 16
1
)+(816
0
) 2SS160
10
InA? nASSA 11/21/2011
NUM8Lk SS1LMS
(AuO 9Sn1A1n)
kad|x10 kepresentat|on
736234383
10
(710
4
)+(310
3
)+(610
2
)+(210
1
)+(310
0
)
+(410
1
)+(310
2
)+(810
3
)+(310
4
)
kad|x2 kepresentat|on
101100011
2
(12
4
)+(02
3
)+(12
2
)+(12
1
)+(02
0
)
+(02
1
)+(02
2
)+(12
3
)+(12
4
) 22187S
10
kad|x8 kepresentat|on
26S161731
8
(28
4
)+(68
3
)+(S8
2
)+(18
1
)+(68
0
)
+(18
1
)+(78
2
)+(38
3
)+(18
4
) 11S9824
10
InA? nASSA 11/21/2011
NUM8Lk SS1LMS
(AuO 9Sn1A1n)
adlx16 epresenLaLlon
19AD6I411
16
(116
4
)+(916
3
)+(A16
2
)+(D16
1
)+(616
0
)
+(I16
1
)+(416
2
)+(116
3
)+(116
4
) 10S1749S
10
InA? nASSA 11/21/2011
ommon number SysLems
System Base Symbols
Used by
humans?
Used in
comput
ers?
Decimal 10 0, 1, . 9 Yes No
Binary 2 0, 1 No Yes
Octal 8 0, 1, . 7 No No
Hexa-
decimal
16 0, 1, . 9,
A, B, . F
No No
11/21/2011 InA? nASSA
;uanLlLles/ounLlng (1 of 3)
Decimal Binary Octal Hexa-decimal
0 0 0 0
1 1 1 1
2 10 2 2
3 11 3 3
4 100 4 4
5 101 5 5
6 110 6 6
7 111 7 7
11/21/2011 InA? nASSA
;uanLlLles/ounLlng (2 of 3)
Decimal Binary Octal Hexa-decimal
8 1000 10 8
9 1001 11 9
10 1010 12 A
11 1011 13 B
12 1100 14 C
13 1101 15 D
14 1110 16 E
15 1111 17 F
11/21/2011 InA? nASSA
;uanLlLles/ounLlng (3 of 3)
Decimal Binary Octal Hexa-decimal
16 10000 20 10
17 10001 21 11
18 10010 22 12
19 10011 23 13
20 10100 24 14
21 10101 25 15
22 10110 26 16
23 10111 27 17
Etc. 11/21/2011 InA? nASSA
epresenLaLlon xamples
numbers 0 Lo 7
We use comblnaLlon of dlglLs 1 dlglLs glves us Lwo comblnaLlons 2 wlll
yleld four and 3 wlll yleld 8
need Lhree blLs (blnary dlglLs)
We wanL Lo represenL 16 alphabeLs need four blLs
We wanL Lo represenLs numbers from 11 Lo 23?
lass 9roblem
lor each parL below devlse a scheme Lo represenL ln blnary each seL
of symbols
(A) numbers 0 1 2 3 4 3 6 7
(8) AlphabeLs A 8 u l
() nLegers from 21 Lo 36
InA? nASSA 11/21/2011
9oslLlonal value
8lnary dlglLs are numbered
lghL mosL dlglL ls 0
nexL Lo LhaL ls a 1
And so on up Lo n1 ln an nblL represenLaLlon
ueclmal polnL ls lmplled aL Lhe rlghL of blL 0
ach blL ls asslgned a welghL
1he welghL of l
Lh
blL ls 2
l
uslng Lhls noLaLlon
1he value of an n blL sequence ls
2
n1
x
n1
+ 2
n2
x
n2
+ + 2
1
x
1
+ 2
0
x
0

epresenLaLlon of 8lnary numbers
x x x x x x x x
7 6 5 4 3 2 1 0
Bit # Weight
0 2
0
1 2
1
2 2
2
3 2
3

1
0
2
3

11/21/2011 InA? nASSA


A number sysLem can have any base b
1he dlglLs used are 0 1 b1
1he welghL of l
Lh
place ls b
l
1he converslon formula from base b lnLo declmal number ls
ommonly used base are 2 3 8 10 16 20
8ase 2 ls called blnary
8ase 'b' number
for i = 0 to n 1
for an n digit quantity

1
0
3

-
11/21/2011 InA? nASSA
onverslon Among 8ases
1he posslblllLles
Hexadecimal
Decimal Octal
Binary
11/21/2011 InA? nASSA
;ulck xample
25
10
11001
2
31
8
19
16
Base
11/21/2011 InA? nASSA
ueclmal Lo ueclmal ([usL for fun)
Hexadecimal
Decimal Octal
Binary
11/21/2011 InA? nASSA
125
10
= 5 x 10
0
= 5
2 x 10
1
= 20
1 x 10
2
= 100
125
Base
Weight
11/21/2011 InA? nASSA
lracLlons
ueclmal Lo declmal ([usL for fun)
14 = 4 x 10
-2
= 004
1 x 10
-1
= 01
x 10
0
=
14
11/21/2011 InA? nASSA
8lnary Lo ueclmal
Hexadecimal
Decimal Octal
Binary
11/21/2011 InA? nASSA
8lnary Lo ueclmal
1echnlque
MulLlply each blL by 2

where ls Lhe welghL" of


Lhe blL
1he welghL ls Lhe poslLlon of Lhe blL sLarLlng from
0 on Lhe rlghL
Add Lhe resulLs
11/21/2011 InA? nASSA
xample
101011
2
= 1 x 2
0
= 1
1 x 2
1
= 2
0 x 2
2
= 0
1 x 2

= 8
0 x 2
4
= 0
1 x 2
5
= 2
4
10
Bit '0
11/21/2011 InA? nASSA
lracLlons
8lnary Lo declmal
101011 = 1 x 2
-4
= 00625
1 x 2
-
= 0125
0 x 2
-2
= 00
1 x 2
-1
= 05
0 x 2
0
= 00
1 x 2
1
= 20
26875
11/21/2011 InA? nASSA
8nA? uMAL
9erform radlx2 expanslon
- 1 MulLlply each blL ln Lhe blnary number by 2 Lo Lhe power of lLs place
2 1hen sum all of Lhe values Lo geL Lhe declmal value
xamples
10111
2
(12
4
)+(02
3
)+(12
2
)+(12
1
)+(12
0
)23
10
101100011
2
(12
4
)+(02
3
)+(12
2
)+(12
1
)+(02
0
)
+(02
1
)+(02
2
)+(12
3
)+(12
4
) 221873
10
InA? nASSA 11/21/2011
cLal Lo ueclmal
Hexadecimal
Decimal Octal
Binary
11/21/2011 InA? nASSA
cLal Lo ueclmal
1echnlque
MulLlply each blL by 8

where ls Lhe welghL" of


Lhe blL
1he welghL ls Lhe poslLlon of Lhe blL sLarLlng from
0 on Lhe rlghL
Add Lhe resulLs
11/21/2011 InA? nASSA
xample
724
8
= 4 x 8
0
= 4
2 x 8
1
= 16
7 x 8
2
= 448
468
10
11/21/2011 InA? nASSA
Pexadeclmal Lo ueclmal
Hexadecimal
Decimal Octal
Binary
11/21/2011 InA? nASSA
Pexadeclmal Lo ueclmal
1echnlque
MulLlply each blL by 16

where ls Lhe welghL"


of Lhe blL
1he welghL ls Lhe poslLlon of Lhe blL sLarLlng from
0 on Lhe rlghL
Add Lhe resulLs
11/21/2011 InA? nASSA
xample

16
= x 16
0
= 12 x 1 = 12
x 16
1
= 11 x 16 = 176
x 16
2
= 10 x 256 = 2560
2748
10
11/21/2011 InA? nASSA
ueclmal Lo 8lnary
Hexadecimal
Decimal Octal
Binary
11/21/2011 InA? nASSA
ueclmal Lo 8lnary
1echnlque
ulvlde by Lwo keep Lrack of Lhe remalnder
llrsL remalnder ls blL 0 (LS8 leasLslgnlflcanL blL)
Second remalnder ls blL 1
Lc
11/21/2011 InA? nASSA
xample
125
10
= .
2
2 125
62 1 2
1 0
2
15 1
2
7 1
2
1
2
1 1 2
0 1
125
10
= 1111101
2
11/21/2011 InA? nASSA
lracLlons
ueclmal Lo blnary
14579
14579
x 2
029158
x 2
05816
x 2
11662
x 2
0264
x 2
066528
x 2
1056
etc
11001001
11/21/2011 InA? nASSA
uMAL 8nA?(1)
Integer part
- Modulo dlvlslon of declmal lnLeger by 2 Lo geL each blL sLarLlng wlLh LS8
- Iract|on part
- MulLlpllcaLlon declmal fracLlon by 2 and collecL resulLlng lnLegers sLarLlng wlLh MS8
xample
onverL 41828123
10
Integer part
41 mod 21 LS8
20 mod 20
10 mod 20
S mod 21
2 mod 20
1 mod 21 MS8
InA? nASSA 11/21/2011
uMAL 8nA?(2)
Iract|on part
082812S 2 16S62S MS8
06S62S 2 1312S
0312S 2 062S
062S 2 12S
02S 2 0S
0S 2 10 LS8
1herefore 4182812S10 1010011101012
InA? nASSA 11/21/2011
ueclmal Lo cLal
Hexadecimal
Decimal Octal
Binary
11/21/2011 InA? nASSA
xample
124
10
= .
8
8 124
154 2
8
19 2
8
2
8
0 2
124
10
= 222
8
11/21/2011 InA? nASSA
ueclmal Lo Pexadeclmal
Hexadecimal
Decimal Octal
Binary
11/21/2011 InA? nASSA
xample
124
10
= .
16
124
10
= 4D2
16
16 124
77 2
16
4 1 = D
16
0 4
11/21/2011 InA? nASSA
cLal Lo 8lnary
Hexadecimal
Decimal Octal
Binary
11/21/2011 InA? nASSA
cLal Lo 8lnary
1echnlque
onverL each ocLal dlglL Lo a 3blL equlvalenL
blnary represenLaLlon
11/21/2011 InA? nASSA
xample
705
8
= .
2
7 0 5
111 000 101
705
8
= 111000101
2
11/21/2011 InA? nASSA
Pexadeclmal Lo 8lnary
Hexadecimal
Decimal Octal
Binary
11/21/2011 InA? nASSA
xample
10
16
= .
2
1 0
0001 0000 1010 1111
10
16
= 0001000010101111
2
11/21/2011 InA? nASSA
8lnary Lo cLal
Hexadecimal
Decimal Octal
Binary
11/21/2011 InA? nASSA
8lnary Lo cLal
1echnlque
Croup blLs ln Lhrees sLarLlng on rlghL
onverL Lo ocLal dlglLs
11/21/2011 InA? nASSA
xample
1011010111
2
= .
8
1 011 010 111
1 2 7
1011010111
2
= 127
8
11/21/2011 InA? nASSA
8nA? 1AL
8INAk CC1AL
0002 08
0012 18
0102 28
0112 38
1002 48
1012 38
1102 68
1112 78
8INAk CC1AL Croup blnary blLs by 3 from LS8
xamples
10 100 1102 2468
10 101 111 011011 112 2S73368
InA? nASSA 11/21/2011
8lnary Lo Pexadeclmal
Hexadecimal
Decimal Octal
Binary
11/21/2011 InA? nASSA
8lnary Lo Pexadeclmal
1echnlque
Croup blLs ln fours sLarLlng on rlghL
onverL Lo hexadeclmal dlglLs
11/21/2011 InA? nASSA
8lnary Lo Pexadeclmal
1echnlque
Croup blLs ln fours sLarLlng on rlghL
onverL Lo hexadeclmal dlglLs
11/21/2011 InA? nASSA
xample
1010111011
2
= .
16
10 1011 1011
2
1010111011
2
= 2
16
11/21/2011 InA? nASSA
8nA? POAuMAL
8INAk nLkADLCIMAL
0000
2
0
16
10002 816
00012 116 10012 916
00102 216 10102 10 (A16)
00112 316
01002 416 10112 11 (816)
01012 316 11002 12 (16)
01102 616 11012 13 (u16)
01112 716 11102 14 (16)
11112 13 (l16)
8INAk nLkADLCIMAL Croup blnary by 4 blLs from radlx polnL
xamples
10 10 10 01 101100 012 2A6C416
0111 10112 7816
InA? nASSA 11/21/2011
cLal Lo Pexadeclmal
Hexadecimal
Decimal Octal
Binary
11/21/2011 InA? nASSA
cLal Lo Pexadeclmal
1echnlque
use blnary as an lnLermedlary
11/21/2011 InA? nASSA
xample
1076
8
= .
16
1 0 7 6
001 000 111 110
2 E
1076
8
= 2E
16
11/21/2011 InA? nASSA
Pexadeclmal Lo cLal
Hexadecimal
Decimal Octal
Binary
11/21/2011 InA? nASSA
Pexadeclmal Lo cLal
1echnlque
use blnary as an lnLermedlary
11/21/2011 InA? nASSA
xample
10
16
= .
8
1 0
0001 1111 0000 1100
1 7 4 1 4
10
16
= 17414
8
11/21/2011 InA? nASSA
xerclse onverL
Don`t use a calculator!
Decimal Binary Octal
Hexa-
decimal
33
1110101
703
1AF
11/21/2011 InA? nASSA
xerclse onverL
Decimal Binary Octal Hexa-decimal
33 100001 41 21
117 1110101 165 75
451 111000011 703 1C3
431 110101111 657 1AF
nswer
11/21/2011 InA? nASSA
And now 1ry Some 9roblems
Suppose you want to represent pos|t|ve |ntegers |n b|nary
ndlcaLe how many blLs are requlred Lo represenL each of Lhe followlng seLs of
lnLegers
(1) 1he lnLegers from 0 Lo 127 lncluslve
(2) 1he lnLegers from 0 Lo 2048 lncluslve
(3) 1he lnLegers from 0 Lo 32300 lncluslve
(4) 1he lnLegers from 0 Lo 1300343 lncluslve
ndlcaLe how large a value can be represenLed by each of Lhe blnary quanLlLles
(1) 4blL (2) 12blL and (3) 24blL quanLlLy
onverL each of Lhe followlng blnary dlglLs lnLo declmal Assume Lhese quanLlLles
represenL unslgned lnLegers
(1) 1010 (2) 10010 (3) 0111110 (4) 10000000 (3) 0111111
onverL each of Lhe followlng declmal numbers lnLo blnary
(1) 6 (2) 13 (3) 111 (4) 147 (3) 311
InA? nASSA 11/21/2011
Why 8lnary n ?
igitaI Computers
- ImpIy that the computer deaIs with digitaI information, i.e., it deaIs
with the information that is represented by binary digits
- Why #? instead of ecimaI or other number system ?
* Consider eIectronic signaI
signaI
range
0 1 2 3 4 5 6 7 8 9
0 0 1 2 3 4 5 6 7 8 9
1 1 2 3 4 5 6 7 8 9 10
2 2 3 4 5 6 7 8 9 1011
3 3 4 5 6 7 8 9 101112
4 4 5 6 7 8 9 10111213
5 5 6 7 8 9 1011121314
6 6 7 8 9 101112131415
7 7 8 9 10111213141516
8 8 9 1011121314151617
9 9 101112131415161718
0
1
7
6
5
4
3
2
1
0
binary octaI
0 1
0 1
1 10
0
1
* Consider the caIcuIation cost - Add
InA? nASSA 11/21/2011
asy Lo represenL
ff and n pen and close swlLch Pead and Lall on a coln 9olarlLy of
magneLlzaLlon 0 and nonzero volLage levels
Pow Lo represenL lnformaLlon ln blnary?
We wanL Lo represenL poslLlve numbers 0 1
0 ls 0 and 1 ls 1
We wanL Lo represenL red and green colors
0 ls red and 1 ls green (or vlce versa)
WanL Lo represenL summer and wlnLer semesLers
0 ls summer and 1 ls wlnLer (or vlce versa)
Why 8lnary no?
11/21/2011 InA? nASSA
8lLs and omblnaLlons
# of
Bits
1
2
3
4
..
..
..
n
# of
quantities
2
4
8
16
..
..
..
2
n
What happens in other number
systems?
n base b, n digits give bn
combinations
Base 10: decimal
Base 8: Octal
Base 16: Hexadecimal
11/21/2011 InA? nASSA
IN1kCDUC1ICN
1he 8CD Code
1he Lxcess3 Code
1he Gray Code
1he ASCII Code
Lncoders
Sevensegment
D|sp|ays
Sevensegment LLD
D|sp|ays
Decoders
8CDtoSeven
Segment Decoder]
Dr|ver
L|qu|d Crysta| D|sp|ays
Vacuum I|uorescent
D|sp|ays
1he 8421 8CD Code
8CD stands for 8|naryCoded Dec|ma|
A 8CD number |s a fourb|t b|nary group that
represents one of the ten dec|ma| d|g|ts 0 through 9
,250
Decimal number 4926 4 9 2 6
8421 BC coded number 0100 1001 0010
0110
Convert the 8CD coded number
1000 0111 0001 |nto dec|ma|
"&IZ
ecimaI Number 8 7 1
BC Coded Number 1000 0111
0001
Convert the decimaI
number 350 to its BC
equivaIent.
ecimaI Number 3 5 0
BC Coded Number 0011 0101
0000
"&IZ
1he Lxcess3 Code
Add 3 to each d|g|t of dec|ma| and
convert to 4b|t b|nary form
A 8CD code (not 8421 8CD)
ecimaI Binary +3 Excess-3
0 0000 0011 0011
1 0001 0011 0100
2 0010 0011 0101
3 0011 0011 0110
4 0100 0011 0111
5 0101 0011 1000
6 0110 0011 1001
7 0111 0011 1010
8 1000 0011 1011
9 1001 0011 1100
ecimaI 3 5 9
SampIe ProbIem:
Excess-3 0110 1000 1100
"&IZ
1. To form an excess-3 coded
number, decimaI 3 is added to
the decimaI number and this is
converted to its 4-bit binary
code. (True or FaIse)
True
2. The excess-3 BC number 1010
0100 equaIs __________ in decimaI. 71
3. The decimaI number 428 equaIs
what excess-3 number. 0111 0101 1011
1he Gray Code
1he Gray code's most |mportant
character|st|c |s that on|y one
d|g|t changes as you |ncrement
or decrement the count
1he Gray code |s common|y
assoc|ated w|th |nput]output
dev|ces such as an opt|ca|
encoder of a shaft's angu|ar
pos|t|on
1he Gray code |s NC1 a 8CD
code
Decimal Gray code
0 00000
1 00001
2 00011
3 00010
4 00110
5 00111
6 00101
7 00100
8 01100
9 01101
10 01111
11 01110
12 01010
13 01011
14 01001
15 01000
16 11000
"&IZ
1. The Gray code is not a type of
BC code. (True or FaIse)
2. The most important
characteristic of the
____________ (BC, Gray code)
is that onIy one digit changes
state as you increment or
decrement the count.
3. The Gray code is commonIy
associated with input/output
devices such as an opticaI
encoder of a shaft's anguIar
position. (True or FaIse)
True
Gray code
True
1he ASCII Code
ASCII |s an acronym for Amer|can Standard
Code for Informat|on Interchange
kepresents numbers |etters punctuat|on
marks and contro| characters
Standard ASCII |s a 7b|t code (127 characters)
Lxtended ASCII (I8M ASCII) an 8b|t code |s
a|so very popu|ar
Lxtended ASCII adds graph|cs and math
symbo|s to code (tota| of 2S6 symbo|s)
"&IZ
1. A common 7-bit code used to
represent numbers, Ietters,
punctuation marks, and controI
characters is known by the
acronym __________.
2. The acronym ASCII stands for
__________________________.
3. Extended ASCII code is a(n)
__________ (8-bit, 10-bit)
code which adds graphic
and math symboIs to ASCII
for a totaI of 256 symboIs.
ASCII
American Standard
Code for
Information
Interchange
8-bit
EIectronic Encoder - ecimaI to BC
0
Decimal
to
BCD
Encoder
BCD output
Decimal input
0 0 0 0
S
0 1 0 1
7
0 1 1 1
3
0 0 1 1
Encoders are avaiIabIe in IC form.
This encoder transIates from
decimaI input to BC output.
Seven Segment D|sp|ays
C (Iiquid crystaI dispIay)
CommonIy dark characters on a siIvery background
Very Iow power consumption
Viewing onIy OK in good Iight
BackIighted dispIays can be viewed in Iow Iight
E (Iight emitting diode) dispIay
High power consumption
Viewing best under Iow Iight conditions
CommonIy red but avaiIabIe in other coIors
VF (vacuum fIuorescent) dispIay
CommonIy bIue-green dispIay (without fiIters)
Medium power consumption
Viewing good from dark to Iighter conditions
Based on vacuum tube triode technoIogy
"&IZ
1. The type of 7-segment dispIay based on vacuum tube
technoIogy which usuaIIy has bIue-green characters and can
be viewed in dark to Iighter conditions is the vacuum
fIuorescent dispIay (VF). (True or FaIse)
2. The type of 7-segment dispIay that shows dark characters on
a siIvery background, uses very IittIe power, and is good for
viewing in bright Iight is caIIed the Iiquid crystaI dispIay
(C). (True or FaIse)
3. The seven-segment E dispIay is best viewed in very bright
sunIight. (True or FaIse)
True
True
FaIse
7-Segment E ispIay Operation
imiting resistors
7segment ED display
(common anode)
H
b
c
H
H
H
H
+Sv
..

nputs
7segment code
Common anode
Cathode terminals (a thru g)
b S c inputs active
therefore
segments b S c
light on display
Note that inputs are
active"
7segment display
reads decimal 1
(segments b S c
are lit)
.
b
c
H
H
H
H
+Sv
a
g
nputs
7segment code
" #1- What will be the decimal output on the 7-segment LED display?
" #2- What is the decimaI output on the dispIay for the new set of inputs?
.
H
c
d
H
f

.
b
c
d
e
f

" #3- What is the decimaI output on the dispIay for the new set of inputs? " #4- What is the decimaI output on the dispIay for the new set of inputs?
H
b
c
H
H
f
g
"&IZ
BC-to-
7-Segment
ecoder/
river
ecoders: BC to
7-Segment ecoder/river
BCD input
0 0 0 0 0 0 0 0
Decimal output
ED
0 0 0 1 0 0 0 1 0 0 1 0 0 0 1 0 0 0 1 1 0 0 1 1 0 1 0 0 0 1 0 0
EIectronic decoders are avaiIabIe in IC form.
This decoder transIates from BC to decimaI.
ecimaIs are shown on an 7-segment E dispIay
This IC aIso drives the 7-segment E dispIay.
BC-to-
7-Segment
ecoder/
river
BC input
ecimaI output
0 0 1 1

$ #1 hat is the decimal output from the decoder that


appears on the 7segment display?
Answer: 3
$ #2 hat is the decimal output from the decoder that
appears on the 7segment display?
0 0 0 0
Answer: 0
$ #3 hat is the decimal output from the decoder that
appears on the 7segment display?
1 0 0 1
Answer: 3
$ #4 hat is the decimal output from the decoder that
appears on the 7segment display?
Answer: 7
0 1 1 1
$ #S hat is the decimal output from the decoder that
appears on the 7segment display?
Answer: 6
0 1 1 0
"&
L|qu|d Crysta| D|sp|ays
LCDs contro| ava||ab|e ||ght (do not generate ||ght)
Nemat|c f|u|d (a|so ca||ed ||qu|d crysta| f|u|d) |s sandw|ched
between two g|ass p|ates
Monochrome tw|stednemat|c f|e|deffect LCDs d|sp|ay dark
f|gures on a s||very background
LCDs are common|y used on watches ca|cu|ators and
|aptops LCD mon|tors and 1Vs are becom|ng common
Co|or LCDs use e|ther pass|vematr|x or act|vematr|x
techno|ogy
Act|vematr|x co|or LCD screens are more expens|ve
Act|vematr|x co|or LCD screens use th|nf||m trans|stors (1I1)
and red green b|ue and wh|te f||ters
Most |aptop screens are back||ghted for br|ghtness
100 Hz
out-of-phase signaI
activates segment
MetaIized segments
iquid crystaI
MetaIized Iayer
GIass backpIane
PoIarizer
Contacts
iquid CrystaI ispIay
PoIarizer
Conductive
pattern on gIass
"&IZ
1. WhiIe VF and E dispIays emit Iight, Cs
__________ (controI avaiIabIe, subIimate red) Iight.
2. The nematic fIuid sandwiched between the gIass pIates
of a C is aIso caIIed _______ _______ (green
phosphor, Iiquid crystaI).
3. Monochrome twisted-nematic fieId-effect Cs dispIay
__________ (dark, white) figures on a siIvery
background.
4. iquid crystaI dispIays are difficuIt to read under Iow
Iight conditions however most Iaptop computer fIat
screens are backIighted to add brightness. (True or
FaIse)
controI avaiIabIe
Iiquid crystaI
dark
True
a
b
c
d
e
f
g
Common Phase
100 Hz CIock
C
driver
The C segments
with out-of-phase signaIs
are active
(a, b, & c are active)
riving an C ispIay
D nput
0 1 1 1
"&IZ
"#1: What is the output on the C dispIay?
100 Hz CIock
?
D nput
A
B
C
D
E
F
G
C
river
C
Common
ANS: 2
"#2: What is the output on the C dispIay?
ANS: 0
"#3: What is the output on the C dispIay?
ANS: 5
8lnary oded ueclmal (8u)
Would lL be easy for you lf you can replace a
declmal number wlLh an lndlvldual blnary
code?
Such as 00011001 19
10
1he 8421 code ls a Lype of 8u Lo do LhaL
8u code provldes an excellenL lnLerface Lo
blnary sysLems
keypad lnpuLs
ulglLal readouLs
8lnary oded ueclmal
ex1 decLo8u
(a) 33
(b) 98
(c) 170
(d) 2469
ex2 8uLodec
(a) 10000110
(b) 001101010001
(c) 1001010001110000
Decimal Decimal
Digit Digit
0 0 1 1 2 2 4 4 5 5 6 6 7 7 8 8 9 9
D D 0000 0000 0001 0001 0010 0010 0011 0011 0100 0100 0101 0101 0110 0110 0111 0111 1000 1000 1001 1001
et's crack these.
Note: 1010, 1011, 1100, 1101, 1110, and 1111 are INVAI COE!
8u AddlLlon
8u ls a numerlcal code and can be used ln
arlLhmeLlc operaLlons Pere ls how Lo add Lwo 8u
numbers
Add Lhe Lwo 8u numbers uslng Lhe rules for baslc blnary
addlLlon
f a 4blL sum ls equal Lo or less Lhan 9 lL ls a valld 8u
number
f a 4blL sum 9 or lf a carry ouL of Lhe 4blL group ls
generaLed lL ls an lnvalld resulL Add 6 (0110) Lo a 4blL sum
ln order Lo sklp Lhe slx Lhe lnvalld sLaLes and reLurn Lhe
code Lo 8421 f a carry resulLs when 6 ls added slmply add
Lhe carry Lo Lhe nexL 4blL group
8u AddlLlon
1ry Lhese
ex Add Lhe followlng numbers
(a) 0011+0100
(b) 00100011 + 00010101
(c) 10000110 + 00010011
(d) 010001010000 + 010000010111
(e) 1001 + 0100
(f) 1001 + 1001
(g) 00010110 + 00010101
(h) 01100111 + 01010011
1he Cray ode
1he Cray code ls unwelghLed and ls noL an
arlLhmeLlc code
1here are no speclflc welghLs asslgned Lo Lhe blL
poslLlons
mporLanL Lhe Cray code exhlblLs only a slngle
blL change from one code word Lo Lhe nexL ln
sequence
1hls properLy ls lmporLanL ln many appllcaLlons
such as shafL poslLlon encoders
1he Cray ode
Decimal Decimal Binary Binary Gray Code Gray Code
00 0000 0000 0000 0000
11 0001 0001 0001 0001
22 0010 0010 0011 0011
33 0011 0011 0010 0010
44 0100 0100 0110 0110
55 0101 0101 0111 0111
66 0110 0110 0101 0101
0111 0111 0100 0100
Decimal Decimal Binary Binary Gray Code Gray Code
88 1000 1000 1100 1100
99 1001 1001 1101 1101
10 10 1010 1010 1111 1111
11 11 1011 1011 1110 1110
12 12 1100 1100 1010 1010
13 13 1101 1101 1011 1011
14 14 1110 1110 1001 1001
15 15 1111 1111 1000 1000
1he Cray ode
8lnaryLoCray code converslon
1he MS8 ln Lhe Cray code ls Lhe same as
correspondlng MS8 ln Lhe blnary number
Colng from lefL Lo rlghL add each ad[acenL palr of
blnary code blLs Lo geL Lhe nexL Cray code blL
ulscard carrles
ex converL 10110
2
to Gray code
1 + 0 + 1 + 1 + 0 binary
1 1 1 0 1 Gray
1he Cray ode
CrayLo8lnary onverslon
1he MS8 ln Lhe blnary code ls Lhe same as Lhe
correspondlng blL ln Lhe Cray code
Add each blnary code blL generaLed Lo Lhe Cray
code blL ln Lhe nexL ad[acenL poslLlon ulscard
carrles
ex converL Lhe Cray code word 11011 to binary
1 1 0 1 1 Gray
+ + + +
1 0 0 1 0 inary
1he Cray ode AppllcaLlon
http://www.mipraso.de/enzyklopa
edie/g/gray-code-scheibe.gif
http://www.engr.colostate.ed
u/~dga/mechatronics/figures/
9-11.gif
it 0
it 1
it 2
it
Alphanumerlc odes
epresenL numbers and alphabeLlc characLers
Also represenL oLher characLers such as symbols
and varlous lnsLrucLlons necessary for conveylng
lnformaLlon
1he AS ls Lhe mosL common alphanumerlc
code
AS Amerlcan SLandard ode for nformaLlon
nLerchange
AS
AS has 128 characLers and symbols
represenLed by a 7blL blnary code
L can be consldered an 8blL code wlLh Lhe MS8
always 0 (00h7lh)
00h1lh (Lhe flrsL 32) conLrol characLers
20h7lh graphlcs symbols (can be prlnLed or
dlsplayed)
AS
1able
http://ascii-table.com/img/table.gif
xLended AS
1here are an addlLlonal 128 characLers LhaL
were adopLed by 8M for use ln Lhelr 9s L's
popular and ls used ln appllcaLlons oLher Lhan
9s unofflclal sLandard
1he exLended AS characLers are represenLed by
an 8blL code serles from 80hllh
xLended AS
1able
http://ascii-table.com/img/table-pc.gif

Potrebbero piacerti anche