Microprocessor 8086 Lecture 1 by Ayad M.Kwad
Microprocessor 8086 Lecture 1 by Ayad M.Kwad
Microprocessor 8086 Lecture 1 by Ayad M.Kwad
Chapter #1
Quick Review
Al - Iraqia University
Engineering College Department of Networks engineering
The history review for processors and computers can be found in the
COA and microprocessors books, and how computers were
transfered from mechanical to electrical and finally to electronic ages.
But, in this lectures we will focus on the 8088/8086 processors and
their operations (how did they work? and how can we use them? from
view point of programmer with some electronic considerations that
make them work perfectly.)
Number Systems
Using of the microprocessor requires a specific knowledge about binary,
decimal, and hexadecimal numbering systems; and how to convert from
system to another.
Digits
Before converting numbers between bases, digits of a number system
must be understood.
First digit in any numbering system is always zero.
A decimal (base 10) number is constructed with 10 digits: 0
through 9.
A base 8 (octal) number; 8 digits: 0 through 7.
A base 2 (binary) number; 2 digits: 0 and 1.
A base 16 number contains 10 digits: 0 through 9, followed by A
through F as substitution for Numbers from 10 to 15.
Ayad M. Kwad Al-Awsi (AIU) Microprocessors 8088/8086 4 / 31
Introduction
Note that: The decimal number system does not contain a 10 digit
and the octal system number does not contain an 8 digit and so on.
Positional Notation
Once digits are understood, larger numbers are constructed using
positional notation.
Position to the left of the units position is the tens position.
left of tens is the hundreds position, and so forth.
An example is decimal number 154.
this number has 1 hundred, 5 tens, and 4 units
1 5 4
100 10 1
So, exponential powers of positions are critical for understanding
numbers in other systems.
Ayad M. Kwad Al-Awsi (AIU) Microprocessors 8088/8086 5 / 31
Introduction
Position to the left of the units position always the number base
raised to the first power.
in a decimal system, this is 101 , or 10.
binary system, it is 21 , or 2, and so forth.
11 in decimal has different value from 11 in binary .
In decimal
1 1
101 + 100 = 11 decimal
But, in binary:
1 1
21 + 20 = 3 decimal
Conversion to Decimal
To convert from any number system to decimal one, firstly, we must
determine the weights or values of each position of the number.
Then, Sum the weights to form the decimal equivalent, as example
above.
Binary-Coded Hexadecimal
1 Binary-Coded Hexadecimal (BCH) is a hexadecimal number
written, each digit is represented by a 4-bit binary number.
2 BCH code allows a binary version of a hexadecimal number to be
written in a form easily converted between BCH and hexadecimal.
3 Hexadecimal represented by converting digits to BCH code with a
space between each digit.
Example
3 A C = 0011 1010 1100
and
0111 0011 1110 . 1101 = 73E.D
Complements
At times, data are stored in complement form to represent negative
numbers. There are two systems:
1 radix-1 complement (earliest)
one’s complement fifteen’s complement
e.g. 8-bit binary number 01001100 the fifteen’s (radix -1)
is one’s (base-1) complemented to complement of a 5CD
represent it as a negative value; hexadecimal is;
1111 1111 15 15 15
– 0100 1100 –5 C D
1011 0011 A 3 2