MICprocessor Unit 1
MICprocessor Unit 1
UNIT 1
INTRODUCTION TO 80386
GUIDED BY: PROF. M. S. SHELAR
• A microprocessor is a computer
processor for which the data
processing logic and control is
included on a single integrated circuit
(IC), or a small number of ICs.
• The microprocessor contains the
arithmetic, logic, and control circuitry
required to perform the functions of a
computer's central processing unit
(CPU).
• Block diagram of microprocessor is as
shown
2. HISTORY OF MICROPROCESSOR
• Many more microprocessors are part of embedded
systems, providing digital control over myriad objects
from appliances to automobiles to cellular
phones and industrial process control.
• Microprocessors perform binary operations based
on Boolean logic, named after George Boole. The PICO1/GI250 chip introduced in 1971: It was designed by
Pico Electronics (Glenrothes, Scotland) and manufactured by
• The ability to operate computer systems using General Instrument of Hicksville NY.
THE FIRST KNOWN ADVERTISEMENT FOR THE 4004 IS DATED NOVEMBER 15,
1971.
Pentium III 1999 32-bit 64GB 370 PGA 600-1.3 MHz Improved version of
Pentium II; 70 new
SIMD instructions
•PGA - Pin Grid Array
Instruction Set - The group of commands that the microprocessor can understand is called
Instruction set. It is an interface between hardware and software.
Bus - Set of conductors intended to transmit data, address or control information to different
elements in a microprocessor. A microprocessor will have three types of buses, i.e., data bus,
address bus, and control bus.
IPC (Instructions Per Cycle) - It is a measure of how many instructions a CPU is capable of
executing in a single clock.
Clock Speed - It is the number of operations per second the processor can perform. It can be
expressed in megahertz (MHz) or gigahertz (GHz). It is also called the Clock Rate.
Data Types - The microprocessor supports multiple data type formats like binary, ASCII, signed
and unsigned numbers.
Working of Microprocessor:
• The microprocessor follows a sequence to execute the instruction: Fetch, Decode,
and then Execute.
• Initially, the instructions are stored in the storage memory of the computer in
sequential order.
• The microprocessor fetches those instructions from the stored area (memory), then
decodes it and executes those instructions till STOP instruction is met.
• Then, it sends the result in binary form to the output port. Between these
processes, the register stores the temporary data and ALU (Arithmetic and Logic
Unit) performs the computing functions.
MICROPROCESSOR 5). LOW POWER CONSUMPTION - MICROPROCESSORS
ARE USING METAL OXIDE SEMICONDUCTOR
TECHNOLOGY,.
1). LOW COST - DUE TO INTEGRATED CIRCUIT
TECHNOLOGY 6). LESS HEAT GENERATION - MICROPROCESSORS
MICROPROCESSORS ARE AVAILABLE AT VERY LOW USES SEMICONDUCTOR TECHNOLOGY WHICH WILL NOT
COST. IT WILL REDUCE THE COST OF A COMPUTER EMIT MUCH HEAT AS COMPARED TO VACUUM TUBE
SYSTEM. DEVICES.
2). HIGH SPEED - DUE TO THE TECHNOLOGY INVOLVED 7). RELIABLE - SINCE MICROPROCESSORS USE
IN IT, THE MICROPROCESSOR CAN WORK AT VERY HIGH SEMICONDUCTOR TECHNOLOGY, THEREFORE, THE
SPEED. IT CAN EXECUTE MILLIONS OF INSTRUCTIONS FAILURE RATE IS VERY LESS. HENCE IT IS VERY
PER SECOND. RELIABLE.
3).SMALL SIZE - A MICROPROCESSOR IS FABRICATED IN 8). PORTABLE - DUE TO THE SMALL SIZE AND LOW
A VERY LESS FOOTPRINT DUE TO VERY LARGE SCALE. POWER CONSUMPTION MICROPROCESSORS ARE
PORTABLE.
OPERATING MODES OF 80386
MICROPROCESSORS
The Intel 80386 microprocessor, often known as the i386, was a popular x86-based microprocessor.
Its capacity to run in numerous modes, which allowed varied levels of memory management and protection, as
well as backward compatibility with previous processors one of its primary characteristics.
1) Real Mode
2) Protected Mode
3) Virtual 8086 Modes
4) System Management Mode
• When the 80386 is turned on for the first time, the Real
mode is its default operating mode.
• Software created for the 8086 and 8088 processors will
work on the 80386 without needing to be modified
because it is fully backward-compatible with these older
CPUs.
• The 80386 has a 20-bit address space in Real mode,
giving it access to 1MB of memory.
• The memory is separated into 64K segments, and a
16-bit segment register can be used to access each
section.
• The processor uses segment-based memory
addressing while operating in this mode and is not
given access to sophisticated memory management
and security functions.
• Real mode likewise has a constrained set of
instructions and does not support protected or virtual
memory.
2). Protected Mode:
Below mentioned are the arithmetic instructions that are in the 80386 Micro-Processor.
The 80386 chip offers help for drifting point math tasks, which are utilized for working with numbers that
have a fragmentary part. The FADD, FSUB, FMUL, FDIV, FCOM, FCOMP, and FLD guidelines are
utilized for drifting point number-crunching activities.
The 80386 chip gives extra guidelines to broadened expansion and deduction activities. The ADC and
SBB guidelines are utilized for adding or taking away qualities alongside the convey or acquire banners.
These guidelines are helpful in performing number-crunching procedures on multi-accuracy numbers.
3. Extended Multiplication and Division
• The 80386 chip gives extra Instructions to broadened augmentation and division tasks.
• The IMUL guidance is utilized for marked augmentation, while the MUL guidance is utilized for unsigned
increases. Also, the IDIV guidance is utilized for marked division, and the DIV guidance is utilized for
unsigned division.
• The 80386 chip gives Instructions to bit field control, which permits individual pieces or gatherings of pieces
to be removed, adjusted, or joined.
• The BT, BTC, BTR, BTS, and SETcc Instructions are utilized for bit field control.
5. String Instructions
• The 80386 chip gives Instructions to string control, which can be utilized for procedures on varieties of
bytes or words.
• The MOVSB, MOVSW, CMPSB, CMPSW, STOSB, and STOSW Instructions are utilized for string
activities.
6. Bit Sweep Instructions
• The 80386 microchip gives Instructions to bit check tasks, which are utilized for tracking down the place of the
first or last set piece in a word or double word.
• The BSF and BSR guidelines are utilized for digit filter activities.
• The 80386 chip offers help for decimal math tasks, which are utilized for working with numbers in decimal
configuration.
• The DAA, DAS, AAA, and AAS guidelines are utilized for decimal number juggling activities.
• The 80386 chip offers help for SIMD activities, which permit numerous information things to be handled at the
same time.
• These guidelines have extraordinarily extended the abilities of microchips and have made them more flexible
and proficient.
Instruction type Description
•MOV − Used to copy the byte or word from the provided source to
the provided destination.
•POP − Used to get a word from the top of the stack to the
provided location.
•LEA − Used to load the address of operand into the provided register.
•LDS − Used to load DS register and other provided register from the memory
•LES − Used to load ES register and other provided register from the memory.
Instructions to transfer flag registers
•LAHF − Used to load AH with the low byte of the
flag register.
•SAHF − Used to store AH register to low byte of
the flag register.
•PUSHF − Used to copy the flag register at the top
of the stack.
•POPF − Used to copy a word at the top of the
stack to the flag register.
Instructions to perform addition
•ADD − Used to add the provided byte to
byte/word to word.
•ADC − Used to add with carry.
•INC − Used to increment the provided byte/word
by 1.
•AAA − Used to adjust ASCII after addition.
•DAA − Used to adjust the decimal after the
addition/subtraction operation.
Instructions to perform subtraction
•SUB − Used to subtract the byte from byte/word
from word.
•SBB − Used to perform subtraction with borrow.
•DEC − Used to decrement the provided byte/word
by 1.
•NPG − Used to negate each bit of the provided
byte/word and add 1/2’s complement.
•CMP − Used to compare 2 provided byte/word.
•AAS − Used to adjust ASCII codes after
subtraction.
•DAS − Used to adjust decimal after subtraction.
Instruction to perform multiplication
•MUL − Used to multiply unsigned byte by
byte/word by word.
•IMUL − Used to multiply signed byte by byte/word
by word.
•AAM − Used to adjust ASCII codes after
multiplication.
Instructions to perform division
•DIV − Used to divide the unsigned word by byte or unsigned double word by word.
•IDIV − Used to divide the signed word by byte or signed double word by word.
•CWD − Used to fill the upper word of the double word with the sign bit of the lower
word.
Instructions to perform logical operation
•AND − Used for adding each bit in a byte/word with the corresponding bit in
another byte/word.
•OR − Used to multiply each bit in a byte/word with the corresponding bit in
another byte/word.
•CALL − Used to call a procedure and save their return address to the stack.
•RET − Used to return from the procedure to the main program.
•JMP − Used to jump to the provided address to proceed to the next instruction.
Instructions to transfer the instruction during an execution with some
conditions −
These instructions are used to control the processor action by setting/resetting the
flag values.
Following are the instructions under this group −
•STI − Used to set the interrupt enable flag to 1, i.e., enable INTR input.
•CLI − Used to clear the interrupt enable flag to 0, i.e., disable INTR input.
Interrupt Instructions
These instructions are used to call the interrupt during program execution.
•INT − Used to interrupt the program during execution and calling service specified.