STAR LASERPRINTER 8 SOFTWARE
Binary and hexadecimal arithmetic
If you already know what hexadecimalnumbers are, you can skip this sectionand go aheadto read aboutASCII.
The decimalnumbersystemwith which we’re all familiaris a positional counting system. There’s the “ones” position, the “tens” position, the “hundreds”positionandsoon. Eachhigherpositionis worthtcntimesmore thanthe positionto therightof it, sincethedecimalsystemusesthe baseof ten. Moreover,we need ten symbolsto showthe actualvaluesthat maybe in each position.
The binarysystemis positionaltoo.There’sthe“ones”position,the“twos” position,the“fours”position,the“eights”positionandsoon. Inbinaryeach positionis worthonlytwicethatofthepositiontoitsright.Andweonlyneed
The hexadecimalsystemis madeof
We need sixteen different symbols to show all the possible values one hexadecimaldigit could have. We can use our decimal system’s ten symbols,but we’vehad to borrowa few more from our alphabetto get all thesymbolsweneed.Inhexadecimal,therefore,youcanhaveanumberthat lookslike 2C7C,or evenFACE.
Here’showthedecimal,binaryandhexadecimalnumbersystemscompare:
Decimal | Binary | Hexadecimal Decimal | Binary | Hexadecimal | |
o |
| o | 8 | 1(W3 | 8 |
1 | Ooo1 | 1, | 9 | 1001 | 9 |
2 | 0010 | 2 | 10 | 1010 | A |
3 | 0011 | 3 | 11 | 1o11 | B |
4 | 0100 | 4 | 12 | 1100 | c |
5 | 0101 | 5 | 13 | 1101 | D |
6 | 0110 | 6 | 14 | 1110 | E |
7 | 0111 | 7 | 15 | 1111 | F |
5