0% found this document useful (0 votes)
16 views43 pages

A Microprocessor 1.0

Uploaded by

michellekenny079
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views43 pages

A Microprocessor 1.0

Uploaded by

michellekenny079
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 43

CHAPTER ONE

INTRODUCTION

1.0 BACKGROUND OF THE STUDY

A Microprocessor is also called the Computer Central Processing Unit (CPU). It

incorporates the functions of a computer’s central processing unit (CPU) on a single

integrated chip (IC, or microchip). It is a multipurpose, programmable, clock-driven,

register-based electronic device that accepts digital data as input, processes it according

to instructions stored in its memory and provides results as output.

TYPES OF MCROPOCESSOR

Microprocessor is of two types: PIN GRID ARRAY (PGA) type and LAND GRID

ARRAY (LGA) type. Majorly there are two companies that manufacture a computer

microprocessor: INTEL and ADVANCED MICRO DEVICES (AMD).

FIG 1.0 MICROPROCESSOR

1
1.1 PROBLEM STATEMENT:

Reason why microprocessor works in binary and the causes and effect of overheating of a

microprocessor.

1.2 OBJECTIVE OF THE STUDY:

The objective of this study is to explain and show:

i. Computer architecture

ii. Microprocessor structure and design

iii. Microprocessor programming and operation

iv. Microprocessor based interfacing

1.3 SIGNIFICANCE OF THE STUDY:

Since computer microprocessor is shown to be the heart of a computer, this study will

explain how information is being processed on the microprocessor (data fetching, data

decoding, data execution and data writing) and it will also show the development of a

microprocessor, how It works in binary and the basic components that are in the

microprocessor.

1.4 THE METHODOLOGY OF THE STUDY:

In order for a CPU to accomplish meaningful work, it must have two inputs: instructions

and data. Instructions tell the CPU what actions need to be performed on the data. Each

machine instruction is composed of two parts: the op-code and the operand. According

to Brookshear [1997], "the bit pattern appearing in the op-code field indicates which of

the elementary operations, such as STORE or JUMP, is requested by the instruction. The

bit patterns found in the operand field provide more detailed information about the

2
operation specified by the op-code. For example, in the case of a STORE operation, the

information in the operand field indicates which register contains the data to be stored

and which memory cell is to receive the data."

1.5 DEFINITIONSOF TERMS

INTEGRATED CHIP: this is a tiny complex of electronic components contained on a

thin chip or wafer of semiconducting material.

REGISTER: a memory location in a microprocessor that has a particular storage

capacity, is usually intended for a particular purpose and is accessible at very high speeds

INTERFACE: a common boundary shared by two devices across which data or

information flows

DATA: information for a computer to process

3
CHAPTER TWO

LITERATURE REVIEW

2.0 INTRODUCTION

From previous chapter we have seen that a microprocessor is an integrated circuit that

does the work of data processing in the computer. Since a microprocessor is an IC, this

chapter will explain more on the history of integrated chip, its design, why program run

on it. This also contains the history of microprocessor, components of a CPU and causes

and effect of overheating in microprocessor.

2.1 HISTORY OF INTEGRATED CHIP

Integrated Circuit, tiny electronic circuit used to perform a specific electronic function,

such as amplification; it is usually combined with other components to form a more

complex system. It is formed as a single unit by diffusing impurities into single-crystal

silicon, which then serves as a semiconductor material, or by etching the silicon by means

of electron beams. Several hundred identical integrated circuits (ICs) are made at a time

on a thin wafer several centimeters wide, and the wafer is subsequently sliced into

individual ICs called chips. In large-scale integration (LSI), as many as 5000 circuit

elements, such as resistors and transistors, are combined in a square of silicon measuring

about 1.3 cm (.5 in) on a side. Hundreds of these integrated circuits can be arrayed on a

silicon wafer 8 to 15 cm (3 to 6 in) in diameter. Larger-scale integration can produce a

silicon chip with millions of circuit elements. Individual circuit elements on a chip are

interconnected by thin metal or semiconductor films, which are insulated from the rest of

the circuit by thin dielectric layers. Chips are assembled into packages containing

external electrical leads to facilitate insertion into printed circuit boards for

4
interconnection with other circuits or components. During recent years, the functional

capability of ICs has steadily increased, and the cost of the functions they perform has

steadily decreased. This has produced revolutionary changes in electronic equipment—

vastly increased functional capability and reliability combined with great reductions in

size, physical complexity, and power consumption. Computer technology, in particular,

has benefited greatly. The logic and arithmetic functions of a small computer can now be

performed on a single VLSI chip called a microprocessor, and the complete logic,

arithmetic, and memory functions of a small computer can be packaged on a single

