Appendix 3 Data Used In The Cpu Module - Mitsubishi L02CPU User Manual

Melsec-l series
Hide thumbs Also See for L02CPU:
Table of Contents

Advertisement

Appendix 3
In the CPU module, data such as numeric values and alphabets are represented as a series of bits, "0" and "1". This
notation is called BIN (binary).
In addition, DEC (decimal), HEX (hexadecimal), BCD (binary-coded decimal), and floating-point data are available.
(1) BIN (binary code)
BIN is a data notation where a value is represented as a series of bits "0" and "1". Each place digit is shifted to the
higher digit when the value exceeds 1.
The value ranged from -32768 to 32767 can be stored in the CPU module.
Decimal value
(2) DEC (decimal)
DEC represents binary data of the CPU module in decimal notation. (
(3) HEX (hexadecimal)
HEX represents binary data of the CPU module in hexadecimal notation. (
In hexadecimal notation, four bits are handled as one digit. Because the place value in a digit is from 0 to 15 in
decimal notation, a value larger than nine is represented by A, B, C, D, E, or F. When the value is larger than F,
the digit is shifted to the higher digit.
This notation is useful when using 16-bit devices such as the data register and link register.
(4) BCD (binary-coded decimal)
BCD is a data notation that represents a value in the ones place of a decimal number in a binary number. As with
hexadecimal notation, data are represented in four bits but the alphabets A to F are not used. This notation is
useful when handling data from external devices, such as digital switches.
(5) Floating-point data
In floating point data, real number data are handled as a numeric value with the decimal point. The single-
precision floating-point data and double-precision floating-point data are available. (
312
Data Used in the CPU Module
Most significant bit (for determination of positive/negative value)
Bit name
b15
b14 b13 b12 b11 b10 b9 b8 b7 b6 b5 b4 b3 b2 b1 b0
Bit weight
15
14
13
2
2
2
2
-32768
16384
8192
4096 2048 1024 512 256 128
A value is negative when the most significant bit is "1".
12
11
10
9
8
7
6
2
2
2
2
2
2
64
5
4
3
2
1
0
2
2
2
2
2
2
32
16
8
4
2
1
Page 275, Section 6.2
Page 276, Section 6.3
Page 276, Section 6.4
)
)
)

Advertisement

Table of Contents
loading

This manual is also suitable for:

L26cpu-bt

Table of Contents