MP Sol
MP Sol
Q.1: (CLO-1)
Ans: The Intel 8086, is a 16-bit microprocessor designed by Intel corporation between 1976-1978.
This Intel 8086 microprocessor gave rise to the x86 architecture or 16-bit architecture. The figure
given below is the internal architecture of Intel 8086 microprocessor
The 8086 microprocessor performs faster operations as it has registers, internal and external buses and
ALU, all of 16-bit.
Intel 8086 microprocessor has two units;
Execution Unit (EU) and Bus Interface Unit (BIU). They are dependent and get worked by each other.
Execution unit receives program instruction codes and data from the BIU, executes them and stores
the results in the general registers. It can also store the data in a memory location or send them to an
I/O device by passing the data back to the BIU. This unit, EU, has no connection with the system
Buses. It receives and outputs all its data through BIU.
As the EU has no connection with the system Buses, this job is done by Bus Interface Unit. BIU and
EU are connected with an internal bus. BIU connects EU with the memory or I/O circuits. It is
responsible for transmitting data, addresses and control signal on the buses.
General Registers:
General Registers or General Purpose Registers are a kind of registers which can store both data and
addresses.
Segment Registers:
There are four segment registers, CS (Code Segment), DS (Data Segment), ES (Extra Segment) and
SS (Stack Segment).
To access instructions the Intel 8086 uses the registers CS and IP. The CS register contains the
segment number of the next instruction and the IP contains the offset.
Flag Registers:
Intel 8086 has 16 flag registers among which 9 are active. The purpose of the flag register is to
indicate the status of the processor. It does this by setting the individual bits called flags.
Accumulator
The Accumulator holds one of the operands as well as the result in operations performed by the ALU.
The program counter contains the memory address of the next program instruction to be executed.
Address, Data and Status Registers and Stack Pointer
The Data Register contains the data coming from or going to memory or an I/O port.
The Status Register contains information about the result of the previous ALU operation.
The Stack Pointer register contains the address of the block of memory (the stack) where subroutine
return addresses are stored.
Control unit
The Control Unit contains the circuitry that controls the process of fetching, decoding and executing
program instructions.
Q.1(iii) The 8086 gave rise to x86 architecture? Explain what is the x86 architecture and
how it differs from x64 architecture?
Ans: x86 simply refers to a family of processors and the instruction set they all use. It doesn't actually
say anything specific about data sizes.
x86 started out as a 16-bit instruction set for 16-bit processors (the 8086 and 8088 processors), then
was extended to a 32-bit instruction set for 32-bit processors (80386 and 80486), and now has been
extended to a 64-bit instruction set for 64-bit processors. It used to be written as 80x86 to reflect the
changing value in the middle of the chip model numbers, but somewhere along the line the 80 in the
front was dropped, leaving just x86.
x64 is shorthand for x86-64, which is the 64-bit extension to x86. However, there are actually two
variations of this ISA: AMD64 and Intel64. However the differences are minor and of no real concern
to the end user
Q.1(iv) What is role of cache memory in speeding up the microprocessor? How it differs
from the registers?
Ans: Cache memory is an extremely fast memory type that acts as a buffer between RAM and the
CPU. It holds frequently requested data and instructions so that they are immediately available to the
CPU when needed. Cache memory is used to reduce the average time to access data from the Main
memory.
* A cache memory is an area in the computer where codes and instructions are stored while a register
holds instructions or data that the processor is working on or will be working on shortly. They form
part of the processor and are capable of holding only one item at a time.
Q.1(v) Write a C-language or Assembly language program to move data between two
registers?
Q.2: (CLO-2)
i) Write a program to generate a pulse train of 2 seconds period ? You can use
timer 1 in mode 1?
Ans:
Max delays
void TwoSec()
unsigned char i;
TMOD = 0x10;
TH1 = 0x4B;
TL1 = 0xFD;
TR1 = 1;
while (TF1==0);
TR1 = 0; TF1 = 0;
void main(void){
while (1) {
P2++; TwoSec();
ii) Write a program to transfer serially the message “The earth is but one
country and mankind its citizens”
Ans:
#include <reg51.h>
unsigned char i;
for(i=0;ch[i]; i++){
TI = 0; // Clear TI Flag
}
}
void main(void){
while (1)
send(message);