
10 Assembly Language Programming for the 68000 Family
or hexadecimal
55P2
- 4A63
0B8F
Hand calculations involving multiplication or division are rarely per
formed by programmers. However, conventional hand methods can be
used. The basic principles we used for addition and subtraction are ap
plied. Although I will not explain multiplication or division, those readers
who desire can try some examples and verify their results by convert
ing to decimal and repeating the multiplication or division in the decimal
number base.
Bits, Bytes, Words and Longwords
So far in our discussion of numbers we have not indicated how large
our numbers can be. If you want to write down a very large number on
paper, the size of the number is only limited by the size of the paper.
This is not the case for computers. Internally the computer must represent
numbers by electrical signals. These signals represent the binary values
0 and 1. The maximum size of a number inside the computer is limited
to the number of binary digits, or bits, used to represent the number.
Theoretically we could use all the bits inside the computer to represent a
single number. This, of course, is not practical. Internally it is convenient
to limit the number of bits used for each number.
Many computers are organized around groups of eight bits, called
bytes. The size of memory on many computers is measured in bytes.
We might say a computer has 64 thousand bytes of memory. This is
equivalent to 512 thousand bits. Modem computers often have memory
sizes in the millions of bytes. A megabyte (MB) is equal to approximately
one million bytes. As we will discuss shortly, a single byte is normally used
to represent a single character of textual information. If we have a 2 MB
memory, we can store 2 million characters of information. If we assume
approximately 60 characters per line of printed material, and 50 lines per
page, this is equivalent to over 650 pages.
Bytes can be grouped together. For most computers, including the
68000 family, two bytes grouped together form a word. A word is there
fore equal to 16 bits. This is also equivalent to four hexadecimal digits.
We can also have longwords, made up of four bytes or 32 bits. Larger
groupings are possible but are not normally handled as a single value ex
cept by much larger computers. We will be dealing primarily with bytes,
words, and longwords in 68000 assembly language programming.
Kommentare zu diesen Handbüchern