printed circuit board, or even on a single chip. Such a device is called a microcomputer.

In consumer electronics, ICs have made possible the development of many new products,

including personal calculators and computers, digital watches, and video games. They

have also been used to improve or lower the cost of many existing products, such as

appliances, televisions, radios, and high-fidelity equipment. They have been applied in

the automotive field for diagnostics and pollution control, and they are used extensively

in industry, medicine, traffic control (both air and ground), environmental monitoring,

and communications

2.2 CHIP DESIGNING

The first operation in the design of the chip, when tens of millions of transistors are to be

built on a square of silicon about the size of a child's fingernail, the placing and

interconnections of the transistors must be meticulously worked out. Each transistor must

be designed for its intended function, and groups of transistors are combined to create

circuit elements such as inverters, adders and decoders. The designer must also take into

5
account the intended purpose of the chip. A processor chip carries out instructions in a

computer, and a memory chip stores data. The two types of chips differ somewhat in

structure. Because of the complexity of today's chips, the design work is done by

computer, although engineers often print out an enlarged diagram of a chip's structure to

examine it in detail.

The Silicon Crystal is the base material for building an integrated circuit. Silicon is a

natural semiconductor, which means that it can be altered to be either an insulator or a

conductor. Insulators, such as glass, block the passage of electricity; conductors, such as

copper, let electricity pass through. To make a silicon crystal, raw silicon obtained from

quartz rock is treated with chemicals that remove contaminants until what remains is

almost 100 percent silicon. This purified silicon is melted and then formed into

cylindrical single crystals called ingots. The ingots are sliced into wafers about 0.725

millimeters(0.03inch)thick. In a step called planarization they are polished with slurry

until they have a flawless, mirror-smooth surface. At present, most of the wafers are 200

millimeters (eight inches) in diameter, but the industry is moving toward achieving a

standard diameter of 300 millimeters (12 inches) by 1999. Because a single wafer yields

hundreds of chips, bigger wafers mean that more chips can be made at one time, holding

down the cost per chip. The following show the steps involved when producing an

integrated chip.

2.2.1 THE FRIST LAYER

With the wafer prepared, the process of building the chip's circuitry begins. Making the

transistors and their interconnections entails several different basic steps that are repeated

6
many times. The first layer is silicon dioxide, which does not conduct electricity and

therefore serves as an insulator. It is created by putting the wafers into a diffusion furnace

—essentially an oven at high temperature where a thin layer of oxide is grown on the

wafer surface. Removed from the furnace, the wafer is now ready for its first patterning,

or photolithographic, step. A coating of a fairly viscous polymeric liquid called

photoresist, which becomes soluble when it is exposed to ultraviolet light, is applied to

the surface. A spigot deposits a precise amount of photoresist on the wafer surface. Then

the wafer is spun so that centrifugal force spreads the liquid over the surface at an even

thickness. This operation takes place on every layer that is modified by a

photolithographic procedure called masking, described in the next step.

2.2.2 MASKING

A mask is the device through which ultraviolet light shines to define the circuit pattern

on each layer of a chip. Because the pattern is intricate and must be positioned precisely

on the chip, the arrangement of opaque and transparent spaces on a mask must be done

carefully during a chip's design stage. The mask image is transferred to the wafer using a

computer-controlled machine known as a stepper. It has a sophisticated lens system to

reduce the pattern on the mask to the microscopic dimensions of the chip's circuitry,

requiring resolution as small as 0.25 micron. The wafer is held in place on a positioning

table below the lens system. Ultraviolet light from an arc lamp or a laser shines through

the clear spaces of the mask's intricate pattern onto the photoresist layer of a single chip.

The stepper table then moves the wafer the precise distance required to position another

chip under the light. On each chip, the parts of the photoresist layer that were struck by

7
the light become soluble and can be developed, much like photographic film, using

organic solvents. Once the photoresist is patterned, the wafer is ready for etching.

2.2.3 ETCHING

During this step, photoresist remaining on the surface protects parts of the underlying

layer from being removed by the acids or reactive gases used to etch the pattern on the

surface of the wafer. After etching is complete, the protective layer of photoresist is

removed to reveal electrically conducting or electrically insulating segments in the

pattern determined by the mask. Each additional layer put on the chip has a distinctive

pattern of this kind.

2.2.4 ADDING LAYER

Further masking and etching steps deposit patterns of additional materials on the chip.

These materials include polysilicon as well as various oxides and metal conductors such

as aluminum and tungsten. To prevent the formation of undesired compounds during

subsequent steps, other materials known as diffusion barriers can also be added. On each

layer of material, masking and etching create a unique pattern of conducting and

nonconducting areas. Together these patterns aligned on top of one another form the

