You are on page 1of 26

University of Mosul

College of Engineering
Department of Electrical Engineering

Microprocessors
3rd Power & Machine
Yazen Subhi

1
Lecture Out Line

• Numerical Systems
• 8086/8088 Microprocessor.
• Software Model of 8086/8088.
• Memory Address Space and Data Organization.

2
Numerical Systems

• Decimal (Base 10)


• Octal (Base 8)
• Binary (Base 2)
• Hexadecimal (Base 16)

3
✓ Decimal (Base 10) Base
0-9
10
Counts 689
2
4 1
3
7
50

Weight 10000 1000 100 10 1


Digits 7 1
0 1
0
5 01 901 == =
1X1=1
= 1X10=10
1X100=100
7X10000=70000
1X10000=10000
1X1000=1000
✓ Octal (Base 8) Base
0-7
8 Counts 27
4
61
3
50

Weight 4096 512 64 8 1


Digits 7 1
0 1
0
5 01 301 = 1X8=8
1X64=64
1X1=1
==1X4096=4096
1X512=512
= 7X4096=28672

= 7X4096+0X512+5X64+1X8+3X1=29003
70513)octal= 29003)decimal
✓ Binary (Base 2) Base
0-1
2 Counts 10

Weight 16 8 4 2 1
Digits 1 1
0 1
0 01 01 == 1X2=2
1X4=4
1X8=8
1X1=1
1X16=16

= 1X16+0X8+1X4+1X2+0X1=22
10110)binary= 22)decimal
✓ Hexadecimal (Base 16) Base
0-F
16
Counts 6D
2
4 1
3
7
9
5B
8AC
0EF

Weight 65536 4096 256 16 1


Digits 7 1
0 1
A
0 01
D F1
0 ==
= =1X1=1
1X16=16
7X 1X256=256
1X4096=4096
1X65536
65536 = 65536
=458752
= 7X 65536 +0X4096+10X256+13X16+15X1=461535

70ADF)Hex.= 461535)decimal
Conversation between Binary, Hex and Decimal

8
Microarchitecture of 88/86 MPU

• The Microarchitecture of the 8088 and 8086 are


similar.

• They both employ Parallel Processing.

9
Software Architecture of the 8088/8086 Microprocessors

Pipelined architecture of the 88/86 microprocessors


10
Pipelining – Fetch Stage
• Get Instruction From Memory
• Store In Instruction Register

FETCH DECODE EXECUTE

Instruction #1

11
Pipelining – Decode Stage
• Determine Instruction Type
• Get Necessary Data
• Setup ALU

FETCH DECODE EXECUTE

Instruction #2 Instruction #1

12
Pipelining – Execute Stage
• Perform Required Operation
• Store Result In Result Register

FETCH DECODE EXECUTE

Instruction #3 Instruction #2 Instruction #1

13
Execution and bus interface units
14
15
Arithmetic Logic Unit (ALU)
• Addition OPERAND A
• Subtraction
• Multiplication
RESULT
• Division
• Comparison
• Logic Operations

OPERAND B

16 CONTROL
17
18
19
• words of data can be stored at what are
called even-or odd – addressed word
boundaries.

• The least significant bit of the address


determines the type of word boundary. If
this bit is 0, the word is at an even –
address boundary – that is a word at an
even address boundary correspondents to
two consecutive bytes, with the least
significant byte located at an even
20
address.
• For example, the word in the fig below has
its least significant byte at address
00724H. Therefor it is stored at an even
address boundary.
• A word of data stored at an even –
address boundary, such as 00000H,
00002H, 00004H, and so on, is said to be
an aligned word. On the other hand, a
word of data stored at an odd- address
boundary, such as 00001H, 00003H, or
00005H and so on, is called a misaligned
word.
21
22
• What is the data word shown in fig
Express the result in hexadecimal form. Is
it stored at an even or add addressed
word boundary? Is it an aligned or
misaligned word of data?
• The most significant byte of the word is
stored at address 0072CH and equals
11111101=FDH
• It is least significant byte of the word is
stored at address 0072BH and equals:
10101010=AAH
23
• Together the two bytes give the word:
1111110110101010=FDAAH
• Expressing the address of the least
significant byte in binary form gives:
• 0072BH = 00000000011100101011

• Because the rightmost bit (LSB) is logic 1,


the word is stored at an odd-address
boundary in memory, therefore it is
misaligned word of data.
24
• DATA TYPES
• Integer data type. The 8088 can process
data as either unsigned or signed integer
number; each type of integer can be either
byte wide or word wide. represents
unsigned byte integer; this data type can
be represents decimal numbers in the
range 0 through 255.
• The unsigned word in integer is shown in
Fig. it can be used to represents decimal
numbers in the range 0 to 65,535.
25
• DATA TYPES
• The signed byte integer and signed word integer :
• are similar to the unsigned integer data types just
introduced, however here the most significant bit is a
sign bit. A zero in this bit position identifies a positive
number for this reason, the signed integer byte can
represent decimal numbers in the range + 127to -128.
• the signed integer word permits numbers in the range
+32,767 to -32,768, respectively. For example. The
nnmber+3 expressed as a signed integer byte is
0000001l, (03H). On the other hand, the 8088 always
expresses negative numbers in 2's-complemenlotation
Therefore. 3 is coded as 111111012, (FDH).

26

You might also like