Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 11

INDEX

I. Introduction
II. 8086 Microprocessor

III. Block diagram of 8086

IV. Even and Odd number Logic

V. Flowchart

VI. Program

VII. Output

VIII. Conclusion
Introduction
The complexity of an integrated circuit is bounded by physical limitations on the
number of transistors that can be put onto one chip, the number of package
terminations that can connect the processor to other parts of the system, the
number of interconnections it is possible to make on the chip, and the heat that the
chip can dissipate. Advancing technology makes more complex and powerful chips
feasible to manufacture.
A minimal hypothetical microprocessor might include only an arithmetic logic unit
(ALU), and a control logic section. The ALU performs addition, subtraction, and
operations such as AND or OR. Each operation of the ALU sets one or more flags in a
status register, which indicate the results of the last operation (zero value, negative
number, overflow, or others). The control logic retrieves instruction codes from
memory and initiates the sequence of operations required for the ALU to carry out
the instruction. A single operation code might affect many individual data paths,
registers, and other elements of the processor.
As integrated circuit technology advanced, it was feasible to manufacture more and
more complex processors on a single chip. The size of data objects became larger;
allowing more transistors on a chip allowed word sizes to increase from 4- and 8-bit
words up to today's 64-bit words. Additional features were added to the processor
architecture; more on-chip registers sped up programs, and complex instructions
could be used to make more compact programs. Floating-point arithmetic, for
example, was often not available on 8-bit microprocessors, but had to be carried out
in software. Integration of the floating-point unit, first as a separate integrated
circuit and then as part of the same microprocessor chip, sped up floating-point
calculations.
Occasionally, physical limitations of integrated circuits made such practices as a bit
slice approach necessary. Instead of processing all of a long word on one integrated
circuit, multiple circuits in parallel processed subsets of each word. While this
required extra logic to handle, for example, carry and overflow within each slice, the
result was a system that could handle, for example, 32-bit words using integrated
circuits with a capacity for only four bits each.
The ability to put large numbers of transistors on one chip makes it feasible to
integrate memory on the same die as the processor.
8086 Microprocessor
A Microprocessor is an Integrated Circuit with all the functions of a CPU however, it
cannot be used stand alone since unlike a microcontroller it has no memory or
peripherals. 8086 does not have a RAM or ROM inside it. However, it has internal
registers for storing intermediate and final results and interfaces with memory
located outside it through the System Bus.
In case of 8086, it is a 16-bit Integer processor in a 40 pin, Dual Inline Packaged IC.
The size of the internal registers(present within the chip) indicate how much
information the processor can operate on at a time (in this case 16-bit registers) and
how it moves data around internally within the chip, sometimes also referred to as
the internal data bus. 8086 provides the programmer with 14 internal registers,
each 16 bits or 2 Bytes wide.

Features of 8086
The most prominent features of a 8086 microprocessor are as follows −
• It has an instruction queue, which is capable of storing six instruction bytes
from the memory resulting in faster processing.
• It was the first 16-bit processor having 16-bit ALU, 16-bit registers, internal
data bus, and 16-bit external data bus resulting in faster processing.
• It is available in 3 versions based on the frequency of operation −
• 8086 → 5MHz
• 8086-2 → 8MHz
• (c)8086-1 → 10 MHz
• It uses two stages of pipelining, i.e. Fetch Stage and Execute Stage, which
improves performance.
• Fetch stage can prefetch up to 6 bytes of instructions and stores them in the
queue.
• Execute stage executes these instructions.
• It has 256 vectored interrupts.
• It consists of 29,000 transistors.
Block diagram of 8086

The architecture of 8086 microprocessor is composed of 2 major units, the BIU i.e.,
Bus Interface Unit and EU i.e., Execution Unit. The figure below shows the block
diagram of the architectural representation of the 8086 microprocessor:
Bus Interface Unit (BIU)
The Bus Interface Unit (BIU) manages the data, address and control buses.
The BIU functions in such a way that it:
• Fetches the sequenced instruction from the memory,
• Finds the physical address of that location in the memory where the
instruction is stored and
• Manages the 6-byte pre-fetch queue where the pipelined instructions are
stored.

Execution Unit (EU)


The Execution Unit (EU) performs the decoding and execution of the instructions
that are being fetched from the desired memory location.
Even and Odd numbers logic
Odd numbers:
“An odd number an integer when divided by two, either leaves a remainder or
the result is a fraction.one is the first odd positive number but it does not leave
a remainder. Some example of odd numbers are 1,3,5,7,9 and 11.”
An integer that is not an odd number. if an even number is divided by two, the
result is 8 another integer. On the other hand, an odd number, when divided
by two, will result in fraction. Since odd numbers are integers, negative
number can be odd.

Even numbers:
“Even numbers are those which when divided by 2 leaves no remainder or as 0
and Odd numbers are those numbers which when divided by 2 leaves a
remainder of 1”. An even number is an integer that can be divided by two and
remain an integer or has no remainder.
An integer that is not an even number is an odd number. If an even number
is divided by two, the result is another integer. On the other hand, an odd
number, when divided by two, will result in a non-integer. Since even
numbers are integers ,negative numbers can be even.

How to check whether the number is even or odd in assembly language:

1. For checking for odd is rather simple


2. An odd number will have the less significative byte in 1
3. So the only thing you need to check if that bit is 1.
Flowchart
Program
Separate and Store even and odd number in different array and
find largest.

DATA SEGMENT
DBLOCK DB 01H,12H,34H,25H,40H,15H,19H,24H
ODDBLOCK DB 08H DUP(0FFH) EVENBLOCK
DB 08H DUP(0FFH) ODDLARGEST DB ?
EVENLARGEST DB ?
DATA ENDS
CODE SEGMENT
ASSUME CS:CODE, DS:DATA
START: MOV AX, DATA
MOV DS, AX
LEA SI, DBLOCK
LEA DI, ODDBLOCK
LEA BX, EVENBLOCK
MOV CX, 0008H
UP: MOV AL, [SI]
ROR AL, 1
JNC DOWN1
MOV AL, [SI]
MOV [DI], AL
INC DI
JMP DOWN2
DOWN1:MOV AL, [SI]
MOV [BX], AL
INC BX
DOWN2:INC SI
LOOP UP
;ODD
LEA SI, ODDBLOCK
MOV CX, 0004H
MOV AL, [SI]
UP1: INC SI
CMP AL, [SI]
JG DOWN3
MOV AL, [SI]
DOWN3:LOOP UP1
MOV ODDLARGEST, AL
;EVEN
LEA SI, EVENBLOCK
MOV CX, 0004H
MOV AL, [SI]
UP2: INC SI
CMP AL, [SI]
JG DOWN4
MOV AL, [SI]

DOWN4:LOOP UP2
MOV EVENLARGEST, AL
MOV AH, 4CH
INT 21H
CODE ENDS
END START
Output

Program Output after termination:


Conclusion
This project helped the team to understand how the Assembly Language
Programming can be used to develop logic aided by algorithms and flowcharts. Also,
this project has opened many doors to explore the Intel microprocessor series
further.

Reference

https://en.wikipedia.org/wiki/Microprocessor

https://www.tutorialspoint.com/microprocessor/microprocessor_overview.htm

You might also like