chip's circuitry in a three-dimensional structure. But the circuitry needs fine-tuning to

work properly. The tuning is provided by doping.

8
2.2.5 DOPING

This deliberately adds chemical impurities, such as boron or arsenic, to parts of the

silicon wafer to alter the way the silicon in each doped area conducts electricity.

Machines called ion implanters are often used to inject these impurities into the chip.

In electrical terms, silicon can be either n-type or p-type, depending on the impurity

added. The atoms in the doping material in n-type silicon have an extra electron that is

free to move. Some of the doping atoms in p-type silicon are short an electron and so

constitute what is called a hole. Where the two types adjoin, the extra electrons can flow

from the n-type to the p-type to fill the holes. This flow of electrons does not continue

indefinitely. Eventually the positively charged ions left behind on the n-type side and the

negatively charged ions on the p-type side together create an electrical force that prevents

any further net flow of electrons from the n-type to the p-type region. The material at the

base of the chip is p-type silicon. One of the etching steps in the manufacture of a chip

removes parts of the polysilicon and silicon dioxide layers put on the pure silicon base

earlier, thus laying bare two strips of p-type silicon. Separating them is a strip that still

bears its layer of conducting polysilicon; it is the transistor's 'gate.' The doping material

now applied to the two strips of p-type silicon transforms them into n-type silicon. A

positive charge applied to the gate attracts electrons below the gate in the transistor's

silicon base. These electrons create a channel between one n-type strip (the source) and

the other (the drain). If a positive voltage is applied to the drain, current will flow from

source to drain. In this mode, the transistor is 'on.' A negative charge at the gate depletes

the channel of electrons, thereby preventing the flow of current between source and drain.

9
Now the transistor is 'off.' It is by means of switching on and off that a transistor

represents the arrays of 1 and 0 that constitute the binary code, the language of

computers. Done many times in many layers, these operations provide the chip with its

multitude of transistors. But just as provision must be made to run electrical wires and

plumbing pipes between floors of a building, provision must be made in chips for

interconnecting the transistors so they form an integrated circuit

2.2.6 INTERCONNECTIONS

This final step begins with further masking and etching operations that open a thin layer

of electrical contacts between layers of the chip. Then aluminum is deposited and

patterned using photolithography to create a form of wiring that links all the chip's

transistors. Aluminum is chosen for this application because it makes good electrical

contact with silicon and also bonds well to silicon dioxide. This step completes the

processing of the wafer. Now the individual chips are tested to ensure that all their

electrical connections work using tiny electrical probes. Next, a machine called a dicer

cuts up the wafer into individual chips, and the good chips are separated from the bad.

The good chips—usually most of the wafer's crop—are mounted onto packaging units

with metal leads. Wire bonders then attach these metal leads to the chips. The electrical

contacts between the chip's surface and the leads are made with tiny gold or aluminum

wires about 0.025 millimeter (0.001 inch) in diameter. Once the packaging process is

complete, the finished chips are sent to do their digital work.

10
FIG2.0 INTEGRATED CIRCUIT

2.3 HISTORY OF A MICROPROCESSOR

In the first computers, CPUs were made of vacuum tubes and electric relays rather than

microscopic transistors on computer chips. These early computers were immense and

needed a great deal of power compared to today’s microprocessor-driven computers. The

first general purpose electronic computer, the ENIAC (Electronic Numerical Integrator

and Computer), was introduced in 1946 and filled a large room. About 18,000 vacuum

tubes were used to build ENIAC’s CPU and input/output circuits. Between 1946 and

1956 all computers had bulky CPUs that consumed massive amounts of energy and

needed continual maintenance, because the vacuum tubes burned out frequently and had

to be replaced. A solution to the problems posed by vacuum tubes came in 1948, when

American physicists John Bardeen, Walter Brattain, and William Shockley first

demonstrated a revolutionary new electronic switching and amplifying device called the

transistor. The transistor had the potential to work faster and more reliably and to

consume much less power than a vacuum tube. Despite the overwhelming advantages

11
transistors offered over vacuum tubes, it took nine years before they were used in a

commercial computer. The first commercially available computer to use transistors in its

circuitry was the UNIVAC (UNIVersal Automatic Computer), delivered to the United

States Air Force in 1956.

Developments of the computer chip started in 1958 when Jack Kilby of Texas

Instruments demonstrated that it was possible to integrate the various components of a

CPU onto a single piece of silicon. These computer chips were called integrated circuits

(ICs) because they combined multiple electronic circuits on the same chip. Subsequent

design and manufacturing advances allowed transistor densities on integrated circuits to

increase tremendously. The first ICs had only tens of transistors per chip compared to the

