AMSTRAD cpc 6128 User Instruction page 385

Integrated computer/disc system
Hide thumbs Also See for cpc 6128:
Table of Contents

Advertisement

Reconsidering the table that introduced binary notation:
Decimal
Binary
Hexadecimal
0
0
0
1
1
1
2
10
2
3
11
3
4
100
4
5
101
5
6
110
6
7
111
7
8
1000
8
9
1001
9
10
1010
A
11
1011
B
12
1100
C
13
1101
D
14
1110
E
15
1111
F
16
10000
10
An 8-bit number 11010110 (&D6 hex) can be subdivided, and then considered as two
4-bit numbers (known as nibbles). Throughout this manual, a hex based number is
introduced by the '&' symbol e.g. &D6, and this is the number base most commonly
used by programmers using assembly language techniques. An assembly language
program is the nearest most programmers get to programming directly in machine
code, since the assembly language program allows the programmer to use simple
letter 'mnemonics' to specify the actual machine code 'numbers'.
When using hex, you must first work out the value of the first digit to obtain the
number of 16's in the final number, and then add the remainder designated by the
second 'half of the hex notation to obtain the total decimal equivalent. There's a
powerful temptation to regard a number like &D6 as 13+6, or 136, but it's
(13x16)+(6)
=
214.
It's the same process you use when you read a decimal number (also known as a
Denary number) such as '89' - i.e. (8x10)+(9). It just happens that multiplying by ten
is a great deal simpler, unless you've had a lot of practice at multiplying by 16.
Chapter 9 Page 12
At your leisure ....

Advertisement

Table of Contents
loading

Table of Contents