AMSTRAD CPC464 User Manual page 225

Cpc464 colour personal computer 64k
Hide thumbs Also See for CPC464:
Table of Contents

Advertisement

Here the number is based on 16, and is represented in a single character:
Decimal
0
1
2
3
Hex
0
1
2
3
The hexadecimal system can break the eight bits of a byte into two blocks of four bits, since 15 is a
four bit number: 1111 binary. The first block indicates the number of complete units of ' 15' , and the
second indicates the ' remainder' - and this is where the elegance of binary begins to emerge.
Reconsidering the table that introduced binary notation
Decimal
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
An 8-bit number 11010110 can be subdivided, and then considered as two 4-bit numbers known as
nibbles , Hex D6. Throughout this guide a hex based number will be introduced by the ' &' symbol eg
&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 program 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.
4
5
6
7
4
5
6
7
Binary
CPC464-ese
0
fl
1
*
10
*fl
11
**
100
*flfl
101
*fl*
110
**fl
111
***
1000
*flflfl
1001
*flfl*
1010
*fl*fl
1011
*fl**
1100
**flfl
1101
**fl*
1110
***fl
1111
****
10000
*flflflfl
8
9
10
11
8
9
A
B
Hexadecimal
0
1
2
3
4
5
6
7
8
9
A
B
C
D
E
F
10
12
13
14
15
C
D
E
F

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents