Appendix 4 Data Used In The Cpu Module - Mitsubishi Electric L02SCPU User's Manual And Reference

Melsec-l series, cpu module
Table of Contents

Advertisement

Appendix 4
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.
Bit name
Bit weight
Decimal value
(2) DEC (decimal)
DEC represents binary data of the CPU module in decimal notation. ( Page 342, Section 6.2)
(3) HEX (hexadecimal)
HEX represents binary data of the CPU module in hexadecimal notation. ( Page 343, Section 6.3)
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. ( Page 343, Section 6.4)
Data Used in the CPU Module
Most significant bit (for determination of positive/negative value)
b15
b14 b13 b12 b11 b10 b9 b8 b7 b6 b5 b4 b3 b2 b1 b0
15
2
2
14
2
13
2
12
2
11
2
10
2
-32768
16384
8192
4096 2048 1024 512 256 128
A value is negative when the most significant bit is "1".
9
2
8
2
7
2
6
2
5
2
4
2
3
2
2
64
32
16
8
4
APPX
2
1
2
0
2
1
389
A

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents