STAR LASERPRINTER 8SOFTWARE
Binary and hexadecimal arithmetic
If you alreadyknow what hexadecimalnumbers are, you can skip this
sectionandgo ahead to readaboutASCII.
Thedecimal numbersystemwith whichwe’re all familiaris apositional
countingsystem. There’s the “ones” position, the “tens” position, the
“hundreds”positionandsoon.Each higherpositionisworthtcntimesmore
thanthepositionto therightof it, sincethedecimalsystemusesthe baseof
ten.Moreover,weneed tensymbolsto showthe actualvaluesthat maybe
ineach position.
Thebinarysystemispositionaltoo.There’sthe“ones”position,the“twos”
position,the“fours”position,the“eights”positionandsoon.Inbinaryeach
positionisworthonlytwicethatofthepositiontoitsright.And weonlyneed
twosymbols-O (zero)and1(one)-to showthevaluesthatmaybe inany
position.Soin binarywe get numbersthatlooklike 1010or 10001100.
Thehexadecimalsystemismadeof base-sixteennumbers.Hexadecimalis
positionalliketheothercountingsystems.Andeachhigherpositionisworth
sixteentimesas muchas the positiontoits right.
We need sixteendifferent symbolsto show all the possible valuesone
hexadecimaldigit could have. We can use our decimal system’s ten
symbols,butwe’vehad to borrowafewmore fromour alphabetto get all
thesymbolsweneed.Inhexadecimal,therefore,youcanhaveanumberthat
lookslike2C7C, oreven FACE.
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