PropertyValue
rdfs:label
  • Bit field
rdfs:comment
  • A bit field is an integer that is used to store a number of on/off flags (up to 32 flags per integer in NWScript). Each flag corresponds to a position in the binary (base 2) representation of an integer; the flag is considered "on" (or "set") if the binary digit (bit) in that position is a 1. Flags are often identified by the integer whose binary representation has just this designated digit being a 1.
owl:sameAs
dcterms:subject
abstract
  • A bit field is an integer that is used to store a number of on/off flags (up to 32 flags per integer in NWScript). Each flag corresponds to a position in the binary (base 2) representation of an integer; the flag is considered "on" (or "set") if the binary digit (bit) in that position is a 1. Flags are often identified by the integer whose binary representation has just this designated digit being a 1. Bit fields are often written in hexadecimal (base 16) notation, as this is more compact than binary notation and easier for human interpretation than decimal notation. Each hexadecimal digit represents four flags — 0x1, 0x2, 0x4, and 0x8 — that when added together give the value of that digit. (The decimal values 10 through 15 are represented in hexadecimal by the "digits" A through F.) Many calculators, including the scientific mode of the calculator program included with Windows, are capable of handling numbers in hexadecimal notation, which can be an aid to those unfamiliar with hexadecimal arithmetic. (The leading "0x" indicates that a number is in hexadecimal and is typically not used by calculators.)