
n. Mathematics
- A member of the set of positive whole numbers {1, 2, 3, . . . }, negative whole numbers {−1, −2, −3, . . . }, and zero {0}.
- A complete unit or entity.
[From Latin, whole, complete.]
On this page
American Heritage Dictionary:
in·te·ger |

[From Latin, whole, complete.]
|
Featured Videos:
|
Britannica Concise Encyclopedia:
integer |
For more information on integer, visit Britannica.com.
Oxford Dictionary of Units & Measures:
integer |
TechEncyclopedia:
integer |
A whole number. In programming, sending the number 123.898 to an integer function would return 123. See integer arithmetic.
Download Computer Desktop Encyclopedia to your PC, iPhone or Android.
Word Tutor:
integer |
Numbers are the product of counting. This means that numbers can conceivably be accurate because there is a discontinuity between each integer and the next.
— Gregory Bateson (1904-1980), U.S. scientist, philosopher.
LearnThatWord.com is a free vocabulary and spelling program where you only pay for results!
Dictionary of Cultural Literacy: Science:
integers |
The whole numbers, plus their counterparts less than zero, and zero. The negative integers are those less than zero (-1, -2, -3, and so on); the positive integers are those greater than zero (1, 2, 3, and so on).
Oxford Dictionary of Biochemistry:
integer |
Random House Word Menu:
categories related to 'integer' |

