magic number
magic number
magic number
Noun | 1. | ![]() |
单词 | magic number | |||
释义 | magic numbermagic numbermagic number
magic numbermagic number(jargon, programming)2. A number that encodes critical information used in analgorithm in some opaque way. The classic examples of theseare the numbers used in hash or CRC functions or thecoefficients in a linear congruential generator forpseudorandom numbers. This sense actually predates, andwas ancestral to, the more common sense 1. 3. Special data located at the beginning of a binary datafile to indicate its type to a utility. Under Unix, thesystem and various applications programs (especially thelinker) distinguish between types of executable file bylooking for a magic number. Once upon a time, these magicnumbers were PDP-11 branch instructions that skipped overheader data to the start of executable code; 0407, forexample, was octal for "branch 16 bytes relative". Nowadaysonly a wizard knows the spells to create magic numbers. MS DOS executables begin with the magic string "MZ". *The* magic number, on the other hand, is 7+/-2. The papercited below established the number of distinct items (such asnumeric digits) that humans can hold in short-term memory.Among other things, this strongly influenced the interfacedesign of the phone system. ["The magical number seven, plus or minus two: some limits onour capacity for processing information", George Miller, inthe "Psychological Review" 63:81-97, 1956]. magic numberIn programming, a magic number is a constant value used to identify a file format, protocol or error code. In many file formats, the first few bytes identify the file; for example, "PK" in ZIP files and the hex values "F8 D8" in JPEG files.Certain communications protocols use a magic number, such as the hex values "63 82 53 63" at the start of every DHCP packet or "FF 53 4D 42" at the beginning of every SMB request. See DHCP and SMB. Magic Constants The term also refers to fixed values in a program that are never expected to change. For example, an algorithm involving playing cards might frequently use the magic constant "52" without jokers or "54" with jokers (or "51" and "53" for offset addresses). Magic NumberPsychology Per G. Miller, the working memory’s holding capacity of about seven items magic number
Words related to magic number
|
|||
随便看 |
|
英语词典包含2567994条英英释义在线翻译词条,基本涵盖了全部常用单词的英英翻译及用法,是英语学习的有利工具。