I run following test code:
int v1 = 22;
int v2 = 23;
writeln( v1<<8 + v2 );
writeln( v1<<8 | v2 );
result is 0 and 5655
Why ( v1<<8 + v2 ) = 0 ?
Thread overview | |||||
---|---|---|---|---|---|
|
May 25, 2022 Why (v1<<8 + v2) different from (v1<<8 | v2)? | ||||
---|---|---|---|---|
| ||||
result is 0 and 5655 |
May 25, 2022 Re: Why (v1<<8 + v2) different from (v1<<8 | v2)? | ||||
---|---|---|---|---|
| ||||
Posted in reply to step8 | On Wednesday, 25 May 2022 at 12:42:04 UTC, step8 wrote: >
result is 0 and 5655
|
May 25, 2022 Re: Why (v1<<8 + v2) different from (v1<<8 | v2)? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Paul Backus | Thanks:) On Wednesday, 25 May 2022 at 12:42:04 UTC, step8 wrote: >
result is 0 and 5655
( |