Share on Facebook Share on Twitter Email
Answers.com

integer

 
Dictionary: in·te·ger   (ĭn'tĭ-jər) pronunciation
n. Mathematics
  1. A member of the set of positive whole numbers {1, 2, 3, . . . }, negative whole numbers {−1, −2, −3, . . . }, and zero {0}.
  2. A complete unit or entity.

[From Latin, whole, complete.]


Search unanswered questions...
Enter a question here...
Search: All sources Community Q&A Reference topics

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 iPhone/iTouch

Measures and Units: integer
Top

integral number

mathematics Any whole number.


Whole-valued positive or negative number or 0. The integers are generated from the set of counting numbers 1, 2, 3, . . . and the operation of subtraction. When a counting number is subtracted from itself, the result is zero. When a larger number is subtracted from a smaller number, the result is a negative whole number. In this way, every integer can be derived from the counting numbers, resulting in a set of numbers closed under the operation of subtraction (see group theory).

For more information on integer, visit Britannica.com.

Science Dictionary: integers
Top
(in-tuh-juhrz)

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).

A whole number; not a fraction.

Word Tutor: integer
Top
pronunciation

IN BRIEF: A whole number, that is not a fraction.

pronunciation 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.

Wikipedia: Integer (computer science)
Top

In computer science, the term integer is used to refer to a data type which represents some finite subset of the mathematical integers. These are also known as integral data types[citation needed].

Contents

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 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 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 (assuming two's complement for signed) Decimal digits Uses
4 nibble, semioctet
Unsigned: 0 to +15 2 Binary-coded decimal, single decimal digit representation.
8 byte, octet Signed: −128 to +127 3 ASCII characters, C/C++ char, C/C++ uint8_t, int8_t, Java byte, C# byte, T-SQL tinyint
Unsigned: 0 to +255 3
16 halfword, word, short, int Signed: −32,768 to +32,767 5 UCS-2 characters, C/C++ short, C/C++ int (minimum), C/C++ uint16_t, int16_t, Java short, C# short, Java char
Unsigned: 0 to +65,535 5
32 word, long, doubleword, longword Signed: −2,147,483,648 to +2,147,483,647 10 UCS-4 characters, Truecolor with alpha, C/C++ long (on Windows and 32-bit DOS and Unix), C/C++ uint32_t, int32_t, Java int, C# int, FourCC
Unsigned: 0 to +4,294,967,295 10
64 doubleword, longword, long long, quad, quadword, int64 Signed: −9,223,372,036,854,775,808 to +9,223,372,036,854,775,807 19 C/C++ long (on 64-bit Unix), C/C++ long long, C/C++ uint64_t, int64_t, Java long, C# long, Delphi int64
Unsigned: 0 to +18,446,744,073,709,551,615 20
128 octaword 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 39 C only available as non-standard compiler-specific extension, Visual Basic Decimal[1]
Unsigned: 0 to +340,282,366,920,938,463,463,374,607,431,768,211,455 39
n n-bit integer
(general case)
Signed: ( − 2n − 1) to (2n − 1 − 1) \lceil (n-1) \log_{10}{2} \rceil Ada range -2**(n-1)..2**(n-1)-1
Unsigned: 0 to (2n − 1) \lceil n \log_{10}{2} \rceil 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, 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.

Bytes and octets

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.

Words

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.

As of 2008, practically all new desktop processors are of the x86-64 family and capable of using 64-bit words, they are however often used in 32-bit mode. 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.

See also

Notes

  1. ^ Visual Basic's Decimal datatype holds signed 128-bit (16-byte) values representing 96-bit (12-byte) integer numbers scaled by a variable power of 10. The scaling factor specifies the number of digits to the right of the decimal point; it ranges from 0 through 28. With a scale of 0 (no decimal places), the largest possible value is +/-79,228,162,514,264,337,593,543,950,335 (+/-7.9228162514264337593543950335E+28). With 28 decimal places, the largest value is +/-7.9228162514264337593543950335, and the smallest nonzero value is +/-0.0000000000000000000000000001 (+/-1E-28).

Translations: Integer
Top

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. - 完整的事物, 整數, 整體

한국어 (Korean)
n. - 완전한 것, 정수

日本語 (Japanese)
n. - 整数

العربيه (Arabic)
‏(الاسم) عدد صحيح, كل تام‏

עברית (Hebrew)
n. - ‮מספר שלם (לא שבר)‬


Best of the Web: integer
Top

Some good "integer" pages on the web:


Math
mathworld.wolfram.com
 
 
 
Learn More
perfect square
even number (mathematics)
mixed number (mathematics)

Is the difference of an integer always an integer? Read answer...
Is there an integer that has a reciprocal that is also an integer? Read answer...
Is the sum of integers always an integer? Read answer...

Post a question - any question - to the WikiAnswers community:

 

Copyrights:

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
Computer Desktop Encyclopedia. THIS COPYRIGHTED DEFINITION IS FOR PERSONAL USE ONLY.
All other reproduction is strictly prohibited without permission from the publisher.
© 1981-2009 Computer Language Company Inc.  All rights reserved.  Read more
Measures and Units. A Dictionary of Weights, Measures, and Units. Copyright © Donald Fenna 2002, 2004. All rights reserved.  Read more
Britannica Concise Encyclopedia. Britannica Concise Encyclopedia. © 2006 Encyclopædia Britannica, Inc. All rights reserved.  Read more
Science Dictionary. 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
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
Word Tutor. Copyright © 2004-present by eSpindle Learning, a 501(c) nonprofit organization. All rights reserved.
eSpindle provides personalized spelling and vocabulary tutoring online; free trial Read more
Wikipedia. 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