How a 20 bit address is generated by a 16 bit address ? ? ?
How do I store a 20 bit address in a 16 bit register corresponding to 8086 microprocessors?
2 ANSWERS
20 bits cannot be stored in 16 bits. So to generate a 20 bit value, information from 2 registers need to be combined.
In 8086 this is done by adding the segment register value offset by 4 bits with value from another register
xxxx xxxx xxxx xxxx 0000
+ 0000 yyyy yyyy yyyyy yyyy
where x represents the bits in segment registers and y represents the bits in the other register.
In 8086 this is done by adding the segment register value offset by 4 bits with value from another register
xxxx xxxx xxxx xxxx 0000
+ 0000 yyyy yyyy yyyyy yyyy
where x represents the bits in segment registers and y represents the bits in the other register.
There is a notation we follow.
Physical Address
The 20 bit address which we needs to be stored.
It ranges from 00000H to FFFFFH (Hexadecimal notation) .
Base Address:
The address at which a given memory segment starts and we use it for de-markation.
Offset address
(Distance from the base address) is a location with 64 kb segment range. It ranges from 0000H to FFFFH
Logical address
Something we denote on paper as a short hand representation of the above addresses. It consists of a segment value and offset address.
Logical address is specified as Segment base : Offset value.
Physical address is obtained by shifting the segment address 4 bits to left adding the offset address.
ie.,
Physical address = ( Segment base*10H ) + Offset Value.
Ex: If we want to find the physical address of a given
Logical address: A4FBH:4872H
Segment's base address: A4FBH
Offset value: 4872H
Shifting the segment address 4 bits to left A4FBH<<4 a4fb0h="" br="" gives="" style="line-height: 1.4;">Now adding offset address to A4FB0H
We get:
A4FB0H
+
4872H
_____
A9822H
_____ 4>
Physical Address
The 20 bit address which we needs to be stored.
It ranges from 00000H to FFFFFH (Hexadecimal notation) .
Base Address:
The address at which a given memory segment starts and we use it for de-markation.
Offset address
(Distance from the base address) is a location with 64 kb segment range. It ranges from 0000H to FFFFH
Logical address
Something we denote on paper as a short hand representation of the above addresses. It consists of a segment value and offset address.
Logical address is specified as Segment base : Offset value.
Physical address is obtained by shifting the segment address 4 bits to left adding the offset address.
ie.,
Physical address = ( Segment base*10H ) + Offset Value.
Ex: If we want to find the physical address of a given
Logical address: A4FBH:4872H
Segment's base address: A4FBH
Offset value: 4872H
Shifting the segment address 4 bits to left A4FBH<<4 a4fb0h="" br="" gives="" style="line-height: 1.4;">Now adding offset address to A4FB0H
We get:
A4FB0H
+
4872H
_____
A9822H
_____ 4>
Write an answer
Comments
Post a Comment