JavaScript Bitwise Operators

  Рет қаралды 99,485

Programming with Mosh

Programming with Mosh

6 жыл бұрын

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

Пікірлер: 83
@wing3789
@wing3789 4 жыл бұрын
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.
@drcl7429
@drcl7429 4 жыл бұрын
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
@codesymphony
@codesymphony 2 жыл бұрын
can you convert it back to binary? or at least a string that represents the binary?
@pipitgusmayanti8342
@pipitgusmayanti8342 2 жыл бұрын
@@codesymphony x.toString(2)
@codesymphony
@codesymphony 2 жыл бұрын
@@pipitgusmayanti8342 Thank you.
@nchecker00
@nchecker00 5 жыл бұрын
Thanks! I didn't even notice how the vid come to end. Great job
@avtem
@avtem 4 жыл бұрын
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!
@user-sw1wq8lh2w
@user-sw1wq8lh2w 3 жыл бұрын
showing a permissions system as a bitwise example really helped me to see the use cases for this type of work.
@toddroberts7886
@toddroberts7886 5 жыл бұрын
This wasn't confusing at all actually, thanks to you.
@systemofapwne
@systemofapwne 5 жыл бұрын
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).
@tonyynot484
@tonyynot484 3 жыл бұрын
.. then use libs.. why go the hard way when there's an easy way?
@WebSurfingIsMyPastime
@WebSurfingIsMyPastime 4 жыл бұрын
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.
@kaylanwalker5022
@kaylanwalker5022 5 жыл бұрын
Thanks, needed this today to decode googles encoded polyline response when using the directions api with fetch.
@thesoftwarecoder1603
@thesoftwarecoder1603 3 жыл бұрын
Oh Mosh! You are incredible! Thank you so much! You saved my Day! Great explanation capabilities, easy and useful! Go ahead! Thanks a lot!
@mawesome4ever
@mawesome4ever 3 жыл бұрын
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!
@TheCodingOdyssey
@TheCodingOdyssey 3 жыл бұрын
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
@bijay7
@bijay7 9 ай бұрын
This was really good. Your explanations are very crisp and to the point Mosh 👏🏽
@chandrakantht3738
@chandrakantht3738 6 жыл бұрын
Awesome tutorial mash. Thanks for videos
@kingzeddicus
@kingzeddicus 6 жыл бұрын
Thanks. This is very informative. I think this is a better approach to some things, definitely very useful.
@yatnoktse6854
@yatnoktse6854 5 жыл бұрын
clear enough to learn bitwise, thanks.
@grishavasilyan
@grishavasilyan Жыл бұрын
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.
@arthursvpb
@arthursvpb 4 жыл бұрын
This explanation was outstanding!
@JD-oc3cd
@JD-oc3cd 4 жыл бұрын
Thanks mosh I was looking for this 🙏
@talk2s5061X
@talk2s5061X 4 жыл бұрын
Thanks mate really took me a while to get there cheers 😅
@97jknott
@97jknott 5 жыл бұрын
Brilliant tutorial, thanks a lot.
@gregattraf
@gregattraf 5 жыл бұрын
Very nice explanation :) You have made it make sense!
@danmiller7709
@danmiller7709 3 жыл бұрын
Great explanation! Just seems like an overly complicated validation system. But I'm sure that's selling it short. Thanks Mosh!
@vincentpena7017
@vincentpena7017 6 жыл бұрын
What vscode theme youre using? So sick! Thanks
@maresolaris
@maresolaris 3 жыл бұрын
Great thank you for this great explanation. Excellent work!
@valeriia869
@valeriia869 Жыл бұрын
Wow! Thanks for the clear explanation!
@CryptoJitsu
@CryptoJitsu 3 жыл бұрын
Fantastic explanation!!
@lancemarchetti8673
@lancemarchetti8673 Жыл бұрын
I actually use this technique a lot with CTF obfuscation challenges.
@nakiyingimiriam2460
@nakiyingimiriam2460 3 жыл бұрын
Thank you, i have understood clearly
@yutokirizaki7967
@yutokirizaki7967 Жыл бұрын
Thank you now I fully understand it
@shamirsas709
@shamirsas709 2 жыл бұрын
This was awesome. Thank you.
@matthewblasco4720
@matthewblasco4720 Жыл бұрын
Your explanation is so good. So helpfullllll aaaaa
@caiocutrim3596
@caiocutrim3596 4 жыл бұрын
I really like that....I think it's simple
@Kitsune_Dev
@Kitsune_Dev 4 жыл бұрын
This is great thanks!
@wiskasIO
@wiskasIO 2 жыл бұрын
Thank you, very helpful.
@kedar_bairagi
@kedar_bairagi 3 жыл бұрын
you are great teacher. thank you 🙏❤️
@placeholder_name321
@placeholder_name321 3 жыл бұрын
the LEAST confusing I've ever watched on binary code and bitwise operators. Thank you!!
@MRLaboratorypro
@MRLaboratorypro 4 жыл бұрын
What software are you using?
@RobertoGPuentesDiaz
@RobertoGPuentesDiaz 2 жыл бұрын
Thanks for video. I think same. Permissions is ubique case that use...
@danielhbrito
@danielhbrito 2 жыл бұрын
Awesome example!
@RagazzoKZ
@RagazzoKZ 5 жыл бұрын
Cool! Thanks!
@carlosbenavides670
@carlosbenavides670 4 жыл бұрын
Good Stuff. Thanks Sr.
@rotinaindependente
@rotinaindependente 6 жыл бұрын
Please you need to organize a playlist, hehe!
@1421jenny
@1421jenny 5 жыл бұрын
Once I pay for this course can I access it any time ? Is this a lifetime access course @mosh
@josuebarros5727
@josuebarros5727 2 жыл бұрын
Very confusing but still very cool hehe. Thank you sooo much
@jpmourag2272
@jpmourag2272 4 жыл бұрын
what's your VSCode theme?
@maxgomes92
@maxgomes92 4 жыл бұрын
Great video!
@crcreatives3298
@crcreatives3298 10 ай бұрын
i am from india your explanatyoin is so amazing
@sumabich721
@sumabich721 2 жыл бұрын
Okay this was helpful. I'd love to see some real examples for >> and
@nateo7045
@nateo7045 4 жыл бұрын
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?
@FredoCorleone
@FredoCorleone 6 жыл бұрын
Never used bitwise operator... But it is interesting
@mattgraves3709
@mattgraves3709 3 жыл бұрын
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!??
@Adarsh-ox3dt
@Adarsh-ox3dt 3 жыл бұрын
That's confusing but you makes it easy.
@imdadulzaman3450
@imdadulzaman3450 5 жыл бұрын
this video went over my head
@iamdanyaal
@iamdanyaal 2 жыл бұрын
Thank You Sir
@azatkadyrov3634
@azatkadyrov3634 4 жыл бұрын
Wow amazing. It always bothered me not to care about bitwise operators, but your video made very clear how useful they can be !
@aylictal
@aylictal 5 жыл бұрын
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
@johnbaxter7582
@johnbaxter7582 2 жыл бұрын
Mosh : "bitwise operators don't have much uses" Me : "Are you sure about that?"
@pereation599
@pereation599 2 жыл бұрын
Thanks. Top!
@Hasan-po6ud
@Hasan-po6ud 3 жыл бұрын
Thanks
@MathewAlex-hc4bf
@MathewAlex-hc4bf Жыл бұрын
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 ?
@umairashraf3130
@umairashraf3130 6 жыл бұрын
Good introduction, but why you need decimal at one place and binary at other?
@arsfreelance
@arsfreelance 5 жыл бұрын
because bitwise operate at binary numbers level.
@davidyomtobian8505
@davidyomtobian8505 3 жыл бұрын
great video can you also explain how
@dexdevlon
@dexdevlon 2 жыл бұрын
Mosh: Bitwise operators are not common Me seeing them in the wild be like: 😶
@deltdev4540
@deltdev4540 5 жыл бұрын
what do you mean " we human " mosh XD.... you superHuman
@JT-mr3db
@JT-mr3db 2 ай бұрын
And just like that, demystified!
@AruljothySundramoorthy
@AruljothySundramoorthy 2 жыл бұрын
Awesome
@danialothman
@danialothman 11 ай бұрын
i was so sure i am never gonna use bit operations, then I got involved in IoT and hardware. RIP
@tomasuhrik1662
@tomasuhrik1662 11 ай бұрын
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.
@tomarik
@tomarik 2 жыл бұрын
LeetCode 78 solution #3
@Meleeman011
@Meleeman011 3 жыл бұрын
i'm here because of a leetcode challenge lol
@NphiniT
@NphiniT Жыл бұрын
Oh so it's just Logic from mathematics. Gotchya
@SuperIL12
@SuperIL12 2 ай бұрын
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.
@fulanipride5529
@fulanipride5529 3 жыл бұрын
Honestly I don't wanna say this but I don't understand. BTW I guess u said they're not that important right...
@coldcoder23
@coldcoder23 2 жыл бұрын
I don't think that I will use this but anyways :;))
@ShackWrong
@ShackWrong 3 жыл бұрын
fuggedaboutit...
@ohmegatech666
@ohmegatech666 Жыл бұрын
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
@Aswodel
@Aswodel Жыл бұрын
CS50 week 4 problem set uses bitwise operators and doesn't really explain it well enough to understand it.
Bitwise Operators and WHY we use them
8:41
Alex Hyett
Рет қаралды 66 М.
JavaScript Getters and Setters | Mosh
6:37
Programming with Mosh
Рет қаралды 237 М.
孩子多的烦恼?#火影忍者 #家庭 #佐助
00:31
火影忍者一家
Рет қаралды 51 МЛН
1 or 2?🐄
00:12
Kan Andrey
Рет қаралды 58 МЛН
HAPPY BIRTHDAY @mozabrick 🎉 #cat #funny
00:36
SOFIADELMONSTRO
Рет қаралды 15 МЛН
Async Await JavaScript ES7
26:39
techsith
Рет қаралды 120 М.
JavaScript Tutorial for Beginners: Learn JavaScript in 1 Hour
48:17
Programming with Mosh
Рет қаралды 12 МЛН
Complete Guide to JS Sets: How They Work & When To Use Them
18:38
Algorithms: Bit Manipulation
9:06
HackerRank
Рет қаралды 533 М.
C bitwise operators 🔣
6:47
Bro Code
Рет қаралды 67 М.
Object-oriented Programming in JavaScript: Made Super Simple | Mosh
1:02:49
Programming with Mosh
Рет қаралды 1,9 МЛН
Lecture 1: Introduction to CS and Programming Using Python
1:03:30
MIT OpenCourseWare
Рет қаралды 530 М.
JavaScript Loops
6:49
Programming with Mosh
Рет қаралды 412 М.
Operators In JavaScript | JavaScript Tutorial For Beginners
24:31
孩子多的烦恼?#火影忍者 #家庭 #佐助
00:31
火影忍者一家
Рет қаралды 51 МЛН