Opentopia Directory Encyclopedia Tools

Data type

Encyclopedia : D : DA : DAT : Data type



 

Data type is a type of data in a type system in computer programming. Types of data in programming languages include primitive types (such as integers), floating point numbers or characters, tuples, records, algebraic data types, abstract data types, reference types, classes and function types. A data type describes representation, interpretation and structure of values manipulated by algorithms or objects stored in computer memory or other storage device. The type system uses data type information to check correctness of computer programs that access or manipulate the data.

Machine data types

All data in computers based on digital electronics is represented as bits (alternatives 0 and 1) on the lowest level. The smallest addressable unit of data is a group of bits called a byte (usually an octet, which is 8 bits). The unit processed by machine code instructions is called a word (as of 2006, typically 32 or 64 bits). Most instructions interpret the word as a binary number, such that a 32-bit word can represent unsigned integer values from 0 to [2^-1] or signed integer values from [-2^] to [2^-1]. Because of two's complement, the machine language and machine don't need to distinguish between these unsigned and signed data types for the most part.

There is a specific set of arithmetic instructions that use a different interpretation of the bits in word as a floating-point number.

Primitive data types

Programming languages provide some primitive data types as basic building blocks for programs and more specialized composite types. Typically primitive data types include various integer, floating-point and string types. Although basic building blocks, arrays, records and references for relations between pieces of data might not be included in primitive data types as they can be seen the collection of several primitive values.

Number types

Composite types

Data structures

Abstract types

See also

References

 


From Wikipedia, the Free Encyclopedia. Original article here. Support Wikipedia by contributing or donating.
All text is available under the terms of the GNU Free Documentation License See Wikipedia Copyrights for details.


Search Titles
0123456789
ABCDEFGHIJ
KLMNOPQRST
UVWXYZ?

E-mail this article to:

Personal Message: