Bitwise Operators JavaScript
Вставка
- Опубліковано 10 бер 2020
- Bitwise Operators , And, OR , exclusive OR ( XOR ) , NOT , Zero fill left shift , Signed right shift , Zero fill right shift in JavaScript
#bitwise #operator #javaScript
★★E-degree to do with Eduonix★★ ( Apply coupon - "TECH20" to get 20% off!)
Full-stack JavaScript E-degree- bit.ly/2Gtyx5F
The Complete Web Development Tutorial Using React and Redux - bit.ly/37AMfzh
Projects in React Native: Learn By Building Real World Apps - bit.ly/2tNVii1
*My Udemy Courses
www.udemy.com/js-masterclass/
www.udemy.com/course/react-ho...
Follow me for technology updates
* / techsith
* / techsith
* / techsith1
* / 13677140
* / patelhemil
Help me translate this video.
* ua-cam.com/users/timedtext_cs_...
Note: use translate.google.com/ to translate this video to your language. Let me know once you do that so i can give you credit. Thank you in advance. - Наука та технологія
Great stuff.. One little note: "Binary operator" refers to arity - that it uses 2 operands not that the operands are in binary. There are also ternary (?:) and unary operators (++) . The operators we're talking about are logical / Boolean operators - they're often used interchangeably, but some materials make the distinction
You are always the best. Thank you for zooming your screen to aid your viewers in seeing the code better.
Your tutorial broke through my mental block on Bitwise Operators. Thank you for making it so easy to understand.
Great video! you simplified what MDN Docs had me scratching my head at. Earned a subscriber.
thank you for this tutorial, I have learned something !!!
Man, THANK YOU VERY MUCH! I finally understood this, dude! I'm reading the book Cracking the Coding Interview and one problem there has two different implementations. One of them has bitwise operation. You freaking saved me!
thank you for this!
Great explanation!!
thank you so much. this is a well detailed video
Awesome as always 👌👌👌
thank you! thank you! thanks a million.
The first application that came to my mind was checking if a number is odd or even with:
`let isOdd = number & 1 ? true : false;`
translation: if (number & 1) is true (equals 1), then isOdd is an odd number, or it is an even number !!!
That is a very simple and elegant example of how to use bit-wise operators in a real application. Thanks for sharing!
tbh sir i love the way you explain it to me ... i wish you would share your knowledge to us
Thanks a ton
THANKS!
Thanks Sir😀 for the video
thanks
Well explained
I really appreciate you. Thanks a lot
You are very welcome! Thanks for watching!
concept is clear no doubt, can you please give a real world example or any algorithm where we can use it.
Thanks
Arjun , here is a huge list of algorithms that you can solve using bitwise operators. www.geeksforgeeks.org/bitwise-algorithms/
excellent explanation of the topic
Glad it was helpful Ruchika! Thanks for watching!
thanks for your video. create a video about how to create mini project , with good coding style with vue js
would have been nice to see some applications as well, if one just sees how something works, but no real world application, one is bound to forget it. Thanks for the video though!
It's very useful
Glad you think so!
alright techsith, I get it and I did learn something new, thank you. it reminds me of some Logic problems I've looked at before... but I can't help to wonder (as a new programmer) why? why so much sweet number logic? Wasn't binary enough in the first place? also, I'll gladly translate your video to spanish if nobody has already.
Hi! please help me to convert this array var [-1, 0, 12, 5, -23] to [1, 0, -12, -5, 23] without using loop.
Can u pls give more real world examples in javascript for this
Other than video tutorials what will be the best websites to learn javascript and new features ofJavascript?
mozilla has a great archive called mdn , it can get bit complex but its a great place to learn js.
i am stuck on server-side rendering can anyone help me?
SIr - Please post on GraphQL if possible
Ganesh, Yes I am actually focused on graphQL recently. Will creating tutorials on it soon. Thanks for the suggestion.
The best example is to tell an odd or even number :
getEvenOrOddNumber(68) // output : 68 is Even number
getEvenOrOddNumber(73) // output : 73 is Odd number
function getEvenOrOddNumber(num) {
let temp = num & 1 ? true : false
if (temp) console.log(`${num} is Odd number`)
if (!temp) console.log(`${num} is Even number`)
}
Stephen, thanks for sharing , this is a great example.
@@Techsithtube I always use these whenever making a card or board game. You can have the first for bits represent the value and the last 4 the suit. They are really useful whenever you want to encode anything. It is actually faster and way easier to manipulate then making any type of object or something similar a shame people really underestimate just how useful and imo better using bitwise operators are to encode things like cards, gameboards, and many other things.
*If you are a competitive programmer then you will know about this*
I've seen leetcode solutions where they did some kind of black magic using |
Lol. You could have put in the correction earlier. I was staring at the '&' and trying to see how is that different from the AND operator '&'
YQ, after I edited the video I realize the mistake, I am glad that I caught it while reviewing it . I hope It was clear after the correction. sorry about that.
@@Techsithtube that is alright. I just had a good laugh
left shift And Right shift
The tons of application of this complicated subject is left untold. Will not bother learning bitwise operators. On interview will say it's out of scope of real world application and ask to explaine one if interviewer will dissagree.
Very basic tutorial, not mentioned the real use cases of these.