Home Computer Tutorials Computer Knowledge Why does the 8086CPU have 20 address lines but the maximum addressable storage space is only 1MB?

Why does the 8086CPU have 20 address lines but the maximum addressable storage space is only 1MB?

Jan 19, 2024 pm 08:12 PM

Why does the 8086CPU have 20 address lines but the maximum addressable storage space is only 1MB?

The address lines of 8086CPU are 20, and the maximum addressable storage space is 1MB. Why is it

Answer: The addressing range of 8086 CPU is 1MB. This is because the 8086 CPU has 20 address lines, and 2^20 equals 1024KB, which is 1MB. However, in the 8086 system, instructions only provide 16-bit addresses, and the registers related to addressing are only 16 bits long. Therefore, the addressing range is only 64KB. In order to be able to address 1MB of memory space, the 8086 CPU divides the memory into four logical segments. When the CPU accesses memory, the contents of the segment register (segment base address) are automatically shifted left by 4 bits (in binary representation), and then added to the 16-bit address offset within the segment to form a 20-bit physical address.

In segmented structured memory, each logical address consists of a 16-bit segment base address and offset address.

Physical address: The absolute address of the memory, from 00000H~FFFFFH, is the actual addressing address of the CPU accessing the memory (also called the absolute address)

The 16-bit segment base address is shifted left by 4 bits (equivalent to adding 4 "0"s after the lowest bit of the segment base address), and is added to the offset address to obtain the physical address.

Physical address=segment base address*16 offset address

?

In segmented structured memory, each logical address consists of a 16-bit segment base address and offset address.

Physical address: The absolute address of the memory, from 00000H~FFFFFH, is the actual addressing address of the CPU accessing the memory (also called the absolute address)

The 16-bit segment base address is shifted left by 4 bits (equivalent to adding 4 "0"s after the lowest bit of the segment base address), and is added to the offset address to obtain the physical address.

Physical address=segment base address*16 offset address

12 Assembly language. 1. The maximum storage space allowed by 80868088CPU is

(1/2)Assembly language. 1. The maximum storage space allowed by 8086/8088 CPU is (1MB 65520), and its physical address number is from (00000) to (ffff0 ffff 1=10FFF0)H. 2. The hexadecimal number of decimal number -46 is expressed as (0FFD2h or 0D2H)

The hexadecimal representation of the decimal number 46 is 2EH

Microsoft Windows XP [Version 5.1.2600]

(C) Copyright 1985-2001 Microsoft Corp.

C:\Documents and Settings\Administrator>debug

-a

0AFE:0100 mov ax,2e

0AFE:0103 xor bx,bx

0AFE:0105 sub bx,ax

0AFE:0107

-t

AX=002E BX=0000 CX=0000 DX=0000 SP=FFEE BP=0000 SI=0000 DI=0000

DS=0AFE ES=0AFE SS=0AFE CS=0AFE IP=0103 NV UP EI PL NZ NA PO NC

0AFE:0103 31DB XOR BX,BX

-t

AX=002E BX=0000 CX=0000 DX=0000 SP=FFEE BP=0000 SI=0000 DI=0000

DS=0AFE ES=0AFE SS=0AFE CS=0AFE IP=0105 NV UP EI PL ZR NA PE NC

0AFE:0105 29C3 SUB BX,AX

-t

AX=002E BX=FFD2 CX=0000 DX=0000 SP=FFEE BP=0000 SI=0000 DI=0000

DS=0AFE ES=0AFE SS=0AFE CS=0AFE IP=0107 NV UP EI NG NZ AC PE CY

0AFE:0107 0029 ADD [BX DI],CH DS:FFD2=00

-

How many addressable spaces are there in the 8086 system? How big are each

Registers are 16-bit. For example, AX, BX, SI, and DI are all 16-bit. The address codes they can represent are only 16-bit. 2 to the 16th power is equal to 64K. This is the memory space that we as programmer can directly access through registers. The address bus provided by the 8086/8088 CPU has 20 bits, and 2 to the 20th power is equal to 1M. This is the maximum memory space that the CPU can access by itself.

There is a contradiction: the CPU can access 1M memory, but the register can only represent 64K memory size. Therefore, the concepts of segment address and offset address are introduced. Divide this 1M memory space into segments of 64K size, specify which segment, and then add an "offset address" at the beginning of this segment. Doesn't this allow you to access any space in 1M memory?

How to get the segment address:

For example, a character variable STR

is declared somewhere in the assembly data segment.

MOV DX,SEG STR

Through the SEG statement, the segment address of STR can be taken out and sent to DX.

I hope the above content will be helpful to you!

The above is the detailed content of Why does the 8086CPU have 20 address lines but the maximum addressable storage space is only 1MB?. For more information, please follow other related articles on the PHP Chinese website!

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Chat Commands and How to Use Them
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Discover How to Fix Drive Health Warning in Windows Settings Discover How to Fix Drive Health Warning in Windows Settings Mar 19, 2025 am 11:10 AM

What does the drive health warning in Windows Settings mean and what should you do when you receive the disk warning? Read this php.cn tutorial to get step-by-step instructions to cope with this situation.

How do I edit the Registry? (Warning: Use with caution!) How do I edit the Registry? (Warning: Use with caution!) Mar 21, 2025 pm 07:46 PM

Article discusses editing Windows Registry, precautions, backup methods, and potential issues from incorrect edits. Main issue: risks of system instability and data loss from improper changes.

How do I manage services in Windows? How do I manage services in Windows? Mar 21, 2025 pm 07:52 PM

Article discusses managing Windows services for system health, including starting, stopping, restarting services, and best practices for stability.

How to Fix the Steam Cloud Error? Try These Methods How to Fix the Steam Cloud Error? Try These Methods Apr 04, 2025 am 01:51 AM

The Steam Cloud error can be caused by many reasons. To play a game smoothly, you need to take some measures to remove this error before you launch the game. php.cn Software introduces some best ways as well as more useful information in this post.

How do I change the default app for a file type? How do I change the default app for a file type? Mar 21, 2025 pm 07:48 PM

Article discusses changing default apps for file types on Windows, including reverting and bulk changes. Main issue: no built-in bulk change option.

Windows Metadata and Internet Services Problem: How to Fix It? Windows Metadata and Internet Services Problem: How to Fix It? Apr 02, 2025 pm 03:57 PM

You may see the “A connection to the Windows Metadata and Internet Services (WMIS) could not be established.” error on Event Viewer. This post from php.cn introduces how to remove the Windows Metadata and Internet Services problem.

How do I use the Group Policy Editor (gpedit.msc)? How do I use the Group Policy Editor (gpedit.msc)? Mar 21, 2025 pm 07:48 PM

The article explains how to use the Group Policy Editor (gpedit.msc) in Windows for managing system settings, highlighting common configurations and troubleshooting methods. It notes that gpedit.msc is unavailable in Windows Home editions, suggesting

How to Resolve the KB5035942 Update Issues – Crashing System How to Resolve the KB5035942 Update Issues – Crashing System Apr 02, 2025 pm 04:16 PM

KB5035942 update issues - crashing system commonly happens to users. Inflicted people hope to find a way out of the kind of trouble, such as crashing system, installation, or sound issues. Targeting these situations, this post published by php.cn wil

See all articles