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

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

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)

Hot Topics

Java Tutorial
1655
14
PHP Tutorial
1254
29
C# Tutorial
1228
24
Fixdisk Windows 7: Check Your Hard Disk for Errors on Windows 7 Fixdisk Windows 7: Check Your Hard Disk for Errors on Windows 7 Apr 14, 2025 am 12:40 AM

If you suspect your hard drive encounters issues, you can check the drive for errors on Windows 7. This php.cn post talks about fixdisk Windows 7. You can follow the guide to check the hard drive for errors on Windows 7.

How to Install Windows X-Lite Optimum 11 23H2 Home/Pro via ISO How to Install Windows X-Lite Optimum 11 23H2 Home/Pro via ISO Apr 09, 2025 am 12:49 AM

Windows X-Lite Optimum 11 23H2 Home or Optimum 11 Pro could be your option if you need a custom lite system based on Windows 11 23H2. Go on reading and php.cn will show you how to download Optimum 11 23H2 ISO and install Pro or Home on your PC.

Effortles Fixes for Black Screen After Installing a Graphics Driver Effortles Fixes for Black Screen After Installing a Graphics Driver Apr 15, 2025 am 12:11 AM

Have you ever encountered a black screen after installing a graphics driver like an Nvidia driver in Windows 10/11? Now in this post from php.cn, you can find a couple of worth trying solutions to the Nvidia driver update black screen.

Is Core Isolation Blocked by ew_usbccgpfilter.sys? Here Are Fixes! Is Core Isolation Blocked by ew_usbccgpfilter.sys? Here Are Fixes! Apr 13, 2025 am 12:47 AM

Many SurfaceBook users report that they meet the “core isolation blocked by ew_usbccgpfilter.sys” issue on Windows 11/10. This post from php.cn helps to fix the annoying issue. Keep on your reading.

Win 11 Builds 22621.3078 and 22631.3078 (KB5034204) Released Win 11 Builds 22621.3078 and 22631.3078 (KB5034204) Released Apr 05, 2025 am 01:35 AM

Want to know the new improvements and bug fixes in Windows 11 KB5034204? Want to how to get Windows 11 KB5034204 on your device? In this post, php.cn Software will introduce the information you want to know.

Advanced Tips for Windows   P Not Working on Windows Advanced Tips for Windows P Not Working on Windows Apr 11, 2025 am 12:49 AM

You must be familiar with the Windows P shortcut if you have more than one monitor. However, the Windows P not working properly might happen occasionally. If you are facing this problem, this post from php.cn can help you indeed.

How to Turn Off Tips and Suggestions Notifications in Windows? How to Turn Off Tips and Suggestions Notifications in Windows? Apr 09, 2025 am 12:46 AM

Tips and Suggestions Notifications is a new design of Windows 11. It will give you suggestions and tips on some new features. But some of you may be bothered by the popup tips. You can read this post from php.cn to learn how to turn off tips and sugg

Difference Between RAID Recovery and Hard Drive Recovery Difference Between RAID Recovery and Hard Drive Recovery Apr 17, 2025 am 12:50 AM

Data recovery is always a heated topic. To successfully restore data from your device, you should know how it stores data. You can learn the difference between RAID recovery and hard drive recovery from this php.cn post.

See all articles