Malp All 6
Malp All 6
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
BIU takes care of all data and addresses transfers on the buses for the EU like sending
addresses, fetching instructions from the memory, reading data from the ports and the
memory as well as writing data to the ports and the memory. EU has no direction connection
with System Buses so this is possible with the BIU. EU and BIU are connected with the
Internal Bus.
It has the following functional parts −
• Instruction queue − BIU contains the instruction queue. BIU gets upto 6 bytes of next
instructions and stores them in the instruction queue. When EU executes instructions
and is ready for its next instruction, then it simply reads the instruction from this
instruction queue resulting in increased execution speed.
Fetching the next instruction while the current instruction executes is called pipelining.
Segment register − BIU has 4 segment buses, i.e. CS, DS, SS& ES. It holds the addresses of
instructions and data in memory, which are used by the processor to access memory
locations. It also contains 1 pointer register IP, which holds the address of the next instruction
to executed by the EU.
CS − It stands for Code Segment. It is used for addressing a memory location in
the code segment of the memory, where the executable program is stored.
DS − It stands for Data Segment. It consists of data used by the program and is
accessed in the data segment by an offset address or the content of other register
that holds the offset address.
SS − It stands for Stack Segment. It handles memory to store data and addresses
during execution.
ES − It stands for Extra Segment. ES is additional data segment, which is used by
the string to hold the extra destination data.
Instruction pointer − It is a 16-bit register used to hold the address of the next instruction to
be executed.
EU (Execution Unit)
Execution unit gives instructions to BIU stating from where to fetch the data and then decode
and execute those instructions. Its function is to control operations on data using the
instruction decoder & ALU. EU has no direct connection with system buses as shown in the
above figure, it performs operations over data through BIU.
Let us now discuss the functional parts of 8086 microprocessors.
ALU
It handles all arithmetic and logical operations, like +, −, ×, /, OR, AND, NOT operations.
Flag Register
It is a 16-bit register that behaves like a flip-flop, i.e. it changes its status according to the
result stored in the accumulator. It has 9 flags and they are divided into 2 groups −
Conditional Flags and Control Flags.
Flags
It represents the result of the last arithmetic or logical instruction executed. Following is the
list of conditional flags −
• Carry flag − This flag indicates an overflow condition for arithmetic operations.
• Auxiliary flag − When an operation is performed at ALU, it results in a carry/barrow
from lower nibble (i.e. D0 – D3) to upper nibble (i.e. D4 – D7), then this flag is set, i.e.
carry given by D3 bit to D4 is AF flag. The processor uses this flag to perform binary
to BCD conversion.
• Parity flag − This flag is used to indicate the parity of the result, i.e. when the lower
order 8-bits of the result contains even number of 1’s, then the Parity Flag is set. For
odd number of 1’s, the Parity Flag is reset.
• Zero flag − This flag is set to 1 when the result of arithmetic or logical operation is
zero else it is set to 0.
• Sign flag − This flag holds the sign of the result, i.e. when the result of the operation
is negative, then the sign flag is set to 1 else set to 0.
General purpose register
There are 8 general purpose registers, i.e., AH, AL, BH, BL, CH, CL, DH, and DL. These registers
can be used individually to store 8-bit data and can be used in pairs to store 16bit data. The
valid register pairs are AH and AL, BH and BL, CH and CL, and DH and DL. It is referred to the
AX, BX, CX, and DX respectively.
• AX register − It is also known as accumulator register. It is used to store operands for
arithmetic operations.
• BX register − It is used as a base register. It is used to store the starting base address
of the memory area within the data segment.
• CX register − It is referred to as counter. It is used in loop instruction to store the loop
counter.
• DX register − This register is used to hold I/O port address for I/O instruction.
Stack pointer register
It is a 16-bit register, which holds the address from the start of the segment to the memory
location, where a word was most recently stored on the stack
Q.2 Draw and explain software model of 8086?
The software architecture of the 8088 microprocessor includes
13 16-bit internal registers:
• the instruction pointer (IP),
• four data registers (AX, BX, CX, and DX)
• two pointer registers (BP and SP)
• two index registers (SI and DI)
• four segment registers (CS, DS, SS, and ES)
There is another register called status register (SR), with nine
of its implemented for status and control flags.
8088 software architecture implements independent memory and input/output address
spaces. Memory address space is 1,048,576 (1 Mbyte) in length and the I/O address space is
65,536 bytes (64Kbytes) in length.
Q.3 What is register? Explain segment registers in detail?
• Processor operations mostly involve processing data. This data can be stored in
memory and accessed from thereon. However, reading data from and storing data
into memory slows down the processor, as it involves complicated processes of
sending the data request across the control bus and into the memory storage unit and
getting the data through the same channel.
• To speed up the processor operations, the processor includes some internal memory
storage locations, called registers.
• The registers store data elements for processing without having to access the
memory. A limited number of registers are built into the processor chip.
1MB memory is partitioned into 64KB byte segments.
Each segment is assigned a base address that identifies its starting point, that is its
lowest addressed byte storage location.
Only four of these segments are active at a time. They are called the Code, Data, Stack
and Extra segments. The base address of each of these 4 active segments are stored
in four internal registers.
Those 4 segment registers are:
• Code Segment Register(CS)
• Data segment Register(DS)
• Stack Segment Register(SS)
• Extra Segment Register(ES)
• CS (Code Segment)
Stack segment is a 16-bit register containing address of 64KB segment with program
stack. By default, the processor assumes that all data referenced by the stack pointer
(SP) and base pointer (BP) registers is located in the stack segment. SS register can be
changed directly using POP instruction.
Data segment is a 16-bit register containing address of 64KB segment with program
data. By default, the processor assumes that all data referenced by general registers
(AX, BX, CX, DX) and index register (SI, DI) is located in the data segment. DS register
can be changed directly using POP and LDS instructions.
Extra segment is a 16-bit register containing address of 64KB segment, usually with
program data. By default, the processor assumes that the DI register references the
ES segment in string manipulation instructions. ES register can be changed directly
using POP and LES instructions.It is possible to change default segments used by
general and index registers by prefixing instructions with a CS, SS, DS or ES prefix.
• Restriction on Segment
There is one restriction on the value that can be assigned as a base address that is it
must reside on a 16- byte address boundary i.e. its last four bits should be zero.Other
that this segment can be contiguous, adjacent, disjoint, or overlapping.
S Z X AC X P X CY
Condition flags
The conditional flags are set or reset after any arithmetic or logical operation is performed on
an 8 bit or 16-bit number. This category consists of the following 6 flags:
1. Carry Flag (CF): The carry flag will be set only if a carry is generated from the MSB of the
result after doing any operation in 8086 Microprocessor.
2. Parity Flag (PF): Parity is related to the number of 1’s contained in the binary data. There
exist two types of parity:
i. Even Parity: When the number of 1’s in the binary data are even.
ii. Odd Parity: When the number of 1’s in the binary data are odd.
For the flag, the PF is set if there exists an even parity in data after the execution of the
instruction. Else the flag is reset.
3. Auxiliary-Carry Flag (AF): This flag is set if there is a generation of carrying from a nibble,
i.e. 4 bits of data.
4.Zero Flag (ZF): If the result after performing the required operation (Arithmetic or Logical)
on the instructions is zero, in that case, the zero flags are set to 1. Else, it remains reset.
5. Sign Flag (SF): If the result after performing any arithmetic or logic operation in the given
instruction is negative, then the sign flag is set to 1. Else, for a positive result, the sign flag
remains reset.
2. Signed integer numbers: each type of integer can be either byte-wide or word-wide.
The most significant bit in signed integer data type is a sign bit. A zero in this position
identifies a positive number.
The Signed byte integer can be used to represent decimal numbers in the range +127 to –
128.
The signed word integer can be used to represent decimal numbers in the range +32,767 to
–32,768.
3. Binary-coded decimal (BCD) numbers: BCD data can be stored on either unpacked or
packed form. In unpacked BCD, a single BCD digit is stored in four least significant bits, and
the four bits are set to 0. In packed BCD, two BCD numbers are stored in a byte.
4. ASCII (American Standard Code for Information Interchange) : ASCII codes can be
processed by 8088 microprocessor. For example, 65H is ASCII code for A. This will be stored
as 01100101 in the memory.
0 1 1 0 0 1 0 1
Q.6 The value of Code Segment (CS) Register is 4042H and the value of
different offsets is as follows:
BX: 2025H , IP: 0580H , DI: 4247H. Calculate the effective address of the
memory location pointed by the CS register.
Ans:
Therefore, the effective address of the memory location pointed by the CS register is
calculated as follows:
Ans:
Both SP and BP are the offsets for Stack Register (SS). The address calculated when BP is
taken as the offset gives the starting address of the stack. The address when SP is taken as
the offset denotes the memory location where the top of the stack lies.
The double words of data can be stored at what are called even or odd address boundaries. The
least significant bit of address determine the type of word boundary. If bit is 0 ,4, the word is
at even address boundary. If LSB bit is 1, 3 or 5…means double word stored at odd address
boundary. It occupy 4 byte of memory.
The double word data stored at even address boundary is called aligned word and word stored
at odd address boundary is called misaligned double word.
Double word 0, 4 and 2 are stored at even address boundary are called aligned double word.
Double word 1,3 and 5 are stored at odd address boundary are called misaligned double word
Q.9. Draw 8086 pin diagram and Explain following pins (1) ALE (2) IO/M’ (3)
READY (4) HLDA (5) INTA?
8086 was the first 16-bit microprocessor available in 40-pin DIP (Dual Inline Package) chip. Let
us now discuss in detail the pin configuration of a 8086 Microprocessor
Ready
It is available at pin 22. It is an acknowledgement signal from I/O devices that data is
transferred. It is an active high signal. When it is high, it indicates that the device is ready to
transfer data. When it is low, it indicates wait state.
INTA
It is an interrupt acknowledgement signal and id available at pin 24. When the microprocessor
receives this signal, it acknowledges the interrupt.
ALE
It stands for address enable latch and is available at pin 25. A positive pulse is generated each
time the processor begins any operation. This signal indicates the availability of a valid address
on the address/data lines.
M/IO
This signal is used to distinguish between memory and I/O operations. When it is high, it
indicates I/O operation and when it is low indicates the memory operation. It is available at
pin 28.
HLDA
It stands for Hold Acknowledgement signal and is available at pin 30. This signal acknowledges
the HOLD signal.
Each personal computer has a microprocessor that manages the computer's arithmetical,
logical, and control activities.
Each family of processors has its own set of instructions for handling various operations such
as getting input from keyboard, displaying information on screen and performing various
other jobs. These set of instructions are called 'machine language instructions'.
A processor understands only machine language instructions, which are strings of 1's and
0's. However, machine language is too obscure and complex for using in software
development. So, the low-level assembly language is designed for a specific family of
processors that represents various instructions in symbolic code and a more understandable
form.
An assembly language is a type of low-level programming language that is intended to
communicate directly with a computer’s hardware.
Low-level programming languages such as assembly language are a necessary bridge
between the underlying hardware of a computer
central processing unit (CPU), principal part of any digital computer system, generally
composed of the main memory, control unit, and arithmetic-logic unit. It constitutes the
physical heart of the entire computer system; to it is linked various peripheral equipment,
including input/output devices and auxiliary storage units. In modern computers, the CPU is
contained on an integrated circuit chip called a microprocessor.The CPU is the heart of the
computer, most of computations occur inside the CPU.
RAM stands for random-access memory, but what does that mean? Your computer RAM is
essentially short term memory where data is stored as the processor needs it. This isn’t to be
confused with long-term data that’s stored on your hard drive, which stays there even when
your computer is turned off. Anytime you play a game from your computer’s hard drive or
stream a movie from the Internet, all of the data that your computer’s processor needs to
play the game or watch the movie is stored in RAM. This is so that your processor can get to
it quickly. Once you’re done playing your game or watching your movie and you close it down,
the processor doesn’t need that data anymore, so it replaces it with the next task you give it.
RAM can slow down your computer if there isn’t enough of it for the processor to perform
the tasks you ask it to. If your processor wants to load more data than your computer RAM
can handle, it has to keep going back to the hard drive or the Internet to obtain the
information again. This is just like someone trying to pick up more tennis balls than they can
carry; in the end, they spend more time picking up tennis balls than playing the game!
What Does System Bus Mean?
The system bus is a pathway composed of cables and connectors used to carry data between
a computer microprocessor and the main memory. The bus provides a communication path
for the data and control signals moving between the major components of the computer
system. The system bus works by combining the functions of the three main buses: namely,
the data, address and control buses. Each of the three buses has its separate characteristics
and responsibilities.
Q.12 What is inside CPU?/How many parts CPU is divided into? Which are
those?
central processing unit (CPU), principal part of any digital computer system, generally
composed of the main memory, control unit, and arithmetic-logic unit. It constitutes the
physical heart of the entire computer system; to it is linked various peripheral equipment,
including input/output devices and auxiliary storage units. In modern computers, the CPU is
contained on an integrated circuit chip called a microprocessor.The CPU is the heart of the
computer, most of computations occur inside the CPU.
General purpose register
There are 8 general purpose registers, i.e., AH, AL, BH, BL, CH, CL, DH, and DL. These registers
can be used individually to store 8-bit data and can be used in pairs to store 16bit data. The
valid register pairs are AH and AL, BH and BL, CH and CL, and DH and DL. It is referred to the
AX, BX, CX, and DX respectively.
• AX register − It is also known as accumulator register. It is used to store operands for
arithmetic operations.
• BX register − It is used as a base register. It is used to store the starting base address
of the memory area within the data segment.
• CX register − It is referred to as counter. It is used in loop instruction to store the loop
counter.
• DX register − This register is used to hold I/O port address for I/O instruction.
Segment Registers
• CS − It stands for Code Segment. It is used for addressing a memory location in the
code segment of the memory, where the executable program is stored.
• DS − It stands for Data Segment. It consists of data used by the program and is
accessed in the data segment by an offset address or the content of other register
that holds the offset address.
• SS − It stands for Stack Segment. It handles memory to store data and addresses
during execution.
• ES − It stands for Extra Segment. ES is additional data segment, which is used by the
string to hold the extra destination data.
Instruction pointer − It is a 16-bit register used to hold the address of the next instruction to
be executed.
SP (Stack pointer register)
It is a 16-bit register, which holds the address from the start of the segment to the memory
location, where a word was most recently stored on the stack
BP – This is the base pointer. It is of 16 bits. It is primary used in accessing parameters passed
by the stack. It’s offset address relative to stack segment.
SI – This is the source index register. It is of 16 bits.It is used in the pointer addressing of data
and as a source in some string related operations. It’s offset is relative to data segment.
DI – This is the destination index register. It is of 16 bits.It is used in the pointer addressing of
data and as a destination in some string related operations.It’s offset is relative to extra
segment.
Arithmetic-logic unit (ALU)? An arithmetic-logic unit is the part of a central processing unit
that carries out arithmetic and logic operations on the operands in computer instruction
words.
Flags
It represents the result of the last arithmetic or logical instruction executed. Following is the
list of conditional flags −
• Carry flag − This flag indicates an overflow condition for arithmetic operations.
• Auxiliary flag − When an operation is performed at ALU, it results in a carry/barrow
from lower nibble (i.e. D0 – D3) to upper nibble (i.e. D4 – D7), then this flag is set, i.e.
carry given by D3 bit to D4 is AF flag. The processor uses this flag to perform binary
to BCD conversion.
• Parity flag − This flag is used to indicate the parity of the result, i.e. when the lower
order 8-bits of the result contains even number of 1’s, then the Parity Flag is set. For
odd number of 1’s, the Parity Flag is reset.
• Zero flag − This flag is set to 1 when the result of arithmetic or logical operation is
zero else it is set to 0.
• Sign flag − This flag holds the sign of the result, i.e. when the result of the operation
is negative, then the sign flag is set to 1 else set to 0.
UNIT 02
Ans : When the instructions are executed in 8086 ,it performs on the
specified data i.e. Operand . the operand may me resides in the one of the
internal register of the microprocessor, may be stored at an address in
memory, to access this different types of operand, the 8086 is provided with
various Addressing Modes. Addressing modes indicates a way of locating data
or operands. The addressing modes are classified into basic three types :
1) Register operand addressing
2) Immediate operand addressing
3) Memory operand addressing
3)XALT :
This instruction converts the content of the AL registers into a
number stored in a memory table. This instruction performs the direct table
lookup techniques, which is often used to convert one code to another .An
XLAT instruction first adds the content of AL to BX to form a memory
address within the data segment . It copies the content of this address into
AL. This is the only instruction that adds the 8-bit number to a 16-bit
number.
Syntax : XLAT
Example : Suppose a translation table resides at address 2000H (contents
of BX registers ) and AL=05H and DS=4000H then the working of XLAT
instruction will check the memory location of the address DS * 10H + BX +
AL i.e. 42005H which contains 8AH then the AL=8AH.
4)DAA :
Sometimes we need to add decimal numbers together and assumes
results as decimal , but processor solves numbers treating as a hexadecimal
numbers so it is not always possible to get correct decimal result after addition
. For example we want to add 23 and 18, processor will treat these numbers as
hexadecimal numbers and gives answer 3BH , which is not correct answer form
our respect , so DAA instruction is able to correct this instruction adjust only
lower byte of AX. This instruction internally performs following steps :
Steps1: Check lower nibble of AL ;
If it is greater than 9,
Add 6 to this nibble . Auxiliary carry will be set.
Else
No change . Auxiliary carry will be clear.
Step 2 : Check upper nibble of AL :
If it is greater than 9,
Add 6 to upper nibble with Auxiliary carry
Else
Add upper nibble with Auxiliary carry.
Syntax : DAA
Example : ADD AL , BL
DAA
5) ADC :
The operation of ADC is similar to ADD .However , in addition to
the source operand the processor also add contents of the carry flag . The ADC
is commonly used to add multi-bytes together , basically more than storage
capacity. Destination = Destination + Source + Carry
Syntax : ADC Destination, Source
Example : Suppose we want to perform 32-bit operation , but we have 16-bit
register in 8086,so we can store only 16-bit in any register. Consider AX store
lower 16-bit number AC59H . Now add the contents of AX register with 9678H ,
which will give result 42D1H and carry flag will be set
Now , our aim is to add upper 16-bit numbers (7654H + 24447H)
and we have to add carry too these numbers to get correct result. This
operation can not be performed by simple ADD instruction , so we need a new
instruction which will add the operands as well as carry , hence this instruction.
6) SUB :
This instruction is used to subtract 8-bit(byte) or 16-bit (word)
operands together. If source operand is larger than the destination operand ,
the resulting borrow is indicating by setting carry flag.
Syntax : SUB Destination , Source
Example : SUB AX , BX
If AX=1234H and BX= 4321H the after the execution of instruction
the AX will be CF13H and carry flag will be set to indicate borrow was taken.
7) IMUL :
This instruction is similar to MUL expert that operands are
assumed to be a signed numbers. The source operand specified in the
instruction is multiplied by accumulator , if source is 8-bit it multiplies with AL
and result is placed into AX register. If source is 16-bit then it multiplies with Ax
register and result is placed into DX : Ax registers
Syntax : IMUL Source
Example : IMUL BL If AL =80H and BL=20H, The content of AL will be treated as
signed number which is 2’s complement of (128)10 which is -128 * 32 then
multiplication of these numbers is -4096 , the 2’s complement of this number
is F000H . So finally AX will be F000H.
8) LDS / LES :
These instruction are used to load two 16-bit registers
from a 4-byte block of memory . The first two bytes are copied into destination
registers and the next two bytes are copied into corresponding segment
registers DS / ES . These instruction are useful when we want to load segment
and offset value by using single instruction. Usually in string instruction we use
the instruction to load source string address (DS:SI) and destination string
address (ES:DI) using single instruction
Syntax : LDS / LES Destination , Source
Example : LEA SI , EA When executed it loads the SI register with the offset
address value. The value of this address is represented by the effective address
EA. The value of effective address can be specified by any valid addressing
mode. For instance , if the value in DI equals 1000H and that in BX is 20H , then
executing the instruction
LEA SI , [DI + BX + 5H]
Will load SI with the value (SI)= 1025H
9) XCHG :
This instruction is used to swap the data . After executing this
instruction destination and source will swap .
Syntax : XCHG Destination , Source
Example : XCHG AL , BL If AL = 34H and BL= 76H then after execution AL will be
76H and BL=34H.
10) IN :
Processor has a separate I/O space from its memory space . among
them 65536 I/O ports available for the programmer to use.
These ports can be access directly , using the ports address , for 65536
ports address in 0000H to FFFFH , the input port is actually a hardware device
connected to the processor’s port . The 8086 allows two different forms of the
IN instruction. A fyll 16-bit ports address must be loaded into DX register and
instruction like IN Al , DX or IN AX , DX may be used to read the input port . If
the port number is in between 00H to FFH then another form of IN instruction
may be used as In AL , 86H or IN AX , 80H.
Syntax : IN accumulator , port
Example : If we want to read input 80 H then we may give instruction like
IN AL , 08 H or MOV DX , 80H
IN AL , DX
3] Explain Instruction format of 8086.
Ans :
•A machine language instruction format has one or more number of fields
associated
with it.
•The first field is called as operation code field or op-code field, which
indicates the
type of operation to be performed by the CPU
•The instruction format also contains other fields known as operand fields
•The CPU executes the instruction using the information which reside in these
fields
•There are six general formats of instructions in 8086 instruction set.
•The length of an instruction may vary from 1 byte to 6 bytes. The instruction
formats
are described as follows
1] One Byte Instruction:
•This format is only one byte long and may have the implied data or register
operands.
•The least significant 3-bits of the opcode are used for specifying the register
operand, if any
•Otherwise, all the 8 bits form an opcode and the operands are implied
2] Register to Register:
•This format is 2 bytes long
•The first byte of the code specifies the operation code and width of the
operand specified by ‘w’ bit.
•The second byte of the code shows the register operands and R/M field, as
shown below:
•The register represented by the REG field is one of the operands.
•The R/M field specifies another register or memory location i.e. the other
operand.
•The MOD field shows the mode of addressing. The MOD, R/M, REG and the
‘W’ fields are decided in Table 2.2.
4] Register to/from Memory with Displacement:
•This type of instruction format contains 1 or 2 additional bytes for
displacement along with 2 byte format of the register to/from memory
without displacement. The format is as shown below.
Subtraction :
1] SUB : This instruction is used to subtract two operand representing in an
form of addressing modes .
e.g. SUB AX , BX
2] SBB : After performing the subtraction of the if the borrow is taken then the
carry flag is set . So, the content of carry flag are also subtracted from the
result.
e.g. SBB AL , BL
3] DEC : The decrease the operand by 1 .
e.g. DEC AL
4] AAS : After performing the subtraction of the ascii values the result is adjust
by ascii to get the required output. This instruction is used after SUB
instruction.
e.g. SUB AL , BL
AAS
5] DAS : The instruction is performed on the packed BCD numbers after
performing operation the result is adjust with the decimal. It is used after SUB
instruction.
e.g. SUB AL , BL
DAS
6] NEG : The operand is convert to its 2’s complement
e.g. NEG AL
Multiplication / Division :
1] MUL : It multiplies the two unsigned integer values, one of the operand
always resides in the AX register.
e.g. MUL BL
2] IMUL : It multiplies the two signed integer values, one of the operand always
resides in the AX register.
e.g. IMUL BL
3] AAM : It adjust the AX register for multiplication
4] DIV : 1] MUL : It divide the two unsigned integer values, one of the operand
always resides in the AX register.
e.g. DIV BL
5] IDIV : It divides the two signed integer values, one of the operand always
resides in the AX register.
e.g. IDIV BL
6] AAD : It adjust the AX register for division.
7] CBW : It convert the Byte value to the Word value i.e. 8-bit to 16-bit
8] CWD : It convert the word to the double word i.e. 16-bit to 32-bit
e.g. MOV AL , 0A1H
CBW
CWD
5] Assume that (AX)=001016 , (BX)=010016 and (DS)=100016,
What happens if XLAT instruction is executed?
Ans : Given,
(AX) = 001016
(BX) = 010016
(DS) = 100016
Hence lookup table resides at DS x 10 i.e. 10000H
+ BX 0100H
10100H
So the lookup table is at the address 10100H . The value of the AL=10H.The
data from the memory location will transfer to the AL register.
6] Assume that (AX)=110016 , (BX)=0ABC16. What is the
result of executing instruction ADD AX,BX?
Ans :
Given,
(AX)= 110016
(BX)= 0ABC16
Instruction : ADD AX, BX
The content of register AX and BX are added and the result is stored in the AX
register
(AX) = 110016 = 0001000100000002
ADD
(BX) = 0ABC16 =0000101010111100 2
(AX) =1BBC 16= 00011011101111002
Hence after executing the instruction the result stored in the AX is 1BBC16.
7] Write a program to add 8-bit data at offset 0400H in
3000H segments to another 8-bit data available at 0500H
offset in the same segment and store the result at 0700H
in the same segment.
Ans :
MOV AX , 3000H ; Move the data 3000H into AX register
MOV DS , AX ; The content of AX i.e. 3000H is move to DS
The above two instruction establish the Data Segment and set segment
address to 3000H.
0A 00490H
9C 00491H
B2 00492H
78 00493H
A B F=AB
0 0 0
0 1 0
1 0 0
1 1 1
2.OR
A B F=AB
0 0 0
0 1 1
1 0 1
1 1 1
3.NOT
A F=A
0 1
1 0
4.XOR
A B F=AB
0 0 0
0 1 1
1 0 1
1 1 0
DESTINATION COUNT
Register 1
Register CL
Memory 1
Memory CL
Example:
Example:
Register Register
Register Memory
Memory Register
Register Immediate
Memory Immediate
Accumlater Immediate
Example:
Syntax: JMP
procedure_namememory_location
Example: JMP short target
2) Conditional Jumps
In these types of instructions, the processor must check for the
particular condition. If it is true, then only the jump takes place
else the normal flow in the execution of the statements is
maintained.
The ALU operations set flags in the status word (Flag register).
The conditional jump statements tests the flag and jump is the
flag is set.
There are following types of conditional jump instructions:
It checks whether the carry flag is set or not. If yes, then jump
takes place, that is: If CF = 1, then jump.
It checks whether the zero flag is set or not. If yes, then jump
takes place, that is: If ZF = 1, then jump.
iv) JNE / JNZ : Stands for 'Jump if Not Equal' or 'Jump if Not
Zero'
It checks whether the zero flag is reset or not. If yes, then jump
takes place, that is: If ZF = 0, then jump.
v) JP / JPE : Stands for 'Jump if Parity' or 'Jump if Even Parity'
It checks whether the Parity flag is set or not. If yes, then jump
takes place, that is: If PF = 1, then jump.
vi) JNP / JPO : Stands for 'Jump if Not Parity' or 'Jump if Odd
Parity'
<BODY OF MACRO>
ENDM
PPP MACRO
MOV AH,9 (display string fuction )
INT 21H (DOS CELL)
Recursion :
A recursive procedure is one that calls itself. There are two
kind of recursion: direct and indirect. In direct recursion,
the procedure calls itself and in indirect recursion, the first
procedure calls a second procedure, which in turn calls the
first procedure.
Care has to be taken to assure that each successive call
does not destroy the
parameters and results generated by the previous call .
This means that each call must store its set of
parameters, registers and allthe temporary results.
The data stored by an application of a procedure is called a
frame.
Example:
1. Factorial
2. Non-recursive way
3. Factorial (N) = N x (N-1) x (N-2)x...x3x2x1
4. Recursive Way:
5. Factorial (N) = N x Factorial (N-1)
UNIT-4
Subroutines & Macros
Q.1] What is stack? How stack is implemented in memory?
Explain stack related instruction.
Ans:
The Stack: Sometimes it is necessary to save the contents of a
register during execution so that it can be used for the
purposes.For this purpose microprocessor has a area of
memory where the contents of specified registers or memory
location can be saved temporary and this area of memory is
called the stack.
Implementation of stack in memory : The stack is a block of
memory that may be used for storing the contents of the CPU
registers temporarily. The stack is a block of memory locations,
which is accessed using the SP and SS registers.In other words,
it is a top-town data structure whose elements are accessed
using a pointer that is implemented using the SP and SS
registers.
As we go on storing the data words into the stack,the
pointer goes on decrementing and on the other hand,the
pointer goes on incrementing as we go on retrieving the word
data.
The process of storing the data in the stack is called “Pushing
into” the stack and the reverse process is known as “Popping
off” the stack for each such process,the stack pointer (SP) is
decremented or incremented by two.
The stack is essentially last-in-first-out (LIFO) data segment.This
means that the data,which is pushed into the stack last,will be
on top of stack and will be popped off stack first.
Stack Related Instructions:
1) PUSH(Push Word Onto Stack)
Syntax: PUSH Source
Purpose: It is often necessary to save the contents of a register
so that it can be used for other purposes.This instruction
pushes the contents of the specified register/memory location
onto the special area of memory called stack.
This special area is pointed by SS (Stack segment) register as
segment address and SP (Stack Ponter) register as offset
value,whenever data is pushed into the stack SP is
decremented by two automatically.The higher byte is pushed
first and then the lower byte,allowed operands.
Operands
Register
Seg-Reg
Memory
2]POP(Pop Data off Stack)
Syntax: POP Destination
Purpose: The POP instruction is used to perform the reserve
working of PUSH instruction. Again Sp(Stack Pointer) plays main
role. The 16-bit data from stack where SP is currently pointing
copy to the destination and SP is automatically incremented by
2.
3]PUSHF(Push 16-bit flag onto stack)
Syntax: PUSHF
Purpose: Some time it is necessary to save the contents of the
flag register during execution.Usually this is done whenever the
processor is interrupted.PUSHF instruction pushes the lower
16-bit of the flag register onto the stack and SP is decremented
by two.
4]POPF(Pop 16-bit flags off stack)
Syntax: POPF
Purpose: This instruction is reserve of PUSHF
instruction,popping 16-bits off the stack and storing them in
the flag register.The SP will incremented by 2 (POPF) after the
execution.
Q.2] Explain subroutine.What is the difference between
Subroutine and Macro?
Ans:
Subroutine: A subroutine is a special segment of program
that can be called for execution from any point in a program.
1)In computers, a subroutine is a sequence of program
instructions that perform a specific task, packaged as a unit.
This unit can then be used in programs wherever that particular
task have to be performed.
2)A subroutine is often coded so that it can be started (called)
several times and from several places during one execution of
the program, including from other subroutines, and then
branch back (return) to the next instruction after the call, once
the subroutine’s task is done. It is implemented by using Call
and Return instructions.
3)The subroutine is written to provide a function that must be
performed at various points in the main program.Instead of
including this piece of code in the main program each time the
function needed, it is put into the program just once as a
subroutine. An assembly language subroutine is also reffered to
as a procedure.
4)The instructions provided to transfer control from the main
program to a subroutine and return control back to the main
program are called subroutine-handling instructions.
The different types of subroutine instructions are:
• CALL and RET Instructions: There are two basic instructions
in the instruction set of 8086 for subroutine handling: the
call(CALL) and return (RET) instructions together they
provide the mechanism for calling a subroutine into
operation and returning control back to the main program
at its completion .
1) Just like the JMP instruction,CALL allows implementation
of two types of operations: the intrasegment call and the
intersegment call.
2)Every subroutine must end by executing an instruction that
returns control to the main program.This is the return (RET)
instruction.
Difference Between Subroutine and Macro:
Subroutine Macro
Subroutine are called by CALL In case of macro the
instruction and control is complete code of instruction
transfer to subroutine where is inserted at each place
it is called. where the macro.
Subroutine is called the Macro does not utilize the
return address i.e. CS:IP is surface of the stack.
pushed into the stack.
The executable code in the The executable cod ein the
case of subroutine is not case of macro becomes
lengthy as compared to lengthy as compare to
macro. subroutine.
Subroutine requires more Macro requires less time for
time for execution as execution as compared to
compared to macro. subroutine.
The program using The program using macro
subroutine requires less requires more memory space
memory space for execution for execution.
as compare to macro.
Q.3] What is macro? Explain nested macro with example.
Ans:
Macro: A macro is a group of instructions that perform one
task,just as a procedure performs a task.The difference is that a
procedure is accessed via a CALL instruction,while a macro is
inserted in the program at the point of usage as a new
sequence of instructions.Creating a macro is very similar to
creating a new opcode that can be used in the program.Macro
sequencences execute faster than procedures because there is
no CALL and RET instructions to execute.The macro instructions
are placed in your program by the assembler at the point where
they are invoked.
The code that is to be repeated is called the prototype
code,and the prototype code along with the statements for
referencing and terminating it is called the macro definition.
Included in the first statement of a macro definition is the
macro’s name.The propcedure for using a macro is to give
macro definition and then cause the macro to be inserted at
various points within a program by placing a statement that
includes the macro’s name at these points.These statements
are known as macro calls.When a macro call is encountered by
the assembler,the assembler replaces the call with the macro’s
code.This replacement action is reffered to as macro expansion.
Nested Macro: It is possible for a macro call to appear within a
macro definition.This is referred to as macro nesting and has
the limitation that all macros included in the definition of a
given macro must be defined before the given macro is called.
Example:
Write a program to compute (diff1-diff2)2.
Solution: DIF MACROVAR1,VAR2
MOV AX,VAR1
SUBAX,VAR2
ENDM
The first macro finds the difference.
:The second macro calls the first and computes the difference
square.
Interrupt mechanism:-
-The dictionary meaning of the word interrupt is to break the sequence of operation.
While the CPU is executing the program, an interrupt breaks the normal sequence
of execution of instructions diverts its execution to some other program called
interrupt service routine(ISR). After executive ISR, the control is transferred back
to main program which was being executed at the time of interruption.
-Interrupt is the method of creating a temporary halt during program execution and
allows peripheral devices to access the microprocessor. The microprocessor
responds to that interrupt with an ISR (Interrupt Service Routine), which is a short
program to instruct the microprocessor on how to handle the interrupt.
Hardware Interrupts
-The 8086 has two hardware interrupt pins, i.e. NMI and INTR. NMI is a non-
maskable interrupt and INTR is a maskable interrupt having lower priority. One
more interrupt pin associated is INTA called interrupt acknowledge.
NMI
-It is a single non-maskable interrupt pin (NMI) having higher priority than the
maskable interrupt request pin (INTR)and it is of type 2 interrupt.The NMI is open
used for parity errors and other major system for such as power failure.
INTR
Software Interrupts
INT
- Interrupt instruction with type number.It is 2-byte instruction. First byte provides
the op-code and the second byte provides the interrupt type number. There are 256
interrupt are available.
Interrupts priority
-hardware, software, and internal interrupts are serviced on a priority basis. Priority
is achieved into ways. First, the interrupt processing sequence implemented in the
8086 tests for the occurrence of the various groups based on the hierarchy shown
in table.Thus, we see that internal interrupts are the highest-priority group, and
external hardware interrupts are the lowest- priority group. Second, each of the
interrupts is given a different priority level by assigning it a type number. Type 0
identify the highest priority interrupt, and type 225 identifies the lowest- priority
interrupt.
Interrupt Priority
Reset Highest
Internal interrupts
Software interrupts
NMI
-Actually,a few of the type numbers are not available for use with software or
hardware interrupts. This is because they are reserved for special interrupt function
of the 8086, such as internal interrupts. For instance, within the internal interrupt
group, the interrupt known as divide error is a sign to type number 0. therefore it
has the highest priority of the internal interrupts. Another internal interrupt called
overflow is a signed the type number 4. Overflow is the lowest priority internal
interrupt.
-The importance of interrupt lies in the fact that, even interrupt-service routine has
been initiated to perform a function a sign to a specific priority level, only devices
with higher priority are allowed to interrupt the active service routine. Lower
priority devices will have to wait until the current routine is completed before their
request for service can be acknowledged. For hardware interrupts this priority
scheme is implemented in external hardware. For this reason, the user normally
assigns task that must not be interrupted frequently to higher-priority levels and
those that can be interrupted a lower-priority levels.
Following figure shows the organization of IVT and associated vector assignment.
-All types of interrupts whether hardware or software generated points to the single
entry in the processor interrupt vector table. The interrupt vector table is located in
the first 1024 bytes of the memory and address 00000H to 003FFH. It contains 256
different 4 byte interrupt vectors.
-An interrupt vector contains the address of the interrupt service routines(ISR) of
that interrupt. These table is a collection of 4 byte addresses that indicates where
the processor should jump to execute the associated interrupt service routine.
Because 256 types of inter types supported in real mode the IVT is 1024 bytes its
long.This 1KB memory block is reserved for the table is located in the address
range 00000H to 003FFH.
4)Explain operation of interrupt instructions?
-When this instruction executes the 8086 enters and idol condition in which it is
doing no processing.The 8086 will stay in this idle state until the 8086TEST input
pin is made low or until an interrupt signal is received on the INTR or the NMl
interrupt input pins. If a valid interrupt occurs while the 8086 is in this idle state
the 8086 will return to the idle state after the interrupt service procedure executes.
It returns to the idle state because the address of the WAIT instruction is the
address pushed on the stack when the 8086 respond to the interrupt request. WAIT
effects no flags. The WAIT instruction is used to synchronize the 8086 with
external hardware such as the 8087 maths cooperation.
-The HLT instruction will cause the 8086 to stop fetching and executing
instruction. The 8086 will enter a halt state. The only ways to get the processor out
of the heart state are with an interrupt signal on the INTR pin, an interrupt signal
on the NMI pin, or a reset signal on the RESET input.
5. INT n:-
-The INT n instruction calls the interrupt service routine that begins at the address
represented in vector number n. for example an INT 80H
So 00200H call the interrupt service routine whose address is store in vector type
number 00200H-00203H.
6. INTO (Interrupt Overflow):-
-The INTO instruction checks the overflow flag. If 0F = 1, the INTO instruction
cause the procedure whose address is stored in IVT in vector type-4. If 0F = 0 the
INTO instruction performs no operation and the next sequential instruction in the
program executed.
-The IRET instruction is a special return instruction used to return for both
software and hardware interrupts. The IRET instruction is much like a normal FAR
RET, because it retrieves the address from the stack. An IRET instruction removes
six bytes from the stack: two for IP, two for the CS, and two for the flags.
5) Draw and explain the external hardware interrupt interface signals in minimum
mode interrupt interface?
-Here we see that it includes the multiplexed address/data bus and dedicated
interrupt signal lines INTR and INTA. We also see that external circuitry is
required to interface the interrupt inputs, INT32 through INT 255, to the 8086's
interrupt interface.This interface circuitry must identify which of the pending
activity interrupts has the highest priority and then pass its type number to the
microprocessor.
-In this circuit we see that the key interrupt interface signals are the interrupt
request and interrupt acknowledgement. The input at the INTR line signals the
8086 that and external device is requesting service. The 8086 samples this input
during the last clock period of each instruction execution cycle. Logic 1 represents
and active interrupt request.INTR is level triggered therefore eats active 1level
must be maintained until tested by the 8086.
-If it is not maintain the request for service may not be recognized moreover the
logic 1 at I NTR must be removed before the service router runs to completion
otherwise the same inter of make it acknowledged a second time.
-When an interrupt request has been recognized by the 8086 its signals this fact to
external circuitry. It does this with false to logic 0 at its interrupt acknowledgement
output. Actually there are two pulses produced at interrupt acknowledgement
during the interrupt acknowledgement bus cycle. The first poles signals external
circuitry that the interrupt request has been acknowledged and to prepare to send
its type number to the 8086. The second poles tales the external circuitry to put the
type number on the data bus.
-The lower eight lines of the address/data bus AD0 through AD7, are also part of
the interrupt interface.During the second cycle in the interrupt acknowledged bus
cycle, external circuitry must put an 8-bit type number on bus lines AD0 through
AD7. The 8086 reads this number off the Boss 2 identify which external device is
requesting service. It uses the type number to generate the address of the interrupts
vector in the pointer table and to read the new values of CS and IP into the
corresponding internal registers. CS and IP values from the interrupt vector table
are transferred to the 8086 over the data bus. Before loading CS and IP with new
value, their old values and the values of the internal flags are automatically pushed
to the stack part of memory.
6)Draw and explain the external hardware interrupt interface signals in minimum
mod interrupt interface.
-Figure shows the maximum mod interrupt interface of the 8086 microprocessor.
The primary difference between this interrupt interface and that for the minimum
mode is that the 8288 bus bus controller has been added.In the minimum more
system it is the bus controller that produces the interrupt acknowledgement and
ALE signals. Whenever the 8086 outputs and interrupt acknowledgement bus
status code the 8288 generates pulses at it's interrupt acknowledgement output to
signal external circuitry that the 8086 has acknowledged an interrupt request.
-Second change in figure is that 8086 provides a new signal for the interrupt
interface. These output labeled block is called the bus priority LOCK signal.
LOCK is applied as an input to a bus arbiter. In response to this signal the
arbitration logic insurance that no other device can take over control of the system
bus until the interrupt acknowledge the cycle is complete.
8) Explain with the help of a flowchart interrupt processing sequence of the 8086
microprocessor?
1. Get vector number: first step is to obtain interrupt number there are three
possible ways for getting this number are:
The interrupt number maybe specified directly one of the INT instruction,
like INT 21H gives the interrupt number 21H.
The processor may automatically generated the number, as it does for INTO,
NMI, and divided error.
It may have to read the interrupt number from the databus, after receiving
INTR.
Once the interrupt number is obtained this number is used to locate a location in
the IVT by multiplying the number with 4. then IVT gives address of ISR.
3.Fetch new instruction pointer: what's the return address has been used
processor can fetch the new value of IP and CS out of the IVT and begin execution
of the ISR.
Fig. Flowchart
4. Return from ISR: Once interrupt service is over, the last instruction of the ISR
which is IRET, return the pointer to main program. IRET is similar of RET
instruction of procedure. RET instruction POPs return address out of stack, while
IRET instruction POPs return address as well as flag contents too. As RET is the
last Statement of the procedure similar IRET is the last Statement of the ISR.
9) Explain internal interrupt functions of 8086?
1. Divide-Error(Type-0 or INT 0)
Mov BL,0
DIV BL
These two lines code will generate type-0 interrupt.Processor will found ISR
address from IVT and after execution of ISR control will transfer to the next
instruction.
This interrupt relies on the setting of the trace flag in the flag register. When the
trace flag is said the 8086 will generate a type 1 interrupt after each instruction
executes. This single step debugger maybe perform to display the contents of each
processor register, the state of the flag, and other useful information after execution
of each instruction in the user program. Assume that the trace flag is set and trace
ISR are display the contents of AX register then following code will display the
contents of AX register after each step.
-The non maskable interrupt is another interrupt that is initiated from external
hardware. However it differs from the other external hardware interrupts in several
ways. First as its name implies it cannot be masked out with the interrupt flag.
Second request for service by this interrupt are signaled to the 8086
microprocessor by applying logic 1at the NMI input, not the INTR input. Third,
the NMI input is positive edge triggered. Therefore, a request for service is
automatically latched internal to the MPU.
-Because NMI can never be ignored by the processor, it finds useful application.
One of them data saving on power fails. We know processor unfortunately forgets
the contents of its registers and flags when power is turned off and thus has no
chance of getting back to the correct place in a program if its power is interrupted.
One way to prevent these from happening and provide a way for the processor to
resume execution is to use NMI to interrupt at the beginning of power failure.
Because computers power supply will continue to supply a stable voltage for a few
microseconds after it loses AC, the processor has plenty of time to execute the
necessary instructions. Suppose that a certain system contains a small amount of
non volatile memory. So in the event of power fail the NMI ISR should store the
content of each processor register in the NVM. These values can then be reloaded
when power comes backup.In this fashion we can recover from a power fail
without loose of intelligence.
-Whenever this interrupt occurs processor generate type 2 interrupt and fetches the
ISR address from the memory location 00008H through 0000BH.
These interrupt is used for debugging purpose in the programming. The working of
these interrupt is as follows. A program being debugged will have the first byte of
one of its instructions replaced by the code for breakpoint.
When the processor gets to this instruction it will generate a type 3 interrupt.The
ISR associated with break point is similar to the trace ISR and should be capable of
displaying the contents of processor register and also the address at which the
breakpoint byte with the original first byte of the instruction.
When ever this interrupt occurs processor generated type-3 interrupt and fetches
the ISR address from the memory location 0000CH through 0000FH.
This type-4 interrupt is initiated only when the INTO instruction is executed with
the overflow flag is set.If the overflow flag is cleared, INTO will not generate an
interrupt.
For example:
ADD AL, BL
INTO
In procedure call only return address is ISR call processor is always called
pushed into the stack,this address may directly while ISR is always called
be one word long. indirectly through IVT
-There are two types of interrupts: software interrupts and hardware interrupts.
Software interrupts are generated by the software instructions like INT and
interrupt number.
For example: INT 21H will generate interrupt of type 21H. INTO will generate
overflow interrupt. BOUND generates a type-5 interrupt. Hardware interrupts are
generated by hardware pins. As NMI and INTR pins are available to generate these
interrupts. One extra pin INTA gives interrupt acknowledgement.
Solution:-
PUSH BX
PUSH DI
Mov BL,7
IMUL BL
JLE EXIT
PUSH AX
POP AX
EXIT: POP DI
POP BX
IRET
14) Show the map of IVT, Stack if an instruction INT 21H is executed, assuming
that following values: SS=1000H, SP=0200H, CS= 2000H, IP=1234H.
Flags=3456H; address of ISR 21 IS 3000H:5678H.
2.IVT address for INT 21H is 00084H and 00085H for IP and 00086H and 00087H
for CS.
3.Processor pushes the contents return address CS:IP onto the stack.
Definition:=>(INTERNET OF THINGS)
• The term IoT (Internet of Things) was coined by Kevin Ashton in 1999. It is referred to as
a network comprised of interconnected physical objects (referred to as "things")
worldwide that are capable of collecting and exchanging data without human
interaction.
• These devices contain embedded systems (software, electronics, networks, and sensors)
that are able to collect data about the surrounding environment, transmit data over a
network, respond to remote commands, or take actions based on data collected.
• There are many IoT devices or things available today, including wearables, implants,
vehicles, machinery, smartphones, appliances, computing systems, or any other item that
can send and receive data.
• Cloud-based storage and computing, Cyber-Physical Systems, and big data networks
can all be integrated with IoT. The IoT primarily focuses on expanding internet
connectivity from standard devices (such as computers, mobile phones, or tablets) to
relatively dumb ones like toasters.
• It turns old "dumb" devices into "smart" ones by making them able to transmit data over
the internet, facilitating communication with people and other IoT-enabled devices.
• Interconnectivity: With regard to the IoT, anything can be interconnected with the
global information and communication infrastructure.
• Dynamic changes: The state of devices change dynamically, e.g., sleeping and waking
up, connected and/or disconnected as well as the context of devices including location
and speed. Moreover, the number of devices can change dynamically.
• Enormous scale: The number of devices that need to be managed and that
communicate with each other will be at least an order of magnitude larger than the
devices connected to the current Internet. Even more critical will be the management
of the data generated and their interpretation for application purposes. This relates to
semantics of data, as well as efficient data handling.
• Safety: As we gain benefits from the IoT, we must not forget about safety. As both the
creators and recipients of the IoT, we must design for safety. This includes the safety of
our personal data and the safety of our physical well-being. Securing the endpoints, the
networks, and the data moving across all of it means creating a security paradigm that
will scale.
1. Connectivity Layer-
This layer includes all the physical devices involved in the framework and the
interconnection among them. Future internet largely depends on the unification of these
common objects found everywhere near us and these should be distinctly identifiable and
controllable.
This layer also involves assigning of low range networking devices like sensors, actuators,
RFID tags etc and resource management checks the availability of physical resources of all
the devices and networks involved in the underlying infrastructure. These devices contain
very limited resources and resource management ensures the maximum utilization with
little overhead. It also allows sharing and distribution of information among multiple
networks or single network divided into multiple domains.
2. Access Layer-
• Context Data will be reached to internet via IoT Gateway as captured by short range
devices in form of raw data. Access layer comprises topology definition, network
initiation, creation of domains etc. This layer also includes connection setup, intra-inter
domain communication, scheduling, packet transmissions between flow-sensors and
IoT gateway. The simulation was run later in this paper for different scenario based on
this layer. Feature management contains a feature filter which accepts only acceptable
context data and redundant data are rejected. Large number of sensor maintains lots
of features but only a small subset of features is useful generate a context data.
• Feature filter helps to reduce irrelevant data transmission, increases the data transfer
rate of useful data and reduce energy and CPU consumption too. Number of features
can be different based on the application requirements and context data types.
3. Abstraction Layer-
• One of the most important characteristics of OpenFlow is to add virtual layers with the
preset layers, leaving the established infrastructure unchanged. A virtual link can be
created among different networks and a common platform can be developed for
various communication systems. The system is fully a centralized system from physical
layer viewpoint but a distribution of service (flow visor could be utilized) could be
maintained. One central system can monitor, control all sorts of traffics. It can help to
achieve better band-width, reliability, robust routing, etc. which will lead to a better
Quality of Services (QoS).
• In a multi-hopping scenario packets are transferred via some adjacent nodes. So, nodes
near to access points bears too much load in comparison to distant nodes in a
downstream scenario and inactivity of these important nodes may cause the network
to be collapsed. Virtual presence of sensor nodes can solve the problem where we can
create a virtual link between two sensor networks through access point negotiation.
So, we can design a three a three layer platform, where common platform and
virtualization layer are newly added with established infrastructure. Sensors need not
to be worried about reach-ability or their placement even in harsh areas. Packet could
be sent to any nodes even if it is sited on different networks.
4. Service Layer-
• Storage management bears the idea about all sorts of unfamiliar and/or important
technologies and information which can turn the system scalable and efficient. It is not
only responsible for storing data but also to provide security along with it. It also allows
accessing data effectively; integrating data to enhance service intelligence, analysis
based on the services required and most importantly increases the storage efficiency.
Storage and management layer involves data storage & system supervision, software
services and business management & operations. Though they are included in one
layer, the business support system resides slightly above of cloud computing service
whereas Open-Flow is placed below of it as presented to include virtualizations and
monitor management.
• Service management combines the required services with organizational solutions and
thusnewgeneration user service becomes simplified. These forthcoming services are nec
essitated to be co-interrelated and combined in order to meet the demand socio- economic
factors such as environment analysis, safety measurement, climate management,
agriculture modernization etc.
What are logical Design ?
:=> Logical design of IOT-
1. Plug and Play Integration
• If we look at IoT-related technology available today, there is a huge heterogeneity. It
is typically deployed for very specific purposes and the configure requires significant
technical knowledge and may be cumbersome. To achieve a true Internet of Things we
need to move away from such small- scale, vertical application silos, towards a
horizontal infrastructure on which a variety of applications can run simultaneously. This
is only possible if connecting a thing to the Internet of Things becomes as simple as
plugging it in and switching it on. Such plug and play functionality requires an
infrastructure that supports it, starting from the networking level and going beyond it
to the application level. This is closely related to the aspects discussed in the section on
autonomy.
• On the networking level, the plug & play functionality has to enable the
communication, features like the ones provided by IPv6 are in the directions to help in
this process. Suitable infrastructure components have then to be discovered to enable
the integration into the Internet of Things. This includes announcing the functionalities
provided, such as what can be sensed or what can be actuated.
3. Semantic Modeling of Things-To reach the full potential of the Internet of Things, semantic
information regarding the things, the information they can provide or the actuations they can
perform need to be available. It is not sufficient to know that there is a temperature sensor or
an electric motor, but it is important to know which temperature the sensor measures: the
indoor temperature of a room or the temperature of the fridge, and that the electric motor
can open or close the blinds or move something to a different location. As it may not be
possible to provide such semantic information by simply switching on the thing, the
infrastructure should make adding it easy for users. Also, it may be possible to derive semantic
information, given some basic information and additional knowledge, e.g. deriving information
about a room, based on the information that a certain sensor is located in the room. This
should be enabled by the infrastructure.
4. Physical Location and Position-As the Internet of Things is strongly rooted in the physical
world, the
notion of physical location and position are very important, especially for finding things,
but also for deriving knowledge. Therefore, the infrastructure has to support finding things
according to location (e.g. geo-location based discovery). Taking mobility into account,
localization technologies will play an important role for the Internet of Things and may
become embedded into the infrastructure of the Internet of Things.
5. Security and Privacy-In addition, an infrastructure needs to provide support for security
and privacy functions including identification, confidentiality, integrity, non-repudiation
authentication and authorization. Here the heterogeneity and the need for interoperability
among different ICT systems deployed in the infrastructure and the resource limitations of
IoT devices (e.g., Nano sensors) have to be taken into account.
patterns, Power Supply Controllers: Controller for AC-DC power supplies that
determines required energy, and improve energy efficiency with less energy waste for
power supplies related to computers, telecommunications, and consumer electronics
applications, Photovoltaic Installations: Monitoring and optimization of performance in
solar energy plants.
• IOsA (internet of smart agriculture)-Green Houses: Control micro-climate conditions
to maximize the production of fruits and vegetables and its quality, Compost: Control
of humidity and temperature levels in alfalfa, hay, straw, etc. to prevent fungus and
other microbial contaminants, Animal Farming/Tracking: Location and identification of
animals grazing in open pastures or location in big stables, Study of ventilation
and air quality in farms and detection of harmful gases from excrements, Offspring
Care: Control of growing conditions of the offspring in animal farms to ensure its
survival and health, field Monitoring: Reducing spoilage and crop waste with better
monitoring, accurate ongoing data obtaining, and management of the agriculture
fields, including better control of fertilizing, electricity and watering.
i.e. Application of IOT
Reference:
https://ijesc.org/upload/8e9af2eca2e1119b895544fd60c3b857.Internet%20of%20
Things-
IOT%20Definition,%20Characteristics,%20Architecture,%20Enabling%20Techn
ologies,%20Application%20&%20Future%20Challenges.pdf
https://www.interviewbit.com/iot-interview-questions/
https://vedveethi.co.in/eNote/IoT/CS-6005%20Unit%201%20-
%20Internet%20of%20Things.htm