Conversion of logical address and Physical address __ microcomputer principle

Source: Internet
Author: User

I have been learning 8086 recently, the class teacher suddenly asked this. For the problem "8086 CPU can provide 20-bit address information, can directly to 1M storage units to access, and the CPU can be used to provide address information registers are 16 bits, then how to use 16-bit registers to achieve 20-bit address addressing it" understand a lot.
About the logical address is allowed in the program in the address, 8086 of the logical address has a paragraph value and the offset within the paragraph two parts, the expression is "segment address: offset address within paragraph."

Conversion of logical and physical addresses. (Final Examination)
Previously said 20-bit address information can be accessed 1M memory units, that is, the address 00000h~fffffh, and the segment cs,ds,ss,es that store these addresses high 4 bits, such as 12345H, then a segment register will store 1234H high 4-bit information, which is the segment address.
The offset in the paragraph is the offset of the shift relative to the segment address.
The physical address is the 20-bit address information provided on the address bus select、read. Physical Address = segment Address *10h+ The offset address within the segment. Segment Address times 10H is because the segment address was taken high four digits, so after the restoration to let the segment address Left 4 digits (10H = 10000B), such as (cs) = 20a8h, (IP) = 2008H, then the physical address is 20a8h*10h+2008h = 22a88h.

Note: Segment address *16 (decimal) + offset address = Physical address.

My understanding: The Physical Address expression method is a hexadecimal *16 equivalent to moving the hexadecimal forward 1 bits,

FFFFF (10485575)/1024=1023kb (0~1023KB), "2 20 times equals 10485575/1024=1024KB"
1024KB is equal to 1MB, so the segment address is only to move one at the plus offset address, using the "segment Address: Offset Address" method can express 8086CPU index 1MB.

Italic is a reference.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.