Chapter 1
Chapter 1
Language Programming
Chapter 1
Introduction
• In general, the following points should be
emphasized before learning an Assembly Language
programming:
• a=1;
f=1;
while (a <= 5)
{
f = f * a;
a = a + 1;
}
Assembly Language
Bits
• The smallest unit of data on a binary
computer is a single bit.
• Since a single bit is capable of representing
only two different values (typically zero or
one) you may get the impression that there
are a very small number of items you can
represent with a single bit.
Nibbles
• A nibble is a collection of four bits.
• It wouldn’t be a particularly interesting data structure except for
two items: BCD (binary coded decimal) numbers and
hexadecimal numbers.
• It takes four bits to represent a single BCD or hexadecimal digit.
• With a nibble, we can represent up to 16 distinct values. In the
case of hexadecimal numbers, the values 0, 1, 2, 3, 4, 5, 6, 7, 8,
9, A, B, C, D, E, and F are represented with four bits (see The
Hexadecimal Numbering System on page 17).
• BCD uses ten different digits (0, 1, 2, 3, 4, 5, 6, 7, 8, 9) and
requires four bits.
• In fact, any sixteen distinct values can be represented with a
nibble, but hexadecimal and BCD digits are the primary items we
can represent with a single nibble.
Bytes