millions or even billions of transistors per chip available on today’s CPUs.

In 1967 Fairchild Semiconductor introduced a single integrated circuit that contained all

the arithmetic logic functions for an eight-bit processor. (A bit is the smallest unit of

information used in computers. Multiples of a bit are used to describe the largest-size

piece of data that a CPU can manipulate at one time.) However, a fully working

integrated circuit computer required additional circuits to provide register storage, data

flow control, and memory and input/output paths. Intel Corporation accomplished this in

1971 when it introduced the Intel 4004 microprocessor. Although the 4004 could only

manage four-bit arithmetic, it was powerful enough to become the core of many useful

hand calculators at the time. In 1975 Micro Instrumentation Telemetry Systems

introduced the Altair 8800, the first personal computer kit to feature an eight-bit

microprocessor. Because microprocessors were so inexpensive and reliable, computing

technology rapidly advanced to the point where individuals could afford to buy a small

12
computer. The concept of the personal computer was made possible by the advent of the

microprocessor CPU. In 1978 Intel introduced the first of its x86 CPUs, the 8086 16-bit

microprocessor. Although 32-bit microprocessors are most common today,

microprocessors are becoming increasingly sophisticated, with many 64-bit CPUs

available. High-performance processors can run with internal clock rates that exceed 3

GHz, or 3 billion clock pulses per second.

2.4 COMPONENTS OF A MICROPROCESSOR

2.4.1 RAM

Ram is an electronic spreadsheet like ones shown in Microsoft excel. It stores data in

ones and zeros and able to access the hard drive, stores the data virtually where the

microprocessor will be able to access it quickly and refreshes dynamically. This

component is created from combining latches with a decoder. The latches create circuitry

that can remember while the decoder creates a way for individual memory locations to be

selected.

2.4.2 REGISTERS

These components are special memory locations that can be accessed very fast. Three

registers are shown: the Instruction Register (IR), the Program Counter (PC), and the

Accumulator. They can be classified as: data register, address register, status register,

index register, segment register.

2.4.3 BUSES

13
These components are the information highway for the CPU. Buses are bundles of tiny

wires that carry data between components. The three most important buses are the

address, the data, and the control buses.

2.4.4 ALU

This component is the number cruncher of the CPU. The Arithmetic / Logic Unit perform

all the mathematical calculations of the CPU. It is composed of complex circuitry. The

ALU, however, can add, subtract, multiply, divide, and perform a host of other

calculations on binary numbers.

2.4.5 MEMORY CONTROLLER CHIP (MMC)

Since the CPU cannot access data directly from the RAM, an IC is introduced called

MMC. This helps the CPU to access the RAM. It grabs data directly from the RAM and

sends it through the DATA BUS to the CPU to process

2.4.6 CONTROL UNIT

This component is responsible for directing the flow of instructions and data within the

CPU. The Control Unit is actually built of many other selection circuits such as decoders

and multiplexors. In the diagram below, the Decoder and the Multiplexor compose the

Control Unit.

2.4.5 CACHE MEMORY

This is an area of high-speed computer memory used for temporary storage of frequently

used data on the CPU.

14
CHAPTER THREE

BASIC OPERATIONS OF A MICROPROCESSOR

3.0 INTRODUCTION

The previous chapter has explained the history of integrated circuit, the design of an IC,

the history of CPU, and the components of a CPU. This chapter will show the basic

operation of a CPU, how data is being processed (fetching, decoding, execution and

writing), how computer works in binary, how program runs and commands used in CPU.

3.1 MICROPROCESSOR’S TWO MAJOR COMPONENTS

i. The Execution unit(EU)

ii. The Bus interface unit (BIU)

3.1.1 THE EXECUTION UNIT (EU)

This is used mainly to execute instruction.it contains a circuit called the arithmetic and

logic unit (ALU). The ALU performs arithmetic (+,-,*,/) and logic (AND,OR,NOT)

operations. The data for operations are stored in circuit called registers. A register is like

a memory location except that we normally refer to it by a name rather than address. The

EU has eight registers for storing data; their names are AX, BX, CX, DX, SI, DI, BP, SP

and FLAGS register.

3.1.2 BUS INTERFACE UNIT (BIU)

15
This helps facilities communication between the EU and memory or I/O circuits. It is

responsible for transmitting address, data, and control signals on the buses. Its registers

are named CS, DS, ES, SS, IP; they hold addresses of memory locations. The IP contains

the address of next instruction to be executed by the EU.

In a nutshell, The EU and the BIU are connected via an internal bus and they work

together. While the EU is executing an instruction, the BIU fetches up to six bytes of the

next instruction and places them in the instruction queue. This operation is called

INSTRUCTION PREFETCH. The purpose is to speed up the processor.

