Home  >  Article  >  Can C language directly access physical bit addresses?

Can C language directly access physical bit addresses?

(*-*)浩
(*-*)浩Original
2019-12-25 13:28:585400browse

Can C language directly access physical bit addresses?

is to use C language to directly locate the address of the physical memory, that is, obtain the data at the address through the memory address (such as 0xfa283401). (Recommended learning: phpstorm)

The data in the computer is based on bit (bit) as the basic unit. C language can directly operate on bits, including Find AND, Union, OR, XOR, Not, etc.

Physical address is a very broad concept. Storage devices such as disks and memory all have physical addresses.

The physical memory address refers to the encoded address of the physical memory exposed to external bus access on the hardware implementation, and its range is equal to the size of the physical memory.

We often say that physical memory refers to the memory module installed on the motherboard. In fact, in a computer system, physical memory not only includes the memory module (RAM) installed on the motherboard, but also the motherboard. The ROM of the BIOS chip, the video memory (RAM) and BIOS (ROM) on the graphics card, and the RAM and ROM on various PCI and PCI-E devices.

The address space is the range of physical memory encoding (address encoding).

The so-called encoding is to assign a unique address number to each physical storage unit (one byte). This process is also called "addressing" or "address mapping".

This process is like assigning an address and house number to each household in daily life. Corresponding to encoding is the "addressing" process - the purpose of assigning an address number to a storage unit is to facilitate finding it and completing the reading and writing of data. This is "addressing", so the address space is sometimes called As "addressing space".

The system must not only address the memory module on the motherboard, but also address the other physical memories mentioned above; they are all programmed in the same address space, and the addressed physical memory can be used by the system Resource usage or occupation.

The above is the detailed content of Can C language directly access physical bit addresses?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
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