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.
  • Наука та технологія

КОМЕНТАРІ • 50

  • @bluescanfly1981
    @bluescanfly1981 4 роки тому +4

    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

  • @paschalynukwuani6930
    @paschalynukwuani6930 Рік тому +1

    You are always the best. Thank you for zooming your screen to aid your viewers in seeing the code better.

  • @liveandlearn11
    @liveandlearn11 9 місяців тому

    Your tutorial broke through my mental block on Bitwise Operators. Thank you for making it so easy to understand.

  • @lend7107
    @lend7107 Рік тому +1

    Great video! you simplified what MDN Docs had me scratching my head at. Earned a subscriber.

  • @maskman4821
    @maskman4821 4 роки тому +1

    thank you for this tutorial, I have learned something !!!

  • @iuripires7285
    @iuripires7285 3 роки тому

    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!

  • @ifeoluwasegundaystar9786
    @ifeoluwasegundaystar9786 2 роки тому

    thank you for this!

  • @216syed
    @216syed Рік тому

    Great explanation!!

  • @elenduchinazo2301
    @elenduchinazo2301 Рік тому

    thank you so much. this is a well detailed video

  • @bilaljohn7372
    @bilaljohn7372 4 роки тому

    Awesome as always 👌👌👌

  • @isratjaman8921
    @isratjaman8921 2 роки тому

    thank you! thank you! thanks a million.

  • @IvanHaha
    @IvanHaha 4 роки тому +7

    The first application that came to my mind was checking if a number is odd or even with:
    `let isOdd = number & 1 ? true : false;`

    • @maskman4821
      @maskman4821 4 роки тому

      translation: if (number & 1) is true (equals 1), then isOdd is an odd number, or it is an even number !!!

    • @Techsithtube
      @Techsithtube  4 роки тому +1

      That is a very simple and elegant example of how to use bit-wise operators in a real application. Thanks for sharing!

  • @krisnarusdiono1304
    @krisnarusdiono1304 3 роки тому +1

    tbh sir i love the way you explain it to me ... i wish you would share your knowledge to us

  • @felipemenesesdittel6799
    @felipemenesesdittel6799 3 роки тому

    THANKS!

  • @srinumajji501
    @srinumajji501 4 роки тому

    Thanks Sir😀 for the video

  • @hamidrezakazemi7746
    @hamidrezakazemi7746 4 роки тому +1

    thanks

  • @explore_with_buddha
    @explore_with_buddha Рік тому

    Well explained

  • @nima_hkh
    @nima_hkh 4 роки тому

    I really appreciate you. Thanks a lot

    • @Techsithtube
      @Techsithtube  4 роки тому

      You are very welcome! Thanks for watching!

  • @ArjunSingh-oo1mh
    @ArjunSingh-oo1mh 4 роки тому +1

    concept is clear no doubt, can you please give a real world example or any algorithm where we can use it.
    Thanks

    • @Techsithtube
      @Techsithtube  4 роки тому

      Arjun , here is a huge list of algorithms that you can solve using bitwise operators. www.geeksforgeeks.org/bitwise-algorithms/

  • @duelgamerz2666
    @duelgamerz2666 3 роки тому

    excellent explanation of the topic

    • @Techsithtube
      @Techsithtube  3 роки тому

      Glad it was helpful Ruchika! Thanks for watching!

  • @sumitmobiotics3161
    @sumitmobiotics3161 4 роки тому

    thanks for your video. create a video about how to create mini project , with good coding style with vue js

  • @TheCodingOdyssey
    @TheCodingOdyssey 3 роки тому

    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!

  • @riyastir
    @riyastir 3 роки тому +1

    It's very useful

  • @nadaing
    @nadaing 2 роки тому

    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.

  • @bikisaha2992
    @bikisaha2992 4 роки тому

    Hi! please help me to convert this array var [-1, 0, 12, 5, -23] to [1, 0, -12, -5, 23] without using loop.

  • @saienrique
    @saienrique 3 роки тому

    Can u pls give more real world examples in javascript for this

  • @diwakarprasad2835
    @diwakarprasad2835 4 роки тому

    Other than video tutorials what will be the best websites to learn javascript and new features ofJavascript?

    • @Techsithtube
      @Techsithtube  4 роки тому +1

      mozilla has a great archive called mdn , it can get bit complex but its a great place to learn js.

  • @loveneetsingh820
    @loveneetsingh820 4 роки тому

    i am stuck on server-side rendering can anyone help me?

  • @GaneshKumar-fv2cg
    @GaneshKumar-fv2cg 4 роки тому

    SIr - Please post on GraphQL if possible

    • @Techsithtube
      @Techsithtube  4 роки тому +2

      Ganesh, Yes I am actually focused on graphQL recently. Will creating tutorials on it soon. Thanks for the suggestion.

  • @maskman4821
    @maskman4821 4 роки тому +1

    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`)
    }

    • @Techsithtube
      @Techsithtube  4 роки тому +1

      Stephen, thanks for sharing , this is a great example.

    • @dtho6231
      @dtho6231 3 роки тому

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

  • @subham-raj
    @subham-raj 4 роки тому +5

    *If you are a competitive programmer then you will know about this*

    • @Daniel_WR_Hart
      @Daniel_WR_Hart 4 роки тому

      I've seen leetcode solutions where they did some kind of black magic using |

  • @yqang2904
    @yqang2904 4 роки тому +1

    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 '&'

    • @Techsithtube
      @Techsithtube  4 роки тому +2

      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.

    • @yqang2904
      @yqang2904 4 роки тому +1

      @@Techsithtube that is alright. I just had a good laugh

  • @rajabmuhamedrajab5128
    @rajabmuhamedrajab5128 3 роки тому

    left shift And Right shift

  • @olehsavchuk
    @olehsavchuk 4 роки тому

    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.

  • @nareshbhati7527
    @nareshbhati7527 3 роки тому

    Very basic tutorial, not mentioned the real use cases of these.