| LOGOR | |
| Syntax | LOGOR integer1 integer2
|
| Explanation |
LOGOR reports the bitwise logical OR of its two inputs. Each input is expressed internally as a sixteen digit binary number. A logical OR operation is performed on the pair of binary digits in each position, resulting in a sixteen bit integer. The logical OR operation is defined on the binary digits 0 and 1 as follows: LOGOR 0 0 = 0 |
| Examples | LOGOR 2 1 Result: 3 2 in base 10 is 10 in base 2; 1 in base 10 is 01 in base 2. In the 1's place, LOGOR 0 1 = 1. In the 2's place, LOGOR 1 0 = 1. Thus, 11 base 2 is obtained. 11 in base 2 is 3 in base 10. LOGOR 2 3 Result: 3 2 in base 10 is 10 in base 2; 3 in base 10 is 11 in base 2. In the 1's place, LOGOR 0 1 = 1. In the 2's place, LOGOR 1 1 = 1. Thus, 11 base 2 is obtained. 11 base 2 is 3 in base 10. |