Laser Printer Applications Manual

STAR LASERPRINTER 8 SOFTWARE
Binary and hexadecimal arithmetic
If you alreadyknow what hexadecimalnumbers are, you can skip this
sectionand go aheadto readaboutASCII.
The decimalnumbersystemwith whichwe’reall familiaris a positional
counting system. There’s the
“ones” position, the “tens” position,the
“hundreds”positionandsoon.Eachhigherpositionisworthtcntimesmore
thanthepositionto therightofit, sincethedecimalsystemusesthebaseof
ten.Moreover,weneedtensymbolsto showthe actualvaluesthatmaybe
in eachposition.
Thebinarysystemispositionaltoo.There’sthe“ones”position,the“twos”
position,the“fours”position,the“eights”positionandsoon.Inbinaryeach
positionisworthonlytwicethatofthepositiontoitsright.Andweonlyneed
twosymbols-O (zero)and 1(one)-to showthevaluesthatmaybe inany
position.So inbinarywe getnumbersthatlooklike 1010or 10001100.
Thehexadecimalsystemis madeofbase-sixteennumbers.Hexadecimalis
positionalliketheothercountingsystems.Andeachhigherpositionisworth
sixteentimesas muchas the positionto its right.
We need sixteendifferentsymbolsto show all the possiblevalues one
hexadecimaldigit could have. We can use our decimal system’s ten
symbols,butwe’vehadto borrowa fewmorefromour alphabetto get all
thesymbolsweneed.Inhexadecimal,therefore,youcanhaveanumberthat
lookslike 2C7C,or evenFACE.
Here’showthedecimal,binaryandhexadecimalnumbersystemscompare:
Decimal
o
1
2
3
4
5
6
7
Binary
Ooo1
0010
0011
0100
0101
0110
0111
Hexadecimal
o
1,
2
3
4
5
6
7
Decimal
8
9
10
11
12
13
14
15
Binary
1(W3
1001
1010
1o11
1100
1101
1110
1111
Hexadecimal
8
9
A
B
c
D
E
F
5