Rhymes:
integer |
Wikipedia on Answers.com:
Integer (computer science) |
In computer science, an integer is a datum of integral data type, a data type which represents some finite subset of the mathematical integers. Integral data types may be of different sizes and may or may not be allowed to contain negative values. [1]
|
Contents
|
The value of an item with an integral type is the mathematical integer that it corresponds to. Integral types may be unsigned (capable of representing only non-negative integers) or signed (capable of representing negative integers as well).[2]
An integer value is typically specified in the (source code of the) program as a sequence of digits, without spaces or thousands separators, optionally prefixed with + or -. Some programming languages allow other notations, such as hexadecimal (base 16) or octal (base 8).
The internal representation of this datum is the way the value is stored in the computer’s memory. Unlike mathematical integers, a typical datum in a computer has some minimal and maximum possible value. Typically all integers from the minimum through the maximum can be represented.
The maximum is sometimes called MAXINT or—as in the C standard library limits.h header—INT_MAX.[3]
The most common representation of a positive integer is a string of bits, using the binary numeral system. The order of the memory bytes storing 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 four 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 (in particular, no separate +0 and -0), and because addition, subtraction and multiplication do not need to distinguish between signed and unsigned types. The other possibilities are offset binary, sign-magnitude and ones' complement. See Signed number representations for details.
| Bits | Name | Range (assuming two's complement for signed) | Decimal Digits (approx.) | Uses | Implementations | ||||
|---|---|---|---|---|---|---|---|---|---|
| C/C++ | C# | Pascal and Delphi | Java | SQL[a] | |||||
| 4 | nibble, semioctet | Signed: From − 8 to 7, from − (23) to 23 − 1 | 1 | Binary-coded decimal, single decimal digit representation. | |||||
| Unsigned: From 0 to 15 which equals 24 − 1 | 2 | ||||||||
| 8 | byte, octet | Signed: From − 128 to 127, from − (27) to 27 − 1 | 3 | ASCII characters | int8_t, char | sbyte | Shortint | byte | tinyint |
| Unsigned: From 0 to 255 which equals 28 − 1 | 3 | uint8_t, char | byte | Byte | n/a | unsigned tinyint | |||
| 16 | halfword, word, short | Signed: From − 32,768 to 32,767, from − (215) to 215 − 1 | 5 | UCS-2 characters | int16_t, short[b], int[b] | short | Smallint | short | smallint |
| Unsigned: From 0 to 65,535 which equals 216 − 1 | 5 | uint16_t | ushort | Word | char[d] | unsigned smallint | |||
| 32 | word, long, doubleword, longword, int | Signed: From − 2,147,483,648 to 2,147,483,647, from − (231) to 231 − 1 | 10 | UCS-4 characters, Truecolor with alpha, FourCC, ActionScript int | int32_t, int[b], long[b] | int | LongInt; Integer[c] | int | int |
| Unsigned: From 0 to 4,294,967,295 which equals 232 − 1 | 10 | uint32_t | uint | LongWord; Cardinal[c] | n/a | unsigned int | |||
| 64 | word, doubleword, longword, long long, quad, quadword, int64 | Signed: From − 9,223,372,036,854,775,808 to 9,223,372,036,854,775,807, from − (263) to 263 − 1 | 19 | Very large numbers | int64_t, long[b], long long[b] | long | Int64 | long | bigint |
| Unsigned: From 0 to 18,446,744,073,709,551,615 which equals 264 − 1 | 20 | uint64_t | ulong | 'QWord | n/a | unsigned bigint | |||
| 128 | octaword, double quadword | Signed: From − 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, from − (2127) to 2127 − 1 | 39 | C: only available as non-standard compiler-specific extension | |||||
| Unsigned: From 0 to 340,282,366,920,938,463,463,374,607,431,768,211,455 which equals 2128 − 1 | 39 | ||||||||
| n | n-bit integer (general case) |
Signed: ( − 2n − 1) to (2n − 1 − 1) | ![]() |
Ada range -2**(n-1)..2**(n-1)-1 |
|||||
| Unsigned: 0 to (2n − 1) | ![]() |
Ada range 0..2**n-1, Ada mod 2**n |
|||||||
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, Smalltalk, 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.[10] 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 decimal 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.
The term byte initially meant ‘the smallest addressable unit of memory’. In the past, 5-, 6-, 7-, 8-, and 9-bit bytes have all been used. There have also been computers that could address individual bits (‘bit-addressed machine’), or that could only address 16- or 32-bit quantities (‘word-addressed machine’). The term byte was usually not used at all in connection with bit- and word-addressed machines.
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.
The term 'word' is used for a small group of bits which are handled simultaneously by processors of a particular architecture. The size of a word is thus CPU-specific. Many different word sizes have been used, including 6-, 8-, 12-, 16-, 18-, 24-, 32-, 36-, 39-, 48-, 60-, and 64-bit. Since it is architectural, the size of a word is usually set by the first CPU in a family, rather than the characteristics of a later compatible CPU. The meanings of terms derived from word, such as longword, doubleword, quadword, and halfword, also vary with the CPU and OS.[7]
Practically all new desktop processors are capable of using 64-bit words, though 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.
One important cause of non-portability of software is the incorrect assumption that all computers have the same word size as the computer used by the programmer. For example, if a programmer using the C language incorrectly declares as int a variable that will be used to store values greater than 216-1, the program will fail on computers with 16-bit integers. That variable should have been declared as long, which has at least 32 bits on any computer. Programmers may also incorrectly assume that a pointer can be converted to an integer without loss of information, which may work on (some) 32-bit computers, but fail on 64-bit computers with 64-bit pointers and 32-bit integers.
A short integer can represent a whole number which may take less storage, while having a smaller range, compared with a standard integer on the same machine.
A short integer in one programming language may be a different size in a different language or on a different processor. In some languages this size is fixed across platforms, while in others it is machine-dependent. In some languages this datatype does not exist at all.
In C, it is denoted by short. It is required to be at least 16 bits, and is often smaller than a standard integer, but this is not required.[9][8] A conforming program can assume that it can safely store values between −(215−1) and 215−1, but it may not assume that the range isn't larger. In Java, a short is always a 16-bit integer. In the Windows API, the datatype SHORT is defined as a 16-bit signed integer on all machines.[7]
| Programming language | Platforms | Data type name | Signedness | Storage in bytes | Minimum value | Maximum value |
|---|---|---|---|---|---|---|
| C and C++ | common implementations | short |
signed | 2 | −32,768 | 32,767 |
unsigned short |
unsigned | 2 | 0 | 65,535 | ||
| C# | .NET CLR/CTS | short |
signed | 2 | −32,768 | 32,767 |
| ushort | unsigned | 2 | 0 | 65,535 | ||
| Java | Java platform | short |
signed | 2 | −32,768 | 32,767 |
A long integer can represent a whole integer number whose range is greater than or equal to that of a standard integer on the same machine.
A long integer in one programming language may be different in size from a long integer in a different language or processor. In some languages this size is fixed across platforms, while in others it is machine dependent. In some languages this data type does not exist at all.
A long integer commonly requires double the storage capacity of a standard integer, although this is not always the case.
In the C99 version of the C programming language and the C++11 version of C++, a long long type is supported that doubles the minimum capacity of the standard long to 64 bits. This type is not supported by compilers that require C code to be compliant with the previous C++ standard, C++03, because the long long type did not exist in C++03. For an ANSI/ISO compliant compiler the minimum requirements for the specified ranges, that is −(231) to 231−1 for signed and 0 to 232−1 for unsigned, must be fulfilled; however, extending this range is permitted.[11] [12] This can be an issue when exchanging code and data between platforms, or doing direct hardware access. Thus, there are several sets of headers providing platform independent exact width types. The C standard library provides stdint.h; this was introduced in C99 and C++11.
| Programming language | Approval Type | Platforms | Data type name | Storage in bytes | Signed range | Unsigned range |
|---|---|---|---|---|---|---|
| C ISO/ANSI C99 | International Standard | Unix,16/32-bit systems[7] Windows,16/32/64-bit systems[7] |
long† |
4 (minimum requirement 4) |
−2,147,483,648 to 2,147,483,647 | 0 to 4,294,967,295 (minimum requirement) |
| C ISO/ANSI C99 | International Standard | Unix, 64-bit systems[7][8] |
long† |
8 (minimum requirement 4) |
−9,223,372,036,854,775,808 to +9,223,372,036,854,775,807 | 0 to 18,446,744,073,709,551,615 |
| C++ ISO/ANSI | International Standard | Unix, Windows, 16/32-bit system |
long† |
4 [13] (minimum requirement 4) |
−2,147,483,648 to 2,147,483,647 |
0 to 4,294,967,295 (minimum requirement) |
| C++/CLI | International Standard ECMA-372 |
Unix, Windows, 16/32-bit systems |
long† |
4 [14] (minimum requirement 4) |
−2,147,483,648 to 2,147,483,647 |
0 to 4,294,967,295 (minimum requirement) |
| VB | Company Standard | Windows | Long |
4 [15] | −2,147,483,648 to 2,147,483,647 | N/A |
| VBA | Company Standard | Windows, Mac OS | Long |
4 [16] | −2,147,483,648 to 2,147,483,647 | N/A |
| SQL Server | Company Standard | Windows | BigInt |
8 | −9,223,372,036,854,775,808 to +9,223,372,036,854,775,807 | 0 to 18,446,744,073,709,551,615 |
| C#/ VB.NET | ECMA International Standard | Microsoft .NET | long or Int64 |
8 | −9,223,372,036,854,775,808 to +9,223,372,036,854,775,807 | 0 to 18,446,744,073,709,551,615 |
| Java | International/Company Standard | Java platform | long |
8 | −9,223,372,036,854,775,808 to +9,223,372,036,854,775,807 | N/A |
| Pascal | ? | Windows, UNIX | int64 |
8 | −9,223,372,036,854,775,808 to +9,223,372,036,854,775,807 | 0 to 18,446,744,073,709,551,615(Qword type) |
† the term long int is equivalent but it is used rarely
|
|||||||||||||||||||||||
This entry is from Wikipedia, the leading user-contributed encyclopedia. It may not have been reviewed by professional editors (see full disclaimer)
Translations:
Integer |
Dansk (Danish)
n. - heltal, hele, helhed
Nederlands (Dutch)
geheel, geheel getal
Français (French)
n. - (Math) nombre entier
Deutsch (German)
n. - ganze Zahl
Ελληνική (Greek)
n. - (μαθημ.) μονάδα, ακέραιος αριθμός
Italiano (Italian)
numero intero
Português (Portuguese)
n. - número (m) inteiro (Mat.)
Русский (Russian)
нечто целое, целое число
Español (Spanish)
n. - entero, número entero, totalidad
Svenska (Swedish)
n. - heltal (matem.), enhet, helhet
中文(简体)(Chinese (Simplified))
完整的事物, 整数, 整体
中文(繁體)(Chinese (Traditional))
n. - 完整的事物, 整數, 整體
العربيه (Arabic)
(الاسم) عدد صحيح, كل تام
עברית (Hebrew)
n. - מספר שלם (לא שבר)
If you are unable to view some languages clearly, click here.
To select your translation preferences click here.
| perfect square | |
| even number (mathematics) | |
| mixed number (mathematics) |
| What is the integer to the right of the integer than the right integer to its left? | |
| The square of an integer will always be an integer? | |
| Can a integer be a reciprocal of an integer? |
Copyrights:
![]() |
![]() | American Heritage Dictionary. The American Heritage® Dictionary of the English Language, Fourth Edition Copyright © 2007, 2000 by Houghton Mifflin Company. Updated in 2009. Published by Houghton Mifflin Company. All rights reserved. Read more |
![]() | Britannica Concise Encyclopedia. Britannica Concise Encyclopedia. © 1994-2012 Encyclopædia Britannica, Inc. All rights reserved. Read more | |
![]() | Oxford Dictionary of Units & Measures. A Dictionary of Weights, Measures, and Units. Copyright © Donald Fenna 2002, 2004. All rights reserved. Read more | |
![]() |
![]() | TechEncyclopedia. THIS DEFINITION IS FOR PERSONAL USE ONLY. All other reproduction is strictly prohibited without permission from the publisher. © 1981-2012 The Computer Language Company Inc. All rights reserved. Read more |
![]() |
![]() | Word Tutor. Copyright © 2004-present by eSpindle Learning, a 501(c) nonprofit organization. All rights reserved. eSpindle provides personalized spelling and vocabulary tutoring online; sign up free. Read more |
![]() |
![]() | Dictionary of Cultural Literacy: Science. The New Dictionary of Cultural Literacy, Third Edition Edited by E.D. Hirsch, Jr., Joseph F. Kett, and James Trefil. Copyright © 2002 by Houghton Mifflin Company. Published by Houghton Mifflin. All rights reserved. Read more |
| Oxford Dictionary of Biochemistry. Oxford University Press. Oxford Dictionary of Biochemistry and Molecular Biology © 1997, 2000, 2006 All rights reserved. Read more | ||
![]() | Saunders Veterinary Dictionary. Saunders Comprehensive Veterinary Dictionary 3rd Edition. Copyright © 2007 by D.C. Blood, V.P. Studdert and C.C. Gay, Elsevier. All rights reserved. Read more | |
![]() |
![]() | Random House Word Menu. © 2010 Write Brothers Inc. Word Menu is a registered trademark of the Estate of Stephen Glazier. Write Brothers Inc. All rights reserved. Read more |
| Rhymes. Oxford University Press. © 2006, 2007 All rights reserved. Read more | ||
![]() |
![]() | Bradford's Crossword Solver's Dictionary. Collins Bradford's Crossword Solver's Dictionary © Anne Bradford, 1986, 1993, 1997, 2000, 2003, 2005, 2008 HarperCollins Publishers All rights reserved. Read more |
![]() |
![]() | Wikipedia on Answers.com. This article is licensed under the Creative Commons Attribution/Share-Alike License. It uses material from the Wikipedia article Integer (computer science). Read more |
![]() | Translations. Copyright © 2007, WizCom Technologies Ltd. All rights reserved. Read more |
Mentioned in