JavaScript Bitwise Operators
HTML-код
- Опубликовано: 14 май 2018
- JavaScript Bitwise Operators
🔥Get the COMPLETE course (83% OFF - LIMITED TIME ONLY): bit.ly/2M1sp4B
Subscribe for more videos:
/ @programmingwithmosh
Want to learn more from me? Check out my blog and courses:
programmingwithmosh.com
/ programmingwithmosh
/ moshhamedani
It's truly impressive to be able to explain a concept this complex in such a simple and concise way. Bravo and thank you. I think I understand the basic concept now, but probably wouldn't be able to articulate it half as well if I were to relay the information. Gotta talk it out with my rubber ducky.
Thanks! I didn't even notice how the vid come to end. Great job
since ECMA 6 it is possible to write the binary values directly like how you do in other languages. i.e. assign using: let x = 0b1010101; console.log(x); will output 85
can you convert it back to binary? or at least a string that represents the binary?
@@codesymphony x.toString(2)
@@pipitgusmayanti8342 Thank you.
Wow! I've been learning c++ for 2 years, but you explained it so well for me, that now I understand a lot better everything!
Even though, you speak about how "special" the case is in terms of "when you need it" (and I can't disagree on that), I really also expected negate, XOR and also the bitwise shift operators. Once you started with bitwise operations, it's very common that you also will use the other operators too. In cryptography or bare network commnication, you will stumble upon this pretty fast (except if you use existing libs of course).
.. then use libs.. why go the hard way when there's an easy way?
showing a permissions system as a bitwise example really helped me to see the use cases for this type of work.
Oh Mosh! You are incredible! Thank you so much! You saved my Day! Great explanation capabilities, easy and useful! Go ahead! Thanks a lot!
This wasn't confusing at all actually, thanks to you.
Awesome tutorial mash. Thanks for videos
Thanks, needed this today to decode googles encoded polyline response when using the directions api with fetch.
This explanation was outstanding!
clear enough to learn bitwise, thanks.
Wow, this is exactly what i was looking for! Thank you! I wanted to make a permissions system similar to Discord and you gave me just the perfect example, wow!
Thanks. This is very informative. I think this is a better approach to some things, definitely very useful.
Exactly what I was looking for, literally had this same issue to resolve for work, had not been introduced to bitwise permissions prior to my current task.
Brilliant tutorial, thanks a lot.
this was really interesting. I'll go ahead and try this right now so I can better add it to my long term memory :D
Wow! Thanks for the clear explanation!
This was really good. Your explanations are very crisp and to the point Mosh 👏🏽
Thanks mosh I was looking for this 🙏
Great thank you for this great explanation. Excellent work!
Very nice explanation :) You have made it make sense!
Thanks mate really took me a while to get there cheers 😅
Thank you, i have understood clearly
Your explanation is so good. So helpfullllll aaaaa
Thank you, very helpful.
Awesome example!
Fantastic explanation!!
Thank you now I fully understand it
I'm trying to understand some part of React core concept and there used that biwise operators. Now I get what it is.
Thanks a lot.
This was awesome. Thank you.
you are great teacher. thank you 🙏❤️
I really like that....I think it's simple
Great explanation! Just seems like an overly complicated validation system. But I'm sure that's selling it short. Thanks Mosh!
This is great thanks!
Good Stuff.
Thanks Sr.
Thanks for video. I think same. Permissions is ubique case that use...
I actually use this technique a lot with CTF obfuscation challenges.
i am from india your explanatyoin is so amazing
Cool! Thanks!
Great video!
Thank You Sir
What vscode theme youre using? So sick! Thanks
the LEAST confusing I've ever watched on binary code and bitwise operators. Thank you!!
That's confusing but you makes it easy.
Never used bitwise operator... But it is interesting
Very confusing but still very cool hehe. Thank you sooo much
Please you need to organize a playlist, hehe!
Thanks. Top!
Okay this was helpful. I'd love to see some real examples for >> and
Thanks
Once I pay for this course can I access it any time ? Is this a lifetime access course @mosh
Thank the gods who power my computer for Mosh...I am almost there.
I have been all over asking:
Yes, properly confusing but WHY would we bother ?
and WHY shift them(java) with any certainty of what is happening!??
What software are you using?
what's your VSCode theme?
In the example you gave in the video, is there any reason to ever do that outside of just to learn about bitwise operators lol?
Wow amazing. It always bothered me not to care about bitwise operators, but your video made very clear how useful they can be !
great video can you also explain how
this video went over my head
Mosh : "bitwise operators don't have much uses"
Me : "Are you sure about that?"
A good use of bitwise operators is for generating voxels, or pixel data for some applications. I am dabbling a bit with mode7 graphics and an example of these two operators can be seen here:
codepen.io/simon-kyger/pen/WLaRmj
Awesome
Good introduction, but why you need decimal at one place and binary at other?
because bitwise operate at binary numbers level.
But javascript works on the 32 bit interger binary representation of the numbers right . This is 8 bit representation . This is wrong right? Is there anyone who can help me ?
And just like that, demystified!
what do you mean " we human " mosh XD.... you superHuman
Mosh: Bitwise operators are not common
Me seeing them in the wild be like:
😶
LeetCode 78 solution #3
i was so sure i am never gonna use bit operations, then I got involved in IoT and hardware. RIP
I am 100% going to replace one of my colleague's "logical or" with a "bitwise or" just to see them debug it with popcorn in my hands.
I am also 100% excommunicating anyone who ever uses this unironically for any kind of permissioning system.
i'm here because of a leetcode challenge lol
Oh so it's just Logic from mathematics. Gotchya
you should explain properly, explain the mathematics, how you convert from base 2 to base 10, and where are the other bitwise operators? The example was simple an probably fun for some, but confusing while you were building it up. For a 10 min video, it was decent. The main point of the video, explaining the 2 operators, was a succes, but you could've done more.
I don't think that I will use this but anyways :;))
Honestly I don't wanna say this but I don't understand.
BTW I guess u said they're not that important right...
fuggedaboutit...
Rhetoric like this gives web developers a bad name. This stuff isn't obscure technical junk, it's the basic foundations of programming. Saying that it doesn't have practical value is crazy. Sure some front-end only web devs might not be using bitwise operators in their code every day but they damn well better know what they do, and full stack developers are definitely going to use them regularly
CS50 week 4 problem set uses bitwise operators and doesn't really explain it well enough to understand it.