Message383607
I took print(100>>3), I dropped last 3 bits and added value ‘0’ to first 3
bits. Both manual calculation and python result was correct.
How can << shit operator and >> shit operator work differently , with
different logic ?
Thanks
Nandish
On Wed, Dec 23, 2020 at 12:54 AM Eric V. Smith <report@bugs.python.org>
wrote:
>
> Eric V. Smith <eric@trueblade.com> added the comment:
>
> Why do you think the first 3 bits should be dropped? That's not the
> documented behavior of <<.
>
> ----------
> nosy: +eric.smith
>
> _______________________________________
> Python tracker <report@bugs.python.org>
> <https://bugs.python.org/issue42720>
> _______________________________________
> |
|
Date |
User |
Action |
Args |
2020-12-22 19:35:07 | Nandish | set | recipients:
+ Nandish, eric.smith |
2020-12-22 19:35:07 | Nandish | link | issue42720 messages |
2020-12-22 19:35:07 | Nandish | create | |
|