Home > Common Problem > body text

What is stored in a computer's storage unit

(*-*)浩
Release: 2019-07-26 10:17:37
Original
13287 people have browsed it

The content of the memory unit is the binary data stored in the memory unit, such as 0100011.

What is stored in a computer's storage unit

#The content stored in the computer's storage unit can be data and instructions. The memory unit address is a hexadecimal number pointing to a specific unit of memory, such as 0FFE2A. One is the actual data, and the other is the address pointing to the data. So it can be data or instructions. (Recommended learning: PHP video tutorial)

The storage unit should generally have the function of storing data and reading and writing data, using 8-bit binary as a storage Unit, that is, a byte. Each unit has an address, which is an integer encoding and can be represented as a binary integer.

The variables in the program correspond to the storage units of the main memory. The name of the variable corresponds to the address of the storage unit, and the content of the variable corresponds to the data stored in the unit.

Storage addresses are generally represented by hexadecimal numbers, and each memory address stores a set of binary (or hexadecimal) numbers, which are usually called the contents of the address.

The smallest unit of information in a computer is bit, which is a binary bit. 8 bits make up a Byte, which is a byte. One storage unit can store one byte, which is 8 binary bits. The memory capacity of a computer is calculated in bytes as the smallest unit. For a memory with 128 storage units, it can be said that its capacity is 128 bytes.

If there is a 1KB memory, it has 1024 storage units, and its numbers are from 0-1023. The memory is divided into several storage units, and each storage unit is numbered sequentially starting from 0. For example, if a memory has 128 storage units, its number is from 0-127.

Storage addresses are generally represented by hexadecimal numbers, and each memory address stores a set of binary (or hexadecimal) numbers, which are usually called the contents of the address.

It is worth noting that The address of the storage unit and the content in the address are different. The former is the number of the storage unit, which represents a total location of the memory, while the latter represents the data stored in this location. Just like one is the room number and the other is the person living in the room.

The storage unit that stores a machine word is usually called a word storage unit, and the corresponding unit address is called a word address. The unit that stores one byte is called a byte storage unit, and the corresponding address is called a byte address.

If the smallest addressable unit in a computer is a word storage unit, the computer is called a word-addressable computer. If the smallest addressable unit in a computer is a byte, the computer is called a byte-addressable computer.

If the machine word length is equal to the number of bits in the memory unit, a machine word can contain several bytes, so a memory unit can also contain several byte addresses that can be individually addressed. For example, a 16-bit binary word storage unit can store two bytes and can be addressed by word address or byte address.

When addressing with byte address, the 16-bit storage unit occupies two byte addresses.

For more PHP related technical articles, please visit the

PHP Graphic Tutorial column to learn!

The above is the detailed content of What is stored in a computer's storage unit. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!