6F3B0250
7. Instructions
Logical operations
FUN | Name | Expression | Function | Steps | Speed | Available | Page | |
No. |
|
|
|
| (ms) | T1 | T1S |
|
048 | AND | Finds logical AND of A and B, | 4 | 5.7 | Ö | Ö | 174 | |
|
|
| and stores it in C. |
|
|
|
|
|
050 | OR | Finds logical OR of A and B, | 4 | 5.7 | Ö | Ö | 175 | |
|
|
| and stores it in C. |
|
|
|
|
|
052 | Exclusive OR | Finds logical exclusive OR of A | 4 | 5.7 | Ö | Ö | 176 | |
|
|
| and B, and stores it in C. |
|
|
|
|
|
064 | Bit test | Turns ON output if logical AND | 3 | 5.0 | Ö | Ö | 181 | |
|
|
| of A and B is not 0. |
|
|
|
|
|
Shift operations
FUN | Name |
|
|
| Expression | Function | Steps | Speed | Available | Page | |||||
No. |
|
|
|
|
|
|
|
|
|
|
| (ms) | T1 | T1S |
|
068 | 1 bit shift right | Shifts data of A 1 bit to the right | 2 | 6.8 | Ö | Ö | 182 | ||||||||
|
|
|
|
|
|
|
|
|
| (LSB direction). The carry flag |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| changes according to the result. |
|
|
|
|
|
069 | 1 bit shift left | Shifts data of A 1 bit to the left | 2 | 6.8 | Ö | Ö | 183 | ||||||||
|
|
|
|
|
|
|
|
|
| (MSB direction). The carry flag |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| changes according to the result. |
|
|
|
|
|
070 | n bit shift right | Shifts data of A n bits to the right | 4 | 10.2 | Ö | Ö | 184 | ||||||||
|
|
|
|
|
|
|
|
|
| (LSB direction) and stores the |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| result in B. The carry flag |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| changes according to the result. |
|
|
|
|
|
071 | n bit shift left | n ® B ]- | Shifts data of A n bits to the left | 4 | 10.2 | Ö | Ö | 185 | |||||||
|
|
|
|
|
|
|
|
|
| (MSB direction) and stores the |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| result in B. The carry flag |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| changes according to the result. |
|
|
|
|
|
074 | Shift register | D |
|
| SR |
|
|
| Q | When shift input (S) comes ON, | 3 | 65.9 - | Ö | Ö | 186 |
|
|
|
|
| |||||||||||
|
| S |
|
| (n) |
|
|
|
| shifts the data of specified shift |
| 76.2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| ||||
|
| E |
|
| A |
|
|
|
| register 1 bit to the left, and |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
|
|
|
|
|
|
|
|
|
| stores data input (D) state into A. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| This operation is enabled while |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| enable input (E) is ON. The carry |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| flag changes according to the |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| result. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| Shift register: n devices starting |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| with device A. |
|
|
|
|
|
075 | D |
|
| DSR |
|
|
| Q | When shift input (S) comes ON, | 3 | 69.0 - | Ö | Ö | 188 | |
|
| ||||||||||||||
|
|
|
| ||||||||||||
| shift register | S |
|
| (n) |
|
|
|
| shifts the data of specified shift |
| 79.3 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |||||
|
| E |
|
|
|
|
|
|
| register 1 bit to the left or to the |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| ||
|
| L |
|
| A |
|
|
|
| right depending on direction input |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
|
|
|
|
|
|
|
|
|
| (L). This operation is enabled |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| while enable input (E) is ON. The |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| carry flag changes according to |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| the result. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| Shift register: n devices starting |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| with device A. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| Direction: Left when L is ON, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| right when L is OFF |
|
|
|
|
|
Basic Hardware and Function 127
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net