The thumbs down was a bit shifted off to the left, lost it's place on screen, you know what they are like. A great explanation, and well presented too!
This is so devine and clearly explained! Thanks a lot for the demonstration that is so easy to comprehend on such a complex matter. Perfect educational material!
I really feel so dumb. I don't understand anything my uni lecturer says, unlike my classmates. If it weren't for UA-cam tutorial videos, I would have failed already.
These are operators used by programmers in various languages. >> is an arithmetic right shift which preserves the sign bit of a number encoded in binary, whereas >>> is a logical right shift (also known as an unsigned right shift) that treats the sign bit like all the other bits. For example -2 can be written in binary as 11111110. The leftmost bit is the sign bit, and a 1 at this position indicates that this is a negative number. When >> is applied (-2 >> 1), the bit pattern becomes 11111111, which is -1. Everything except the sign bit has moved right, so the existing sign bit is preserved. On the other hand, when the >>> operator is applied to 11111110 (-2 >>> 1) the sign bit is treated like any other bit, so everything including the sign bit moves right. The left hand side is padded with zeros and the result is 01111111, which is 127. Logical shifts are useful in cryptography. :)KD
if I am not wrong, The name is incorrect. the logical shift right would give the wrong answer for (-)negative values. because it would move the MSB which is important for signed values. The arithmetic shift is used for signed values. which would not affect the MSB.
Probably the best video on bit shifting!
Thank you :)KD
How can this video have a thumbs down? This series is great, you've done an amazing job in explaining it, and the animations couple it perfectly.
You're very kind. Comment much appreciated. Thanks :)KD
The thumbs down was a bit shifted off to the left, lost it's place on screen, you know what they are like. A great explanation, and well presented too!
This is so devine and clearly explained! Thanks a lot for the demonstration that is so easy to comprehend on such a complex matter. Perfect educational material!
You're too kind. Thank you :)KD
DUDE !!!! Thanks a lot man :D Never felt so good after reading such a basic thing.
This is such a life saver. Thanks for the context here where my uni lecturer failed.
You're most welcome
I really feel so dumb. I don't understand anything my uni lecturer says, unlike my classmates. If it weren't for UA-cam tutorial videos, I would have failed already.
concise and clear explanations. also, i really liked the examples which show exactly how it is actually used.
Thanks for the series, just watched everything :)
You're welcome :) KD
After watching the serious bitwise operators seem pretty logical after all
Your voice is what David attenborough is for nature documentaries but for computer science videos
That is incredibly flattering - thank you :)KD
i appreciate you and your videos, smart kind human
Very clear. I think this will help me a lot!
great tutorial series
Thank you :)KD
Awesome explanation!
yeah, this was great
Glad you like. :)KD
Felt elated while learning this :)
Fantastic. Thanks for commenting. :)KD
Watching this video would've saved me half of 30 hours of headache on my computer assignment.
Also what is the difference between >> and >>>
These are operators used by programmers in various languages. >> is an arithmetic right shift which preserves the sign bit of a number encoded in binary, whereas >>> is a logical right shift (also known as an unsigned right shift) that treats the sign bit like all the other bits. For example -2 can be written in binary as 11111110. The leftmost bit is the sign bit, and a 1 at this position indicates that this is a negative number. When >> is applied (-2 >> 1), the bit pattern becomes 11111111, which is -1. Everything except the sign bit has moved right, so the existing sign bit is preserved. On the other hand, when the >>> operator is applied to 11111110 (-2 >>> 1) the sign bit is treated like any other bit, so everything including the sign bit moves right. The left hand side is padded with zeros and the result is 01111111, which is 127. Logical shifts are useful in cryptography.
:)KD
@@ComputerScienceLessons omg thank you!
Superb video!
as always thank you
You are very welcome :)KD
if I am not wrong,
The name is incorrect.
the logical shift right would give the wrong answer for (-)negative values.
because it would move the MSB which is important for signed values.
The arithmetic shift is used for signed values. which would not affect the MSB.
what is the difference between logical shift and arithmetic shift?
I always thought your channel photo was a picture of Jupiter 🤣🤣
It's my daughter shouting through a hole in a rock when she was three year old :)KD
@@ComputerScienceLessons :)
why is 10.5 round to 10 and not 11?
It was rounded down!
yes
:) KD