beautypg.com

27 application instructions, 1 logical operation instructions – MITSUBISHI ELECTRIC 700 Series User Manual

Page 160

background image

155

Application instructions

3

SEQUENCE PRO

G

RAM

M

ING

3.27 Application instructions

Application instructions are used when special processing is required.

3.27.1 Logical Operation Instructions

(1) The logical operation instructions are instructions which perform the logical

operations such as logical add and logical product.

(2) The logical operation instructions are available in the following 10 types.

Classification

Instruction

Symbol

Classification

Instruction

Symbol

Classification

Instruction

Symbol

Logical

product

WAND

Exclusive OR

WXOR

2’s

complement

(Sign reversal)

NEG

WANDP

WXORP

NEGP

Logical add

WOR

Exclusive

NOR

WXNR

WORP

WXNRP

REMARKS

The logical operation instructions perform the following processings in units of one bit.

Classification

Processing

Operation

Expression

Example

A

B

Y

Logical product

Set to 1 only when both inputs A
and B are 1. Set to 0 otherwise.

Y=A•B

0

0

0

0

1

0

1

0

0

1

1

1

Logical add

Set to 0 only when both inputs A
and B are 0. Set to 1 to 1
otherwise.

Y=A+B

0

0

0

0

1

1

1

0

1

1

1

1

Exclusive OR

Set to 0 when inputs A and B are
equal. Set to 1 when they are
different.

Y=A•B+A•B

0

0

0

0

1

1

1

0

1

1

1

0

Exclusive NOR

Set to 1 when inputs A and B are
equal. Set to 0 when they are
different.

Y= (A+B) (A+B)

0

0

1

0

1

0

1

0

0

1

1

1