3.2 INPUT AND OUTPUT (I/O) PORTS

I/O devices are connected to the computer through I/O circuits. Each of these circuits

contains several register called I/O Ports. Some are used for data while others are used

control commands. Like memory locations, the I/O ports have address and they are

connected to the bus system. These addresses are known as I/O address and can only be

used in input (IN) or output (OUT)instructions.

3.3 SERIAL AND PARALLEL INTERFACE:

The data transfer between two digital systems can be achieved using single bit at a time

(serial), or using 8bit, 16 bit, etc. at a time (parallel).The parallel interface requires more

wiring connections, while serial portends to be slower. Slow devices, like the keyboard,

or remote interface like internet are always connected via serial interface, while fast

devices and directly interfaced devices like the disk drive, always connect via parallel

16
port. But some devices like printers can be connected via either serial or parallel

interface.

3.4 INSTRUCTION EXECUTION

To understand how the CPU operates, let’s look at how an instruction is executed.

The machine instruction has two major parts: an opcode and operands. The opcode

specifics the type of operation and operands are often given as memory address to the

data to be manipulated. The tow operation cycles of the microprocessor are: (Fetch -

Execute cycle).

3.4.1 FETCH: this involves

i. Fetch an instruction from memory.

ii. Decode the instruction to determine the operation

iii. Fetch data from memory if necessary

3.4.2 EXECUTE: involves

i. Perform the operation on the data

ii. Store the result in memory if needed.

17
FIG 3.0 INTEL 8086 BLOCK DIAGRAM

FIG 3.2 INTEL 8086 MICROPROCESSOR PIN-OUT MINIMUM MODE

18
FIG.3.3 INTEL 8086 SIMPLIFIED STRUCTURE

FIG 3.4 INTEL MICROPROCESSORS FAMILY

19
FIG 3.5 8, 16, 32 BIT GENERAL REGISTER STRUCUTRE

20
FIG 3.6 SHOWING REGISTER

HIGH BYTE (8 bit) GP REGISTERS (16 bit) LOW BYTE (8 bit)

AH AX AL

BH BX BL

CH CX CL

DH DX DL

FIG 3.7Basic general purpose registers A, B, C and D

FIG 3.8 INTEL 8086 FLAG REGISTER

21
3.5 COMPONENTS OF FLOWCHARTS

The first step in writing a program is to draw its flowchart which expresses the logic

sequence of this program. The components of flowcharts are:

1. INPUT/OUTPUT UNIT

2. DECISION

3. PROCESS

22
4. START

5. SUBROUTINES

6. TERMINATOR

23
1.5.1 EXAMPLE OF HOW FLOWCHART COMPONENTS WORK
START

READ
VALUE
REPORT

ADD

STORE
RESULT IN
MEMORY

WAIT 30
SECONDS

100
SAMPES
?

STOP

24
3.6 INSTRUCTION CODES

This tells the microprocessor what to do, and how to do them. The above flow chat

has shown the algorithm (step by step procedure) that the CPU will. The instruction code

will help in executing the data. Example of instruction codes are shown below:

3.6.1 DATA TRANSFER INSTRUCTIONS

PUSH Copy specified word to top of stack.

POP Copy word from top of stack to specific location.

PUSHA (80186/80188 only) Copy all registers stack.

POPA (80186/80l88 only) Copy words f stack to all registers.

XCHG Exchange bytes or exchange words.

XLAT Translate a byte in AL using a table in memory

3.6.2 SIMPLE INPUT AND OUTPUT PORT TRANSFER INSTRUCTIONS:

IN Copy a byte or word from specified port to accumulator.

OUT Copy a byte or word from accumulator specified port.

3.6.3 SPECIAL ADDRESS TRANSFER INSTRUCTIONS:

LEA Load effective address of operand in specified register.

LDS Load DS register and other specified register from memory.

LES Load ES register and other specified register from memory.

25
Flag transfer instructions:

LAHF Load (copy to) AH with the low byte the flag register.

SAHF Store (copy) AH register to low byte of register.

PUSHF Copy flag register to top of stack.

POPF Copy word at top of stack to flag register

Arithmetic instructions

ADD Add specified byte to byte or specified word to word.

ADC Add byte + byte + carry flag or word + word + carry flag.

INC Increment specified byte or specified by 1.

AAA ASCII adjust after addition.

DAA Decimal (BCD) adjust after addition.

SUB Subtract byte from byte or word from word.

SBB Subtract byte and carry flag from byte word and carry flag from word.

DEC Decrement specified byte or specified word by l.

NEG Negate – invert each bit of a specified byte or word and add 1

(form 2’sComplement).

CMP Compare two specified bytes or two specified word

