Hexspeak
From Wikipedia, the free encyclopedia
Hexspeak, like leetspeak, is a novelty form of variant English spelling.
Hexspeak was created by programmers who wanted a magic number, a clear and unique identifier with which to mark memory or data. Using hexadecimal notation, which includes the digits 0123456789ABCDEF, it is possible to create small words, with the digits "0" and "1" being used to represent the letters "O" and "L".
Contents |
[edit] Common magic numbers
As of 2006, most well-known Hexspeak magic numbers are 32 bits, i.e. 8 hex digits, due to the use in 32-bit CPU architectures. 16-bit magic numbers also exist, while 64-bit hexspeak magic numbers are rarer.
Well-known Hexspeak magic numbers include:
- 0xDEADBEEF
- 0xDECAFBAD
- 0xCAFEBABE
- 0xBAADFEED
- 0xFEEDFACE
- 0xBAADF00D
- 0xC0EDBABE
- 0xBADCAB1E
- 0xC001D00D
- 0xDEADC0DE
- 0x1BADBABE
[edit] Notable magic numbers
Many computer processors, operating systems, and debuggers make use of magic numbers, especially as a magic debug value.
- 0xABADBABE ("a bad babe") is used by Apple as the "Boot Zero Block" magic number.
- 0xBAADF00D ("bad food") is used by Microsoft's LocalAlloc(LMEM_FIXED) to indicate uninitialised allocated heap memory.
- 0xDEADBEEF ("dead beef") is used by IBM RS/6000 systems and Mac OS on 32-bit PowerPC processors as a magic debug value.
- 0xCAFEBABE ("cafe babe") is used by both Mach-O ("Fat binary" in both 68k and PowerPC) to identify object files and the Java programming language to identify Java bytecode class files
See Magic number (programming)#Magic debug values for the full list.
[edit] Alternative letters
The C programming language notation uses the "0x" prefix to indicate a hexadecimal number; the "0x" is usually ignored when reading the letters. Other notations offer more letters:
- In the Intel assembly language, hexadecimal numbers are denoted by a "h" suffix. For example: FEEDADEADF15h ("feed a dead fish"). Note that numbers in this notation that begin with a letter have to start with a zero to distinguish them from variable names. "FEEDADEADF15h" would then be "0FEEDADEADF15h".
- In the Pascal programming language, hexadecimal numbers are denoted by a "$" prefix. This allows words starting with the letter "S", for example $EED ("seed").