4

Logic Operations

The Micro PLC Instruction Set includes these Logic operations:

Word AND The AND function compares each bit in one register against each bit in another. If both bits are 1, it places a 1 in the corre- sponding bit of a third register.

Inclusive OR The Inclusive OR function compares each bit in one register against each bit in another. If either or both bits are 1, it places a 1 in the corresponding bit of a third register.

Exclusive OR The XOR function compares each bit in one register against each bit in another. If both bits are the same (1 or 0), it places a 0 in the corresponding bit of a third register

Shift Register Shift Register Right shifts all the bits in a register to the right

Right (toward the least significant bits) by a specified number of positions.

Shift Register Shift Register Left shifts all the bits in a register to the rleft (to-

Leftward the most significant bits) by a specified number of posi- tions.

NOT

The NOT function takes the opposite state of each bit in a regis-

 

ter and places it into a second register.

4-38

Micro PLC Programmer's Guide ± April 1994

GFK-0804B

Page 79
Image 79
GE GFK-0804B manual Logic Operations, Not