Bit Operations; Bit Inversion (Complement) - Mitsubishi Electric R16MTCPU Programming Manual

Hide thumbs Also See for R16MTCPU:
Table of Contents

Advertisement

4.6

Bit Operations

Bit inversion (Complement): ~

Format
~(S)
Setting data
■Usable data
: Usable
Setting
Usable Data
data
Bit
device
(S)
■Description, data type of result
Setting data
(S)
Processing details
The bit inverted value of the data specified with (S) is found.
Operation error
An operation error will occur if:
• (S) is an indirectly specified device and its device No. is outside the range.
Program example
■Program which finds the bit inverted value of #0 and substitutes the value to D0
D0 = ~#0
b15
D0
1
1 0 1 1 0 1 0 1 1 0 0 1 0 1 1
4 OPERATION CONTROL PROGRAMS
138
4.6 Bit Operations
Number of basic steps
4
Word device
16-bit
32-bit
64-bit
integer
integer
floating
type
type (L)
point
type (F)
Description
Data whose bits will be inverted
b0
Usable steps
F/FS
Constant
16-bit
32-bit
64-bit
integer
integer
floating
type
type
point
(K/H)
(K/H, L)
type (K)
b15
b0
#0
0
0 0 0 0 0 0
1
1 1
1 1 1
0 0 0
G
Calculation
Bit
expression
conditional
expression
Data type of result
Data type of (S) (Integer type)
Comparison
conditional
expression

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

R64mtcpuMelsec iq-r seriesR32mtcpu

Table of Contents