Technical data
Appendix
27.3 Data Types and Parameter Types
Programming with STEP 7
Manual, 05/2010, A5E02789666-01 595
27.3.2.4 Format of the Data Types WORD and DWORD in Binary Coded Decimal
Numbers
The binary-coded decimal (BCD) format represents a decimal number by using groups of binary
digits (bits). One group of 4 bits represents one digit of a signed decimal number or the sign of the
decimal number. The groups of 4 bits are combined to form a word (16 bits) or double word (32
bits). The four most significant bits indicate the sign of the number (1111 indicates minus and
0000 indicates plus). Commands with BCD-coded addresses only evaluate the highest-value bit
(15 in word, 31 in double word format). The following table shows the format and range for the two
types of BCD numbers.
Format Range
Word
(16 bits, three-digit BCD number with sign)
-999 to +999
Double word
(32 bits, seven-digit BCD number with sign)
-9 999 999 to +9 999 999
The following figures provide an example of a binary coded decimal number in the following
formats:
• Word format
• Double word format