Information about Integral Data Type
In computer science, the term integer is used to refer to any data type which represents some subset of the mathematical integers. These are also known as integral data types.
The most common representation of a positive integer is a string of bits, using the binary numeral system. The order of the bits varies; see Endianness. The width or precision of an integral type is the number of bits in its representation. An integral type with n bits can encode 2n numbers; for example an unsigned type typically represents the non-negative values 0 through 2n−1.
There are three different ways to represent negative numbers in a binary numeral system. The most common is two’s complement, which allows a signed integral type with n bits to represent numbers from −2(n−1) through 2(n−1)−1. Two’s complement arithmetic is convenient because there is a perfect one-to-one correspondence between representations and values, and because addition, subtraction and multiplication do not need to distinguish between signed and unsigned types. The other possibilities are sign-magnitude and ones' complement. See Signed number representations for details.
Another, rather different, representation for integers is binary-coded decimal, which is still commonly used in mainframe financial applications and in databases.
Different CPUs support different integral data types. Typically,
hardware will support both signed and unsigned types but only a small,
fixed set of widths.
The table above lists integral type widths that are supported in hardware by common processors. High level programming languages provide more possibilities. It is common to have a ‘double width’ integral type that has twice as many bits as the biggest hardware-supported type. Many languages also have bit-field types (a specified number of bits, usually constrained to be less than the maximum hardware-supported width) and range types (which can represent only the integers in a specified range).
Some languages, such as Lisp, REXX and Haskell, support arbitrary precision integers (also known as infinite precision integers or bignums). Other languages which do not support this concept as a top-level construct may have libraries available to represent very large numbers using arrays of smaller variables, such as Java's BigInteger class or Perl's "bigint" package. These use as much of the computer’s memory as is necessary to store the numbers; however, a computer has only a finite amount of storage, so they too can only represent a finite subset of the mathematical integers. These schemes support very large numbers, for example one kilobyte of memory could be used to store numbers up to 2466 digits long.
A Boolean or Flag type is a type which can represent only two values: 0 and 1, usually identified with false and true respectively. This type can be stored in memory using a single bit, but is often given a full byte for convenience of addressing and speed of access.
A four-bit quantity is known as a nibble (when eating, being smaller than a bite) or nybble (being a pun on the form of the word byte). One nibble corresponds to one digit in hexadecimal and holds one digit or a sign code in binary-coded decimal.
Note: C++ has no compiler-independent integer types with fixed bit widths. C has them only since C99, in the form (u)int(n)_t. It does specify the minimum widths for char, short, int, long, and long long (as shown in the table above). It also specifies that each of those types is no larger than the following, and that char is exactly one byte (eight bits in virtually all modern computers; the exact value is defined as CHAR_BIT in <limits.h>, also for older machines with wider bytes).
The term octet always refers to an 8-bit quantity. It is mostly used in the field of computer networking, where computers with different byte widths might have to communicate.
In modern usage byte almost invariably means eight bits, since all other sizes have fallen into disuse; thus byte has come to be synonymous with octet.
As of 2006, 32-bit word sizes are most common among general-purpose computers, with 64-bit machines used mostly for large installations. Embedded processors with 8- and 16-bit word size are still common. The 36-bit word length was common in the early days of computers, but word sizes that are not a multiple of 8 have vanished along with non-8-bit bytes.
Debt, AIDS, Trade in Africa (or DATA) is a multinational non-government organization founded in January 2002 in London by U2's Bono along with Bobby Shriver and activists from the Jubilee 2000 Drop
..... Click the link for more information.
Value and representation
The value of a datum with an integral type is the mathematical integer that it corresponds to. The representation of this datum is the way the value is stored in the computer’s memory. Integral types may be unsigned (capable of representing only non-negative integers) or signed (capable of representing negative integers as well).The most common representation of a positive integer is a string of bits, using the binary numeral system. The order of the bits varies; see Endianness. The width or precision of an integral type is the number of bits in its representation. An integral type with n bits can encode 2n numbers; for example an unsigned type typically represents the non-negative values 0 through 2n−1.
There are three different ways to represent negative numbers in a binary numeral system. The most common is two’s complement, which allows a signed integral type with n bits to represent numbers from −2(n−1) through 2(n−1)−1. Two’s complement arithmetic is convenient because there is a perfect one-to-one correspondence between representations and values, and because addition, subtraction and multiplication do not need to distinguish between signed and unsigned types. The other possibilities are sign-magnitude and ones' complement. See Signed number representations for details.
Another, rather different, representation for integers is binary-coded decimal, which is still commonly used in mainframe financial applications and in databases.
Common integral data types
| Bits | Name | Range | Digits | Uses |
|---|---|---|---|---|
| 8 | byte, octet | Signed: −128 to +127 Unsigned: 0 to +255 | 3 3 | ASCII characters, C int8_t, Java byte |
| 16 | halfword, word | Signed: −32,768 to +32,767 Unsigned: 0 to +65,535 | 5 5 | UCS-2 characters, C int16_t, Java short, Java char |
| 32 | word, doubleword, longword | Signed: −2,147,483,648 to +2,147,483,647 Unsigned: 0 to +4,294,967,295 | 10 10 | UCS-4 characters, Truecolor with alpha, C int32_t, Java int |
| 64 | doubleword, longword, quadword | Signed: −9,223,372,036,854,775,808 to +9,223,372,036,854,775,807 Unsigned: 0 to +18,446,744,073,709,551,615 | 19 20 | C int64_t, Java long |
| 128 | Signed: −170,141,183,460,469,231,731,687,303,715,884,105,728 to +170,141,183,460,469,231,731,687,303,715,884,105,727 Unsigned: 0 to +340,282,366,920,938,463,463,374,607,431,768,211,455 | 39 39 | C only available as non-standard compiler-specific extension | |
| n | n-bit integer | Signed: to ![]() Unsigned: 0 to ![]() |
The table above lists integral type widths that are supported in hardware by common processors. High level programming languages provide more possibilities. It is common to have a ‘double width’ integral type that has twice as many bits as the biggest hardware-supported type. Many languages also have bit-field types (a specified number of bits, usually constrained to be less than the maximum hardware-supported width) and range types (which can represent only the integers in a specified range).
Some languages, such as Lisp, REXX and Haskell, support arbitrary precision integers (also known as infinite precision integers or bignums). Other languages which do not support this concept as a top-level construct may have libraries available to represent very large numbers using arrays of smaller variables, such as Java's BigInteger class or Perl's "bigint" package. These use as much of the computer’s memory as is necessary to store the numbers; however, a computer has only a finite amount of storage, so they too can only represent a finite subset of the mathematical integers. These schemes support very large numbers, for example one kilobyte of memory could be used to store numbers up to 2466 digits long.
A Boolean or Flag type is a type which can represent only two values: 0 and 1, usually identified with false and true respectively. This type can be stored in memory using a single bit, but is often given a full byte for convenience of addressing and speed of access.
A four-bit quantity is known as a nibble (when eating, being smaller than a bite) or nybble (being a pun on the form of the word byte). One nibble corresponds to one digit in hexadecimal and holds one digit or a sign code in binary-coded decimal.
Data type names
| Bits | Signed | Java | C# | VB.Net | SQL92 | vbScript | C |
|---|---|---|---|---|---|---|---|
| 8 | Yes | byte | sbyte | SByte | int8_t, signed char | ||
| 16 | Yes | short | short, Int16 | Short, Int16 | smallint, int2 | int | int16_t, short, int |
| 32 | Yes | int | int, Int32 | Integer, Int32 | integer, int, int4 | long | int32_t, long |
| 64 | Yes | long | long, Int64 | Long, Int64 | bigint, int8 | int64_t, long long | |
| 8 | No | byte | Byte | tinyint, int1 | byte | uint8_t, unsigned char | |
| 16 | No | char | ushort, UInt16 | UShort, UInt16 | uint16_t, unsigned short, unsigned | ||
| 32 | No | uint, UInt32 | UInteger, UInt32 | uint32_t, unsigned long | |||
| 64 | No | ulong, UInt64 | ULong, UInt64 | uint64_t, unsigned long long |
Note: C++ has no compiler-independent integer types with fixed bit widths. C has them only since C99, in the form (u)int(n)_t. It does specify the minimum widths for char, short, int, long, and long long (as shown in the table above). It also specifies that each of those types is no larger than the following, and that char is exactly one byte (eight bits in virtually all modern computers; the exact value is defined as CHAR_BIT in <limits.h>, also for older machines with wider bytes).
Pointers
A pointer is often, but not always, represented by an unsigned integer of specified width. This is often, but not always, the widest integer that the hardware supports directly. The value of this integer is often, but not always, the memory address of whatever the pointer points to.Bytes and octets
The term octet always refers to an 8-bit quantity. It is mostly used in the field of computer networking, where computers with different byte widths might have to communicate.
In modern usage byte almost invariably means eight bits, since all other sizes have fallen into disuse; thus byte has come to be synonymous with octet.
Words
As of 2006, 32-bit word sizes are most common among general-purpose computers, with 64-bit machines used mostly for large installations. Embedded processors with 8- and 16-bit word size are still common. The 36-bit word length was common in the early days of computers, but word sizes that are not a multiple of 8 have vanished along with non-8-bit bytes.
See Also
In programming languages a data type defines a set of values and the allowable operations on those values[1]. For example, in the Java programming language, the "int" type represents the set of 32-bit integers ranging in value from -2,147,483,648 to 2,147,483,647, and
..... Click the link for more information.
..... Click the link for more information.
The integers (from the Latin integer, which means with untouched integrity, whole, entire) are the set of numbers including the whole numbers (0, 1, 2, 3, …) and their negatives (0, −1, −2, −3, …).
..... Click the link for more information.
..... Click the link for more information.
- For other uses, see Data (disambiguation).
Debt, AIDS, Trade in Africa (or DATA) is a multinational non-government organization founded in January 2002 in London by U2's Bono along with Bobby Shriver and activists from the Jubilee 2000 Drop
..... Click the link for more information.
BIT is an acronym for:
..... Click the link for more information.
- Bannari amman Institute of Technology
- Bangalore Institute of Technology
- Beijing Institute of Technology
- Benzisothiazolinone
- Bilateral Investment Treaty
- Bhilai Institute of Technology - Durg
..... Click the link for more information.
binary numeral system, or base-2 number system, is a numeral system that represents numeric values using two symbols, usually 0 and 1. More specifically, the usual base-2 system is a positional notation with a radix of 2.
..... Click the link for more information.
..... Click the link for more information.
In computing, endianness is the byte (and sometimes bit) ordering in memory used to represent some kind of data. Typical cases are the order in which integer values are stored as bytes in computer memory (relative to a given memory addressing scheme) and the transmission order over
..... Click the link for more information.
..... Click the link for more information.
The two's complement of a binary number is defined as the value obtained by subtracting the number from a large power of two (specifically, from 2N for an N-bit two's complement).
..... Click the link for more information.
..... Click the link for more information.
In mathematics, a bijection, or a bijective function is a function f from a set X to a set Y with the property that, for every y in Y, there is exactly one x in X such that
f(x) = y.
..... Click the link for more information.
f(x) = y.
..... Click the link for more information.
Addition is the mathematical operation of combining or adding two numbers to obtain an equal simple amount or total. Addition also provides a model for related processes such as joining two collections of objects into one collection.
..... Click the link for more information.
..... Click the link for more information.
Subtraction is one of the four basic arithmetic operations; it is the inverse of addition. Subtraction is denoted by a minus sign in infix notation.
The traditional names for the parts of the formula
..... Click the link for more information.
The traditional names for the parts of the formula
- c − b = a
..... Click the link for more information.
Multiplication is the mathematical operation of adding together multiple copies of the same number. For example, four multiplied by three is twelve, since three sets of four make twelve:
..... Click the link for more information.
..... Click the link for more information.
signed numbers: sign-and-magnitude, ones' complement, two's complement, and excess-N.
For most purposes, modern computers typically use the two's-complement representation, but other representations are used in some circumstances.
..... Click the link for more information.
For most purposes, modern computers typically use the two's-complement representation, but other representations are used in some circumstances.
..... Click the link for more information.
In computing and electronic systems, binary-coded decimal (BCD) is an encoding for decimal numbers in which each digit is represented by its own binary sequence. Its main virtue is that it allows easy conversion to decimal digits for printing or display and faster decimal
..... Click the link for more information.
..... Click the link for more information.
Mainframes (often colloquially referred to as Big Iron) are computers used mainly by large organizations for critical applications, typically bulk data processing such as census, industry and consumer statistics, ERP, and financial transaction processing.
..... Click the link for more information.
..... Click the link for more information.
byte (pronounced /baɪt/) is a unit of measurement of information storage, most often consisting of eight bits. In many computer architectures it is a unit of memory addressing.
..... Click the link for more information.
..... Click the link for more information.
In computing, an octet is a grouping of eight bits.
In France, French Canada and Romania, the word octet usually means byte; a megabyte (MB) is called a megaoctet in France, Romania and also French Canada. Bit and Byte are homophones in the French language.
..... Click the link for more information.
In France, French Canada and Romania, the word octet usually means byte; a megabyte (MB) is called a megaoctet in France, Romania and also French Canada. Bit and Byte are homophones in the French language.
..... Click the link for more information.
127 is the natural number following 126 and preceding 128.
..... Click the link for more information.
In mathematics
127 is a Mersenne prime, 27 - 1, and as such, in binary it is a repunit prime, a permutable prime and a palindromic prime...... Click the link for more information.
American Standard Code for Information Interchange (ASCII), generally pronounced ask-ee IPA: /ˈæski/ ( [1] ), is a character encoding based on the English alphabet.
..... Click the link for more information.
..... Click the link for more information.
word" is a term for the natural unit of data used by a particular computer design. A word is simply a fixed-sized group of bits that are handled together by the machine. The number of bits in a word (the word size or word length
..... Click the link for more information.
..... Click the link for more information.
10000 (ten thousand) is the natural number following 9999 and preceding 10001.
..... Click the link for more information.
Name
Many languages have a specific word for this number: In English it is a myriad, in Ancient Greek μύριοι..... Click the link for more information.
C
The C Programming Language, Brian Kernighan and Dennis Ritchie, the original edition that served for many years as an informal specification of the language.
..... Click the link for more information.
The C Programming Language, Brian Kernighan and Dennis Ritchie, the original edition that served for many years as an informal specification of the language.
..... Click the link for more information.
Truecolor is a method of representing and storing graphical image information (especially in computer processing) such that a very large number of colors, shades, and hues can be displayed at once, such as high quality photographic images or complex graphics.
..... Click the link for more information.
..... Click the link for more information.
central processing unit (CPU), or sometimes simply processor, is the component in a digital computer capable of executing a program.(Knott 1974) It interprets computer program instructions and processes data.
..... Click the link for more information.
..... Click the link for more information.
Lisp
Paradigm: multi-paradigm: functional, procedural, reflective
Appeared in: 1958
Designed by: John McCarthy
Developer: Steve Russell, Timothy P. Hart, and Mike Levin
Typing discipline: dynamic, strong
Dialects: Common Lisp, Scheme, Emacs Lisp
..... Click the link for more information.
Paradigm: multi-paradigm: functional, procedural, reflective
Appeared in: 1958
Designed by: John McCarthy
Developer: Steve Russell, Timothy P. Hart, and Mike Levin
Typing discipline: dynamic, strong
Dialects: Common Lisp, Scheme, Emacs Lisp
..... Click the link for more information.
REXX
Paradigm: multiparadigm: object-oriented, procedural, structured
Appeared in: 1979
Designed by: Mike Cowlishaw
Developer: Mike Cowlishaw & IBM
Typing discipline: dynamic, everything is a string (ClassicREXX) or object (ObjectRexx)
..... Click the link for more information.
Paradigm: multiparadigm: object-oriented, procedural, structured
Appeared in: 1979
Designed by: Mike Cowlishaw
Developer: Mike Cowlishaw & IBM
Typing discipline: dynamic, everything is a string (ClassicREXX) or object (ObjectRexx)
..... Click the link for more information.
Haskell
Paradigm: functional, non-strict, modular
Appeared in: 1990
Designed by: Simon Peyton-Jones, Paul Hudak[1], Philip Wadler, et al
Typing discipline: static, strong, inferred
Major implementations: GHC, Hugs, NHC , JHC , Yhc
..... Click the link for more information.
Paradigm: functional, non-strict, modular
Appeared in: 1990
Designed by: Simon Peyton-Jones, Paul Hudak[1], Philip Wadler, et al
Typing discipline: static, strong, inferred
Major implementations: GHC, Hugs, NHC , JHC , Yhc
..... Click the link for more information.
On a computer, arbitrary-precision arithmetic, also called bignum arithmetic, is a technique that allows computer programs to perform calculations on integers or rational numbers (including floating-point numbers) with an arbitrary number of digits of precision, typically
..... Click the link for more information.
..... Click the link for more information.
Perl
Paradigm: Multi-paradigm
Appeared in: 1987
Designed by: Larry Wall
Latest release: 5.8.8/ January 31 2006
Typing discipline: Dynamic
Influenced by: AWK, BASIC, BASIC-PLUS, C, C++, Lisp, Pascal, Python, sed, Unix shell
..... Click the link for more information.
Paradigm: Multi-paradigm
Appeared in: 1987
Designed by: Larry Wall
Latest release: 5.8.8/ January 31 2006
Typing discipline: Dynamic
Influenced by: AWK, BASIC, BASIC-PLUS, C, C++, Lisp, Pascal, Python, sed, Unix shell
..... Click the link for more information.
In computer science, the Boolean datatype, sometimes called the logical datatype, is a primitive datatype having two values: one and zero (which are equivalent to true and false).
..... Click the link for more information.
..... Click the link for more information.
In computer programming, flag refers to one or more bits that are used to store a binary value or code that has an assigned meaning. Flags are typically found as members of a defined data structure, such as a database record, and the meaning of the value contained in a flag will
..... Click the link for more information.
..... Click the link for more information.
This article is copied from an article on Wikipedia.org - the free encyclopedia created and edited by online user community. The text was not checked or edited by anyone on our staff. Although the vast majority of the wikipedia encyclopedia articles provide accurate and timely information please do not assume the accuracy of any particular article. This article is distributed under the terms of GNU Free Documentation License.
Herod_Archelaus
to 
