beautypg.com

Hitachi NJI-350B User Manual

Page 109

background image

Chapter 5 Instruction Specifications

5-59

Item number

Arithmetic instructions-14

Name

Exclusive OR

Ladder format

Condition code

Processing time (

µs)

Remark

R7F4

R7F3

R7F2

R7F1

R7F0

Average Maximum

d = s1 XOR s2

DER

ERR

SD

V

C

42

Upper case: B

z

z

z

z

z

Middle case: W

Instruction format

Number of steps

33

Lower case: DW

Condition

Steps

d = s1 XOR s2

Bit, word

4

66

Double word

6

Bit

Word

Double word

Usable I/O

X

Y

R,

M

TD, SS,

CU, CT

WX WY

WR,

WM TC DX DY

DR,

DM

C

onstant

Other

d

Substitution destination

{

{

{

{

{

{

{

s1 Comparand

{

{

{

{

{

{

{

{

{

{

{

s2 Relational number

{

{

{

{

{

{

{

{

{

{

{

Function

• Obtains exclusive OR (XOR) of s1 and s2, and substitutes the result into d.

s1

s2

d

0

0

0

0

1

1

1

0

1

1

1

0

Notes

• The combinations of d, s1 and s2 are as follows:

d

s1

s2

Bit

Bit

Bit

Word

Word

Word

Double word

Double word

Double word

Program example

WR0102= WR0100 XOR WR0101

X00112

DIF112

LD X00112
AND DIF112
[
WR0102=WR0100 XOR WR0101
]

Program description

• At the leading edge of X00112, the XOR of WR0100 and WR0101 is set in WR0102.

WR0100 = H1234
WR0101 = H5678
WR0102 = H444C

WR0100 = 0001001000110100
WR0101 = 0101011001111000
WR0102 = 0100010001001100

When

d

=

s1

XO

R

s2