To program well, we need to know binary, decimal, and hexadecimal numbers. The following chart shows the relationships between these notations.
In Cubloc’s Ladder Logic, we express binary and hexadecimal numbers in the following manner:
Binary: 00101010B Hexadecimal: 0ABCDH
We put a B at the end of the binary number and an H at the end for hexadecimal numbers. To clearly identify that a hexadecimal value is a number, we can put a 0 in front of the hexadecimal number. (E.g. : 0ABH, 0A1H, 0BCDH )
*BASIC is slightly different from Ladder Logic in the way binary and hexadecimal numbers are expressed. &B100010 is used for binary and &HAB is used for hexadecimal.