Chapter 7. CPU Program Data136 PACSystems* RXi Distributed IO Controller User Manual GFK-2816F7.8 How Program Functions Handle Numerical DataRegardless of where data is stored in memory – in one of the bit memories or one of the wordmemories – the application program can handle it as different data types.7.8.1 Data TypesType Name Description Data FormatBOOL Boolean The smallest unit of memory. Has two states, 1 or 0. ABOOL array may have length N.BYTE Byte Has an 8-bit value. Has 256 values (0–255). A BYTEarray may have length N.WORD Word Uses 16 consecutive bits of data memory. The validrange of word values is 0000 hex to FFFF hex.Register1 (16 bit states)16 1DWORD Double Word Has the same characteristics as a single word datatype, except that it uses 32 consecutive bits in datamemory instead of only 16 bits.Register 232Register 11617 1(32 bit states)UINT UnsignedIntegerUses 16-bit memory data locations. They have a validrange of 0 to +65535 (FFFF hex).Register1 (Binary value)16 1INT SignedIntegerUses 16-bit memory data locations, and arerepresented in 2’s complement notation. The validrange of an INT data type is –32768 to +32767.Register 1 (Two’sComplementvalue)16 1Ss=sign bit (0=positive,1=negative)DINT DoublePrecisionIntegerStored in 32-bit data memory locations (two consecutive16-bit memory locations). Always signed values (bit 32is the sign bit). The valid range of a DINT data typeis -2147483648 to +2147483647 s=sign bit (0=positive,1=negative)REAL Floating Point Uses 32 consecutive bits (two consecutive 16-bitmemory locations). The range of numbers that can bestored in this format is from ±1.401298E-45 to±3.402823E+38. For the IEEE format, refer to Section7.8.2, Floating Point Numbers.Register 232Register 11617 1(IEEE format)LREAL DoublePrecisionFloating PointUses 64 consecutive bits (four consecutive 16-bitmemory locations). The range of numbers that can bestored in this format is from ±2.2250738585072020E-308 to ±1.7976931348623157E+308. For the IEEEformat, refer to Section 7.8.2, Floating Point Numbers.Register 232Register 11617 1(IEEE format)Register 464Register 34849 33BCD-4 Four-DigitBCDUses 16-bit data memory locations. Each binary codeddecimal (BCD) digit uses four bits and can representnumbers between 0 and 9. This BCD coding of the 16bits has a legal value range of 0 to 9999.Register 1(4 BCD digits)13 1594 3 2 1sRegister 232Register 11617 1(Binary value)