[go: nahoru, domu]

Jump to content

Data (computer science)

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by FrescoBot (talk | contribs) at 04:17, 20 February 2012 (Bot: link syntax/spacing). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

In computer science, data (/[invalid input: 'icon']ˈdtə/ DAY-tə or /ˈdætə/) is information in a form suitable for use with a computer.[1] Data is often distinguished from programs. A program is a sequence of instructions that detail a task for the computer to perform. In this sense, data is thus everything that is not program code.[2] Physical computer memory elements consists of an addresses and a byte/word of data storage. All data can be reduced to key/value pair combinations [citation needed]. Supersets of this idea, where keys are derived, and values are arranged, relatively, are called data structures. They are also used in peripheral devices.

In an alternate usage, binary files (which are not human-readable) are sometimes called "data" as distinguished from human-readable "text".[3] The total amount of digital data in 2007 was estimated to be 281 billion gigabytes (= 281 exabytes).[4][5]

Data vs programs

Fundamentally, computers follow the instructions they are given. A set of instructions to perform a given task (or tasks) is called a "program". In the nominal case, the program, as executed by the computer, will consist of binary machine code. The elements of storage manipulated by the program, but not actually executed by the CPU, contain data.

Typically, different files are used to store programs or data. Executable files contain programs; all other files are data files. However, executable files may also contain data which is "built-in" to the program. In particular, some executable files have a data segment, which nominally contains constants and initial values (both data).

For example: a user might first instruct the operating system to load a word processor program from one file, and then edit a document stored in another file. In this example, the document would be considered data. If the word processor also features a spell checker, then the dictionary (word list) for the spell checker would also be considered data. The algorithms used by the spell checker to suggest corrections would be considered code.

The line between program and data can become blurry. An interpreter, for example, is a program. The input data to an interpreter is itself a program—just not one expressed in native machine language. In many cases, the interpreted program will be a human-readable text file, which is manipulated with a text editor—more normally associated with plain text data. Metaprogramming similarly involves programs manipulating other programs as data. Also, for programs like compilers, linkers, debuggers, program updaters, etc. may other programs serve as data. The most special case is the case of self-modifying code, which manipulates itself.

See also

References

  1. ^ "data". American Heritage Dictionary of the English Language. Archived from the original on 2007-11-04. Retrieved 2007-03-19.
  2. ^ "data". Webopedia. Retrieved 2007-03-19.
  3. ^ "file(1)". OpenBSD Manual Pages. 2004-12-04. Retrieved 2007-03-19.
  4. ^ Paul, Ryan (March 12, 2008). "Study: amount of digital info > global storage capacity". Ars Technica. Retrieved 2008-03-12.
  5. ^ Gantz, John F.; et al. (2008). "The Diverse and Exploding Digital Universe". International Data Corporation via EMC. Retrieved 2008-03-12. {{cite web}}: Explicit use of et al. in: |author= (help)