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

Комментарии • 83

  • @wing3789
    @wing3789 4 года назад +19

    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.

  • @nchecker00
    @nchecker00 5 лет назад +2

    Thanks! I didn't even notice how the vid come to end. Great job

  • @drcl7429
    @drcl7429 4 года назад +29

    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 года назад +2

      @@codesymphony x.toString(2)

    • @codesymphony
      @codesymphony 2 года назад

      @@pipitgusmayanti8342 Thank you.

  • @avtem
    @avtem 4 года назад +17

    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!

  • @systemofapwne
    @systemofapwne 5 лет назад +12

    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?

  • @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.

  • @thesoftwarecoder1603
    @thesoftwarecoder1603 3 года назад +1

    Oh Mosh! You are incredible! Thank you so much! You saved my Day! Great explanation capabilities, easy and useful! Go ahead! Thanks a lot!

  • @toddroberts7886
    @toddroberts7886 5 лет назад +8

    This wasn't confusing at all actually, thanks to you.

  • @chandrakantht3738
    @chandrakantht3738 6 лет назад +3

    Awesome tutorial mash. Thanks for videos

  • @kaylanwalker5022
    @kaylanwalker5022 5 лет назад +1

    Thanks, needed this today to decode googles encoded polyline response when using the directions api with fetch.

  • @arthursvpb
    @arthursvpb 4 года назад

    This explanation was outstanding!

  • @yatnoktse6854
    @yatnoktse6854 5 лет назад

    clear enough to learn bitwise, thanks.

  • @mawesome4ever
    @mawesome4ever 3 года назад +1

    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!

  • @kingzeddicus
    @kingzeddicus 6 лет назад

    Thanks. This is very informative. I think this is a better approach to some things, definitely very useful.

  • @WebSurfingIsMyPastime
    @WebSurfingIsMyPastime 4 года назад +3

    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.

  • @97jknott
    @97jknott 5 лет назад

    Brilliant tutorial, thanks a lot.

  • @TheCodingOdyssey
    @TheCodingOdyssey 3 года назад +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

  • @valeriia869
    @valeriia869 Год назад

    Wow! Thanks for the clear explanation!

  • @bijay7
    @bijay7 9 месяцев назад

    This was really good. Your explanations are very crisp and to the point Mosh 👏🏽

  • @JD-oc3cd
    @JD-oc3cd 3 года назад

    Thanks mosh I was looking for this 🙏

  • @maresolaris
    @maresolaris 3 года назад

    Great thank you for this great explanation. Excellent work!

  • @gregattraf
    @gregattraf 5 лет назад

    Very nice explanation :) You have made it make sense!

  • @talk2s5061X
    @talk2s5061X 4 года назад

    Thanks mate really took me a while to get there cheers 😅

  • @nakiyingimiriam2460
    @nakiyingimiriam2460 3 года назад

    Thank you, i have understood clearly

  • @matthewblasco4720
    @matthewblasco4720 Год назад

    Your explanation is so good. So helpfullllll aaaaa

  • @wiskasIO
    @wiskasIO Год назад

    Thank you, very helpful.

  • @danielhbrito
    @danielhbrito 2 года назад

    Awesome example!

  • @CryptoJitsu
    @CryptoJitsu 3 года назад

    Fantastic explanation!!

  • @yutokirizaki7967
    @yutokirizaki7967 Год назад

    Thank you now I fully understand it

  • @grishavasilyan
    @grishavasilyan 11 месяцев назад

    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.

  • @shamirsas709
    @shamirsas709 2 года назад

    This was awesome. Thank you.

  • @kedar_bairagi
    @kedar_bairagi 3 года назад

    you are great teacher. thank you 🙏❤️

  • @caiocutrim3596
    @caiocutrim3596 4 года назад

    I really like that....I think it's simple

  • @danmiller7709
    @danmiller7709 3 года назад

    Great explanation! Just seems like an overly complicated validation system. But I'm sure that's selling it short. Thanks Mosh!

  • @Kitsune_Dev
    @Kitsune_Dev 4 года назад

    This is great thanks!

  • @carlosbenavides670
    @carlosbenavides670 4 года назад

    Good Stuff.
    Thanks Sr.

  • @RobertoGPuentesDiaz
    @RobertoGPuentesDiaz 2 года назад

    Thanks for video. I think same. Permissions is ubique case that use...

  • @lancemarchetti8673
    @lancemarchetti8673 Год назад

    I actually use this technique a lot with CTF obfuscation challenges.

  • @crcreatives3298
    @crcreatives3298 10 месяцев назад

    i am from india your explanatyoin is so amazing

  • @RagazzoKZ
    @RagazzoKZ 5 лет назад

    Cool! Thanks!

  • @maxgomes92
    @maxgomes92 4 года назад

    Great video!

  • @iamdanyaal
    @iamdanyaal 2 года назад

    Thank You Sir

  • @vincentpena7017
    @vincentpena7017 6 лет назад

    What vscode theme youre using? So sick! Thanks

  • @placeholder_name321
    @placeholder_name321 3 года назад

    the LEAST confusing I've ever watched on binary code and bitwise operators. Thank you!!

  • @Adarsh-ox3dt
    @Adarsh-ox3dt 3 года назад

    That's confusing but you makes it easy.

  • @FredoCorleone
    @FredoCorleone 6 лет назад

    Never used bitwise operator... But it is interesting

  • @josuebarros5727
    @josuebarros5727 2 года назад

    Very confusing but still very cool hehe. Thank you sooo much

  • @rotinaindependente
    @rotinaindependente 6 лет назад +15

    Please you need to organize a playlist, hehe!

  • @pereation599
    @pereation599 2 года назад

    Thanks. Top!

  • @sumabich721
    @sumabich721 2 года назад

    Okay this was helpful. I'd love to see some real examples for >> and

  • @Hasan-po6ud
    @Hasan-po6ud 3 года назад

    Thanks

  • @1421jenny
    @1421jenny 5 лет назад

    Once I pay for this course can I access it any time ? Is this a lifetime access course @mosh

  • @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!??

  • @MRLaboratorypro
    @MRLaboratorypro 4 года назад

    What software are you using?

  • @jpmourag2272
    @jpmourag2272 4 года назад

    what's your VSCode theme?

  • @nateo7045
    @nateo7045 4 года назад +1

    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?

  • @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 !

  • @davidyomtobian8505
    @davidyomtobian8505 3 года назад

    great video can you also explain how

  • @imdadulzaman3450
    @imdadulzaman3450 5 лет назад +2

    this video went over my head

  • @johnbaxter7582
    @johnbaxter7582 2 года назад

    Mosh : "bitwise operators don't have much uses"
    Me : "Are you sure about that?"

  • @aylictal
    @aylictal 5 лет назад +1

    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

  • @AruljothySundramoorthy
    @AruljothySundramoorthy 2 года назад

    Awesome

  • @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.

  • @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 ?

  • @JT-mr3db
    @JT-mr3db 2 месяца назад

    And just like that, demystified!

  • @deltdev4540
    @deltdev4540 5 лет назад +4

    what do you mean " we human " mosh XD.... you superHuman

  • @dexdevlon
    @dexdevlon 2 года назад

    Mosh: Bitwise operators are not common
    Me seeing them in the wild be like:
    😶

  • @tomarik
    @tomarik 2 года назад

    LeetCode 78 solution #3

  • @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 10 месяцев назад

    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.

  • @Meleeman011
    @Meleeman011 3 года назад +1

    i'm here because of a leetcode challenge lol

  • @NphiniT
    @NphiniT Год назад

    Oh so it's just Logic from mathematics. Gotchya

  • @SuperIL12
    @SuperIL12 Месяц назад

    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.

  • @tognolibsas
    @tognolibsas 2 года назад

    I don't think that I will use this but anyways :;))

  • @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...

  • @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.