Computer Data Storage and Computer Data Storage

Source: Internet
Author: User

Computer Data Storage and Computer Data Storage

Applications generally run in computer memory to operate various data.

Data Storage

The storage space of a computer can be divided into two parts: memory and external storage.

For computer storage units, both memory and external storage are composed of countless electronic switches. These electronic switches are enabled and disabled. The status is 1 and 0.

A bit represents a basic unit of binary and a basic unit of computer storage.

Memory Unit

Daily files are generally stored in hard disks and other external storage. When a file or application is executed, it is loaded into the computer memory. Therefore, memory is the most important component of a computer. No memory, and no program or file can be executed.

In the memory of a computer, each byte storage unit has an address that stores and reads data in the memory.

In a computer, the memory address is encoded in byte order. This facilitates program addressing and Data Reading and writing. The external storage of computers is stored in the same way.

In a program, it is generally not necessary or recommended to operate on the memory address directly, but is automatically allocated by the compiler.

Data Storage

In a computer, bit is the most basic storage unit. Data of different types must be converted to binary and stored in the memory.

Storage of character data

Each character variable is allocated with one byte of memory space, so only one character can be stored. The character value is stored in the memory unit of the variable in the form of ASCII code.

Data Storage

Generally, in a computer, two bytes are used to store integers and four bytes are used to store real numbers.

Program ing in memory

For computers, everything is data. A program is also a type of data. A program usually contains a large amount of common data and command data. When a computer is running, normal data is loaded into the computer memory through a program, while the program is loaded into the memory by the operating system.

The ing of an application in a computer should include the following aspects:

Memory space allocated for application commands

Memory space allocated for static data of the application

Memory space reserved for dynamic data of applications --- dynamic data stack

Dynamic Data is divided into two types: Automatic Recovery and manual recovery. The memory space for storing dynamic data that is automatically recycled becomes the stack space, which is called the heap space.

Related Article

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.