sovereign-intelligence
Front door to Drake Stapleton's sovereign stack.
Brought by drakestapleton
sovereign-intelligence / harness / examples / int_bits_and.om
| 1 | note int_bits_and: and, or, xor on integers are bitwise. 12 is 1100, 10 is 1010, so and gives 1000 = 8 |
| 2 | fn main to int |
| 3 | x = ulong 12 |
| 4 | y = and x ulong 10 |
| 5 | z = and int 12 int 10 |
| 6 | if ne int y z |
| 7 | ret 1 |
| 8 | end |
| 9 | ret z |
| 10 | end |