Chapter 5 Instruction Specifications

Item number

 

Arithmetic instructions-6

 

 

Name

 

Binary multiplication (BINARY MULTIPLICATION)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Ladder format

 

 

 

 

 

 

Condition code

 

 

 

 

Processing time (s)

Remark

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

R7F4

 

R7F3

 

R7F2

R7F1

 

R7F0

Average

Maximum

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

d = s1 ⋅ s2

 

 

DER

 

ERR

 

SD

 

V

 

 

 

C

 

 

 

 

 

 

Upper case: W

 

 

 

 

 

 

 

 

 

 

z

 

 

z

 

z

 

 

 

z

43

 

 

Lower case: DW

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Instruction format

 

 

 

 

 

 

Number of steps

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Condition

 

 

 

Steps

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

d = s1 ⋅ s2

 

 

 

 

 

Word

 

 

 

 

 

4

 

 

112

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Double word

 

 

 

6

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Bit

 

 

 

 

 

 

 

Word

 

Double word

 

Constant

 

 

 

Usable I/O

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Other

 

 

 

X

Y

M

 

 

CU, CT

 

WX

WY

WM

 

TC

DX

DY

DM

 

 

 

 

 

 

 

 

 

 

R,

 

 

TD, SS,

 

 

 

 

WR,

 

 

 

 

DR,

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

d

Substitution destination

 

 

 

 

 

 

 

 

 

 

{

 

{

 

{

 

{

{

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

s1

Multiplicand

 

 

 

 

 

 

 

 

 

 

 

{

{

 

{

 

{

{

{

{

 

{

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

s2

Multiplier

 

 

 

 

 

 

 

 

 

 

 

{

{

 

{

 

{

{

{

{

 

{

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Function

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Multiplies s1 and s2 as the binary data, and substitutes the result into d+1 (upper digit) and d (lower digit) in binary.

The DER flag is set to “1” if d+1 exceeds the usable I/O range (in this case only the lower word is substituted), and “0” when it does not exceed.

 

 

 

MSB

0

 

Example: WR0012 = WR0010 ⋅ WR0011

 

Example: WR0014 = DR0010 ⋅ DR0012

 

 

 

 

 

 

 

 

 

 

s1

 

 

 

 

WR0010

 

 

 

WR0011

WR0010

 

 

 

 

MSB

0

 

 

 

WR0011

 

 

 

DR0010

 

 

 

 

 

 

 

 

 

s2

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

WR0013

WR0012

 

 

 

 

 

 

 

 

 

WR0013

WR0012

 

 

 

 

 

MSB

0

 

 

 

 

 

DR0012

 

 

 

 

 

 

 

 

 

 

 

 

 

 

d+1

d

 

 

 

 

DR0012

 

 

 

 

 

 

 

 

 

 

 

WR0017

WR0016

WR0015

WR0014

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

DR0016

DR0014

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Notes

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

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

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

d

s1

 

s2

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Word

Word

 

Word

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Double word

Double word

Double word

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

• Since the operation results are always substituted into d and d + 1, note that the word or double-word at d + 1 is not used as the I/O of others.

Program example

 

X00000

 

 

LD X00000

 

WR0002 = WR0000 * WR0001

 

[

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

WR0002 = WR0000 * WR0001

 

 

 

 

 

 

 

 

 

 

 

 

]

 

 

 

 

 

 

Program description

• When input X00000 is on, the product of WR0000 value and WR0001 value is substituted into WR0002.

d = s1 x s2

5-51

Page 101
Image 101
Hitachi NJI-350B manual Arithmetic instructions-6, Binary multiplication Binary Multiplication, Word 112 Double word