9.4 How Program Functions Handle Numerical Data
Regardless of where data is stored in memory—in one of the bit memories or one of the
word memories–the application program can handle it as different data types.
Type
Name
Description
Data Format
BIT Bit
A Bit data type is the smallest unit of
memory. It has two states, 1 or 0. The
programmer functions use the term
BOOL for bit-type data.
BYTE
Byte
A Byte data type has an 8-bit value.
The valid range is 0 to 255 (0 to FF in
hexadecimal).
WORD
A Word data type uses 16 consecutive
bits of data memory; but, instead of the
bits in the data location representing a
number, the bits are independent of
each other. Each bit represents its own
binary state (1 or 0). The valid range of
word values is 0 to +65,535 (FFFF).
BCD-4
Four-Digit
Binary Coded
Decimal
Four-digit BCD numbers use 16-bit
data memory locations. Each BCD digit
uses four bits and can represent
numbers between 0 and 9. BCD coding
of the 16 bits has a value range of 0 to
9999.
REAL
Floating-Point
Real numbers use two consecutive
16-bit memory locations. The range of
numbers that can be stored in this
format is ± 1.401298E-45 to
± 3.402823E+38. Refer to the following
table for more information.
Two’s Complement Values
INT
Signed Integer
Signed integer data uses 16-bit
memory locations. Signed integers are
represented in 2's complement
notation. Bit 16 is the sign bit,
Two’s Complement Values
(0 = positive, 1 = negative). Their range
is -32,768 to +32,767.
DINT
Double
Precision
Signed Integer
Double precision signed integers data
uses two consecutive 16-bit memory
locations. They are represented in 2's
complement notation. Bit 32 is the sign
bit, (0 = positive, 1 = negative). Their
range is -2,147,483,648 to
+2,147,483,847.
Two’s Complement Values
120 GFK-1503E VersaMax PLC User Manual
For public disclosure