. 
... 
.. 
.. 
- 
. 
---I- 
.. 
. 
_...... 
BIN  Bit 
10 
Bit 
9 
bit 
DEC 
1024 
512 
value 
:PROGRAMMING 
Bit8 
Bit7 
Bit6  Bit 
5 
Bit4  Bit 
3 
Bit 2 
Bit 
1 
Bit 0 
256 
128  64  32  16 
8 
4 
2 
1 
umeric value and character representation 
I 
DEC 
0 
1 
2 
3 
4 
All numeric values and characters are  processed in binary (BIN)  by the PLC CPU 
with  all data  represented by  two  states, 
0 
and 
1. 
The PLC  CPU has conversion 
functions  between  binary  and  decimal  (DEC),  and  also  between  binary  and 
hexadecimal 
(HEX), 
therefore sequence  programs can  be written  and  operation 
results monitored in decimal or hexadecimal. The A1 
S 
CPU can process both 
16 
bit 
and 
32 
bit data, 
BIN  BCD 
0  0 
1 
1 
10  10 
11 
11 
100 
100 
1 
Binary (BIN) 
I 
Binary represents numeric values as  a series 
of 
0’s 
and  1’s. After  a 
1, 
a  carry 
occurs when 
using 
the  BIN  system.  Below  is  an  example  of  decimal  values 
represented in binary, the shaded areas indicate where a carry has occurred. 
BIN bits correspond to DEC values as indicated below: 
Example: BIN value, 1100101 
= 
64 
+ 
32 
+ 
4 
+ 
1 = DEC value, 101 
I 
Binarv 
coded 
decimal 
IBCDI 
I 
Binary coded decimal 
is 
a  code  for  representing decimal  numbers  in 
a 
binary 
format. in the BCD system a carry occurs after 
9. 
Examples 
of 
corresponding DEC, 
BIN, 
and BCD values are 
shown 
below 
74