All client storage hardware supported by CLIv2 follows the traditional organization. Storage is considered a contiguous sequence of binary digits, known as 'bits'. Contiguous groups of eight bits are known as 'bytes'; groups of four bytes are known as 'words'. Bits within bytes, bytes or words within storage are referred to from left to right: the first bit, byte, or word; the second bit, byte, or word; and so on. The smallest addressable unit is the byte, and each byte is addressed by a continuous sequence of ascending non-negative integers: the first byte is addressed as byte 0, the second as byte 1, and so on.
The same left-to-right ordering applies to any subset of storage. In any sequence of bytes, the first byte is the leftmost byte, the second byte is the next byte to the right, and so on. Such subsets are often referred to as 'fields'. It is common to refer to bytes within fields by their offset within that field: offset zero is the first byte in a field, offset one is the second byte, and so on.
While all fields consist of bits, what the encoding of the bits represents can be anything. Using the field as an unsigned integer means that each bit represents descending powers of two: the first bit corresponds to 2**7, the eighth to 2**0. In an unsigned integer field consisting of eight bits, the value of the field is the sum of each bit raised to its power. So an integer field of one byte can contain values zero (when all bits are zero) through 255 (when all bits are one). Unsigned integer fields can be of any length, though two bytes (allowing a maximum value of 65,535) and four bytes (allowing a maximum value of 4,294,967,295) are most common. Since the higher powers of two represent the greater magnitudes in the integer field, the bits and bytes of an integer are ordered from most significant on the left to least significant on the right. The nonce term 'Endian' is sometimes used to describe the location of the most significant bytes in a numeric field, so this numeric encoding might be described as 'Big-Endian', meaning that the biggest, or most significant, portions are leftmost. A signed integer field encodes the first bit in the field not as a power of two but as an indication of whether the value is positive or negative. The exact encoding is not important for this discussion, nor is the nature of the encoding for other numeric fields such as hexadecimal or binary or decimal floating point, or packed decimal.
What is important is that different client hardware architectures can result in different numbers of bits per byte or bytes per word; different ordering of bytes within storage, bytes within fields, or bytes within fields of particular uses; or different encodings of bits with particular types of fields. CLIv2 supports only the aspects relevant to the hardware on which it operates, so all terminology within this document assumes the hardware architecture described in this section.
Within the Teradata Database, fields may be stored according to its hardware architecture, but the appropriate conversion is performed when encoded data enters or leaves the Database, so that the client processes data properly encoded for its hardware.