Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
13
Task/Bitwise-operations/RLaB/bitwise-operations.rlab
Normal file
13
Task/Bitwise-operations/RLaB/bitwise-operations.rlab
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
>> x = int(3);
|
||||
>> y = int(1);
|
||||
>> z = x && y; printf("0x%08x\n",z); // logical 'and'
|
||||
0x00000001
|
||||
>> z = x || y; printf("0x%08x\n",z); // logical 'or'
|
||||
0x00000003
|
||||
>> z = !x; printf("0x%08x\n",z); // logical 'not'
|
||||
0xfffffffc
|
||||
>> i2 = int(2);
|
||||
>> z = x * i2; printf("0x%08x\n",z); // left-shift is multiplication by 2 where both arguments are integers
|
||||
0x00000006
|
||||
>> z = x / i2; printf("0x%08x\n",z); // right-shift is division by 2 where both arguments are integers
|
||||
0x00000001
|
||||
Loading…
Add table
Add a link
Reference in a new issue