AAS ASCII adjust after subtraction.

DAS Decimal (BCD) adjust after subtraction.

Multiplication Instructions

MUL Multiply unsigned byte by byte or unsigned word by word

IMUL Multiply signed byte by byte or signed word by word

AAM ASCII adjust after multiplication

26
Division Instructions

DIV Divide unsigned word by byte or unsigned double word by word

IDIV Divide signed word by byte or signed double word by word

AAD ASCII adjust before division

CBW Fill upper byte of word with copies of sign bit of lower byte

CWD Fill upper word of double word with copies of sign bit of lower word

3.6.4 LOGIC AND BIT MANIPULATION INSTRUCTIONS (AND, OR, XOR)

Logic instructions:

NOT Invert each bit in a byte or word

AND AND the content of a byte or a word with another byte or word

OR OR the content of a byte or a word with another byte or word

XOR Exclusive OR the content of a byte or a word with another byte or word

Shift instructions:

SHL/SAL Shift bits of word or byte left, put zero(s) in LSB(s)

SHR Shift bits of word or byte right, put zero(s) in MSB(s)

SAR Shift bits of word or byte right, copy old MSB into new MSB

Rotate instructions:

ROL Rotate bits of byte or word left, MSB to LSB and to CF

ROR Rotate bits of byte or word right, LSB to MSB and to CF

RCL Rotate bits of byte or word left, MSB to CF and CF to LSB

RCR Rotate bits of byte or word right, LSB to CF and CF to MSB

27
3.6.5 STRING INSTRUCTIONS

A string is a series of bytes or a series of words in sequential memory locations. A

string often consists of ASCII character codes. In the list, a”/” is used to separate

different mnemonics for the same instruction. Use the mnemonic which most clearly

describes the function of the instruction in a specific application. A”B” In a mnemonic is

used to specifically indicate that a string of bytes is to be acted upon. A”W” In the

mnemonic is used to indicate that a string of words Is to be acted upon

REP An instruction prefix. Repeat following instruction until

CX=0

REPE/REPZ An instruction prefix. Repeat instruction until CX = 0 or

zero

Flag ZF!=1

REPNE/REPNZ An instruction prefix. Repeat until CX = 0 or ZF = 1

MOVS/MOVSB/MOVSW Move byte or word from one string to another

COMPS/COMPSB/COMPSW Compare two string bytes or two string words

INS/INSB/INSW (80186/80188) Input string byte or word from port

OUTS/OUTSB/OUTSW (80186/80l88) output string byte or word to port

SCAS/SCASB/SCASW Scan a string. Compare a string byte with a byte in AL or

a string word with a word in AX

LODS/LODSB/LODSW load string byte into AL or string word into AX

28
STOS/STOSB/STOSW Store byte from AL or word from AX into string

3.6.6 PROGRAM EXECUTION TRANSFER INSTRUCTIONS

Instructions are used to tell the 8086 to start fetching instructions from some new address,

rather than continuing in sequence.

Unconditional transfer instructions:

CALL Call a procedure (subprogram), save return address on stack

RET Return from procedure to calling program

JMP Go to specified address to get next instruction

Conditional transfer instructions:

A”/”is used to separate two mnemonics which represent the same instruction. Use the

mnemonic which most dearly describes the decision condition in a specific program.

These instructions are often used after a compare instruction. The terms below and above

refer to unsigned binary numbers. Above means larger in magnitude. The terms greater

than or less

than refer to signed binary numbers. Greater than means more positive.

JA/JNBE Jump if above/Jump if not below or equal

JAE/JNB Jump if above or equal/Jump if not below

JB/JNAE Jump if below/Jump if not above or equal

JBE/JNA Jump if below or equal/Jump if not above

JC Jump if carry flag CF 1

JE/JZ Jump if equal/Jump if zero flag ZF = 1

29
JG/JNLE Jump if greater/Jump if not less than or equal

JGE/JNL Jump if greater than or equal Jump if not less than

JL/JNGE Jump if less than/Jump if not greater than or equal

JLE/JNG Jump if less than or equal/Jump if not greater than

JNC Jump if no carry (CF = 0)

JNE/JNZ Jump if not equal/lump if not’ zero (ZF = 0)

JNO Jump if no overflow (overflow flag OF = 0)

JNP/JPO Jump if not parity/Jump if parity odd (PF = 0)

JNS Jump if not sign (sign flag SF=0)

JO Jump if overflow flag OF=1

JP/JPE Jump if parity/Jump if parity even (PF =1)

JS Jump if sign (SF = 1)

Iteration control instructions:

These instructions can be used to execute a series of instructions some number of times.

Here mnemonics separated by a”/” represent the same instruction. Use the one that best

