Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Integer (computer science)
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== Words === {{Main article|Word (computer architecture)}} The term 'word' is used for a small group of bits that are handled simultaneously by processors of a particular [[computer architecture|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-, 40-, 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.<ref name="agnerfog" /> Practically all new desktop processors are capable of using 64-bit words, though [[Embedded system|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 {{mono|int}} a variable that will be used to store values greater than 2<sup>15</sup>β1, the program will fail on computers with 16-bit integers. That variable should have been declared as {{mono|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. This issue is resolved by C99 in [[stdint.h]] in the form of {{code|intptr_t}}. The ''bitness'' of a program may refer to the word size (or bitness) of the processor on which it runs, or it may refer to the width of a memory address or pointer, which can differ between execution modes or contexts. For example, 64-bit versions of [[Microsoft Windows]] support existing 32-bit binaries, and programs compiled for Linux's [[x32 ABI]] run in 64-bit mode yet use 32-bit memory addresses.<ref>{{cite news |author=Thorsten Leemhuis |date=2011-09-13 |title=Kernel Log: x32 ABI gets around 64-bit drawbacks |url=http://www.h-online.com/open/features/Kernel-Log-x32-ABI-gets-around-64-bit-drawbacks-1342061.html |archive-url=https://web.archive.org/web/20111028081253/http://www.h-online.com/open/features/Kernel-Log-x32-ABI-gets-around-64-bit-drawbacks-1342061.html |archive-date=28 October 2011 |access-date=2011-11-01 |publisher=www.h-online.com}}</ref>
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)