Bitwise Operators in Python - Tutorial & Application Fields

Поделиться
HTML-код
  • Опубликовано: 13 июл 2024
  • In this video, we learn everything about bitwise operators and we also discuss what they are used for.
    ◾◾◾◾◾◾◾◾◾◾◾◾◾◾◾◾◾
    📚 Programming Books & Merch 📚
    🐍 The Python Bible Book: www.neuralnine.com/books/
    💻 The Algorithm Bible Book: www.neuralnine.com/books/
    👕 Programming Merch: www.neuralnine.com/shop
    🌐 Social Media & Contact 🌐
    📱 Website: www.neuralnine.com/
    📷 Instagram: / neuralnine
    🐦 Twitter: / neuralnine
    🤵 LinkedIn: / neuralnine
    📁 GitHub: github.com/NeuralNine
    🎙 Discord: / discord
    🎵 Outro Music From: www.bensound.com/
    Timestamps:
    (0:00) Intro
    (1:23) Bitwise Operators Explained
    (15:20) Application - Flags & Permissions
    (22:35) Application - XOR Variable Swap
    (26:30) Application - Even or Odd
    (27:34) Application - Log2 Algorithm Shifting
    (28:00) Outro
  • НаукаНаука

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

  • @calitts4708
    @calitts4708 2 года назад +13

    Hey! Just realize you reached 100k! Congrats!

  • @kenny-kvibe
    @kenny-kvibe 2 года назад +9

    This is exactly what I've been missing about these bitwise operators!!
    Thank you, great video!

  • @gambichiang2012
    @gambichiang2012 3 месяца назад +1

    I stuck on Cisco Python 3.3.5 and your explanation is much clearer. Thanks a lot.

  • @thomasgoodwin2648
    @thomasgoodwin2648 2 года назад +11

    Xor also has another interesting property. If you take a variable and xor it with some value, then xor it again with that same value, you get back the original variable. This makes it useful for encryption.
    It was also used a lot during the early days for crude graphics manipulation.
    All operators were used in 1s and 2s compliment integer math, logical reductions ( Karnaugh maps) and face it... digital computers, as they exist today, are composed of millions to billions of individual logic gates (and, or, nand, nor, xor, xnor).
    Bit level math used to be the 1st item in the computer science curriculum. The fact that it is now only mentioned as a kind of obscure side note kinda gives you an indication of far down the abstraction rabbit hole we have traveled.

    • @PorkBoy69
      @PorkBoy69 3 месяца назад +1

      XOR is used in a similar manner in some versions of RAID. It can detect corrupted data and infer what it is to recover it

  • @vladimirtayzhev4211
    @vladimirtayzhev4211 2 года назад +2

    Thanks man! I really loved the Application fields. Not many youtubers list examples of applications. This is most useful.

  • @aditya_asundi
    @aditya_asundi 2 года назад +1

    Congrats on 100k!!

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

    Congrats on 100k!

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

    Very Clear! Great Examples! Thanks
    Your video came in handy for interview practice problems!

  • @insho.
    @insho. 5 месяцев назад

    quick, precise. thanks

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

    Good video. I'm a rookie and was having trouble with bitwise.

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

    Really a great explanation! Thank you.

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

    Super helpful, ty so much!

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

    Congrats to the 100k subs bro

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

    Thanks a lot! This is really helpful.

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

    Just learned it this weekend 😃.

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

    thanks a lot, it was amazing 👏❤

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

    Thanks a lot.

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

    thanks man

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

    GG 100k🔥❤️

  • @sarvarjuraev1376
    @sarvarjuraev1376 18 дней назад

    Thanks a lot

  • @Tom-dq7tl
    @Tom-dq7tl Год назад

    thanks!

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

    you're my hero Flori!

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

    congrats for 100k

  • @sirojiddinyakubov
    @sirojiddinyakubov 2 года назад +1

    very good video

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

    Danks again.

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

    Please continue with the codewars challenges series, they're pretty entertaining and engaging

  • @MajonezaEU
    @MajonezaEU 6 месяцев назад

    thy man you saved my life

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

    thank youu

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

    dude is on gear big time

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

    Where datt Silver play button be ❤️❤️
    Congratulations!

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

    Congratulations

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

    22:47 I believe this would be an effective way to swap two variables in any programming language; Heck, I just tried it in Java!

  • @bhavyamverma70
    @bhavyamverma70 2 года назад +2

    Nice video bro, just want to ask what is theme of your pycharm?

    • @NeuralNine
      @NeuralNine  2 года назад +1

      One dark

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

      @@NeuralNine thankyou bro, I love your videos , direct at point , good explanation.

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

    How much faster is it to use bitwise operators to perform math like determining divisors or dividing by 2?

    • @mohsenhaddadi1117
      @mohsenhaddadi1117 2 года назад +1

      I test it after watching this video. The speed is the same.
      For boosting speed you should use cython.

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

    Python has both a bin() and hex() operator, I just realized!

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

    Pls bring on obsfucation in python plss

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

    100 more

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

    I don't feel smart for immediately commenting before watching the video but could you do a video on a chatbot that could hold conversation and seem a bit more intelligent. I understand if not, that would be hard, no?

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

    Bruh

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

    Only 400 more brother