fits the specific application.

LOOP Loop through a sequence of instructions until CX= 0

LOOPE/LOOPZ Loop through a sequence instruction while ZF= l and CX! = 0

LOOPNE/LOOPNZ Loop through a sequence instructions while ZF=0 and CX!= 0

JCXZ Jump to specified address if CX=0

Interrupt instructions:

INT Interrupt program execution call service procedure

INTO Interrupt program execution OF =1

30
IRET Return from interrupt se procedure to main program

High-level language interface instructions:

ENTER (80l86/80188 only) Enter procedure

LEAVE (80l86/80188 only) Leave procedure

BOUND (80l86/80188 only) Check effective address within

specified array

3.6.7 Processor control instructions

Flag set/clear instructions:

STC Set carry flag CF to 1

CLC Clear carry flag CF to 0

CMC Complement the state of the carry flag CF

STD Set direction flag DF to l (decrement string pointers)

CLD Clear direction flag DF to 0

STI Set interrupt enable flag to 1 (enable INTR input)

CLI Clear interrupt enable flag to 0 (disable INTR input)

Execution control instructions:

HLT Halt (do nothing) until interrupt or reset

WAIT Wait (do nothing) until signal on the test pin is low

ESC Escape to external coprocessor such as 8087 or 8089

LOCK An instruction prefix. Prevents another processor from taking

31
the bus while the adjacent instruction executes

NOP No action except fetch and decode

The assembly instruction format includes Label: which defines the program line, Op-code

or mnemonic which describe the required operation, the operand which includes the data

and the comment a typical instruction is shown below

3.7 CPU COMMUNICATION IN BINARY

In the simplest sense, a CPU is a collection of transistors, tiny electrical switches that

enable the CPU to handle the binary code that makes up programs. Transistors, like every

other electrical device, require a set voltage to run properly. When we say computer

works in binary, it means the circuits in the microprocessor hold certain amount of charge

which is represented as 1 (binary) and when no charge is passed it is represented as 0

(binary) which means off. That is just a simple binary representation of CPU.

For a CPU to process certain amount of information, a certain instruction code (also

called machine language (in binary)) must have been set on it, so that it will work

32
according to that instruction. There is book which contains these instructions is called the

codebook. The codebook can be shown in the diagram below

INTEL 8088 CODEBOOK

Each set microprocessors have their own codebook. The above code book is only meant

for INTEL 8088. Each instruction will be performed according to what is in the

codebook.

33
To process this instruction a certain amount of voltage must be supplied to the clock wire

(represented as CLK on motherboard). A charge to the CLK wire is called a clock cycle.

When this voltage is applied, the CPU processes the data and sends it out to the through

the buses to MMC and back to the RAM. This is a simple explanation on how the CPU

works.

Fig 3.9 shows how data is grabbed from RAM through mmc to CPU

3.8 CAUSES AND EFFECT OF OVERHEATING IN CPU

The main cause of overheating in CPU is overclocking. Overclocking occurs when the

system clock speed is greater than the microprocessor rating. This causes the

microprocessor to work at a speed which is greater than the capacity of the

microprocessor, thereby causing over heating for the microprocessor. While the other

cause is from the heat sink, a slight misplacement of heatsink located on the

microprocessor also cause excess heating. Since we have known that transistor and other

34
components makeup the circuit in the microprocessor, excess heating of transistor causes

damage to the transistor and damage in one transistor causes damage to the entire

microprocessor. So, from here overheating of a microprocessor causes damage to the

microprocessor.

CHAPTER FOUR

RESULTS AND DISCUSSION

4.0 INTRODUCTION

The last chapter discusses the methodology adopted in the design of a microprocessor;

this current chapter will try to discuss various results obtained from the simulation of

different aspects of the microprocessor.

The figure 4.1 below shows the microprocessor of a simple switching system and

development to implement some function. It shows the steps involved in the software

program development, with detailing architecture, instruction set, and software program

to demonstrate how microprocessor is designed.

35
The Logic level diagram shows a message switching of the designed microprocessor

which accepts a single input line and sets one (and only one) output line high by selecting

one of the 16 two input AND gates. This shows that the specification of the logic levels,

driving capacity, and signal timing must be made for this microprocessor. A TTL was

assumed where the input will drive no more than four TTL loads, with the timing set to

set at 300 bits per second in binary transmission.

4.1 ALGORITHM DEVELOPMENT

The conceptual algorithm was developed to show what the digital processor will

implement to achieve a desired result. This makes a character to be seen by the system as

a string of high and low logic levels with bit of 3.33ms as can be seen in figure 4.2. In

line with this idea along with the specifications, the conceptual algorithm was developed

as follows:

i. One input is required

ii. Sixteen outputs are required

iii. The unit must switch the input to one of the outputs

iv. The first character (eight data bits) specifies the output channel number 1-16.

v. The second character (eight data bits) specifies the message length or number of

characters 1-256.

vi. Detection or the beginning of a character is achieved by recognition of a high

logic levels at the input.

vii. Data is recognized in the most significant bit (MSB) first.

36
viii. A time delay of 3.33ms must be achieved, preferably through software, to

synchronize detection of data bits with the input transmission.

ix. A delay of 1.5 x 3.33ms is needed to define the point I time after the first

transition from low to high logic levels

x. Skip the start bit when a character is detected.

xi. Read the next four bits, each must be 0 before continuing; that is 0000 0000 to

0000 1111.

xii. A low order four bits is used to address one of the 16 output lines.

xiii. The next eight bits is read and stored as the character count.

xiv. Then a decrement procedure for character counter is achieved.

xv. Then the character count is stored to activate the output line for the next

characters to flow through the appropriate gates.

xvi. Character count becomes zero, when the last character pass through the gate.

xvii. It processes, then wait for a new message and repeat the process.

This can be explained using figure 4.3

Figure 4.2 Bits Sampling Graph

37
4.2 THE TIMING CONCEPTS

38
The figure 4.3 shows the timing concept graph to define how the time delays was

achieved. It shows the relationship between timing of instructions and the time delay.

When no character is being received, the system ordinarily should sample the input at

approximately ten times the bit time, or every 0.333ms. The instruction execution time

can be explained using figure 4.4. If t 1 represents the instruction execution time, plus the

time delay td1 to determine the data sampling point for bit 1. The bit 2 is sampled at t 1

+td2 later, because the execution speed and the number of instructions is unknown at this

time, the time delays cannot be established, but the estimated figure can be obtained

using the parameters below:

i. Let assume 20ms instructions in a data sample loop

ii. Let’s assume 15µs per instruction; where t1 = 20(15µs)= 300µs = 0.300ms

iii. One tenth of a bit time is used in the design as t < 1/10 bit time. To achieve our

aim in the design, a flowchart will be used to assist in the design as shown in

the figure 4.5

39
Figure 4.5 shows the concept level flow chart where the variables are time delays set to

be t1=1.5tb and 10tb. The value of tb can be was the design variable which was established

during the actual testing. This was so because t b is actually a function of the total

instruction execution time of the microprocessor which can be seen in figure 4.4 as

instruction timing and time delay graphs

40
CHAPTER FIVE

CONCLUSION AND RECOMMENDATION

5.0 SUMMARY

From the previous chapters we have seen how instruction and data execution is done in

the microprocessor, the instruction codes for Intel 8088, the block diagram (which shows

the direction of flow of data), and causes and effect of overheating in microprocessor.

This chapter contains the conclusive aspect of this study.

5.1 CONCLUSION

This study has explained the history and internal components of microprocessor, the way

it works with other components on the computer motherboard and its communication in

41
binary. This study has also shown the causes and effect of overheating in microprocessor.

From all these, the detailed explanation of how computer works in binary has been

analyzed and the major causes and effects of overheating in our computer system has

identified and explained in detailed.

This study, therefore, concludes that a computer microprocessor is the brain of a

computer and a computer processing speed depends on its bit size. Without a

microprocessor, a computer cannot perform any task.

REFERENCES

1. Barr, Michael (2009): Real men program in C Language with Microprocessor

2. Brookshear, J. G. (1997), Computer Science: An Overview, Fifth Edition,

Addison-Wesley, Reading, MA.

3. Ceruzzi, Paul E. ( 2003). A History of Modern Computing (2nd ed.). p 220–

221

4. Edward tetz, e.tal (2001): A+ certification bible

5. Encarta premium 2009 version

6. Faggin, Federico (1996). The History of the 4004 Microprocessor, Pp 10–20.

7. Gerry Kane, Adam Osborne (2004): 16 Bit Microprocessor handbook

8. Gerry Kane (1983): 16 Bit Microprocessor Handbook

42
9. In Finn, Bernard (2010). The Industrial Construction of Semiconductor

Innovation, (ISBN 0-87013-658-5)

10. Intel (2000), "Virtual press kit for 0.18-micron processor launch,"

http://developer.intel.com/pressroom/kits/events/18micron/photos.ht.

11. Karam, Andrew P. (2000): Advances in Microprocessor Technology,

12. McGonagal, James (2006). Microprocessor History

13. Mike Meyer (2007): CompTIA A+ sixth edition (81-105)

14. Ray, A. K, Burchard, K.M (2008): Advanced Microprocessors and Peripherals

43

You might also like