Bitwise Operators In C++

SdĂ­let
VloĹžit
  • čas přidĂĄn 13. 09. 2024
  • JOIN ME
    -----
    CZcams 🎬 / @cppnuts
    Patreon 🚀 / cppnuts
    COMPLETE PLAYLIST
    ------------
    C++ Tutorial For Beginners: • Introduction To C++
    STL (Standard Template Library): • STL In C++
    ThreadIng In C++: • Multithreading In C++
    Data Structures: • Data Structure
    Algorithms: • Binary Search
    Design Patterns: • Factory Design Pattern...
    Smart Pointers: • Smart Pointer In C++
    C++14: • Digit Separator In C++
    C++17: • std string_view in C++...
    C++ All Type Casts: • static_cast In C++
    INTERVIEW PLAYLIST
    ------------
    C++ Interview Q&A: • Structural Padding & P...
    C++ Interview Q&A For Experienced: • How delete[] Knows How...
    Linked List Interview Questions: • Find Kth Node From Bac...
    BST Interview Questions: • Search Element In Bina...
    Array Interview Questions: • Reverse An Array
    String Interview Questions: • Check String Is Palind...
    Bit Manipulation Questions: • Find Set Bit In Intege...
    Binary Tree Interview Question: • Invert Binary Tree
    Sorting Algorithms: • Bubble Sort
    C++ MCQ: • Video
    C MCQ: • What printf returns af...
    C Interview Questions: • Designated Initializat...
    QUICK SHORT VIDEOS
    -------------
    C++ Short : • C++ Short Videos
    C Short : • Shorts C Programming MCQ
    In this video we will learn about BITWISE OPERATORS in c and c++.
    Following are the bitwise operators in c and c++:
    1. The bitwise AND in C or C++ takes two numbers as operands and does AND on every bit of two numbers. The result of AND is 1 only if both bits are 1.
    2. The bitwise OR in C or C++ takes two numbers as operands and does OR on every bit of two numbers. The result of OR is 1 if any of the two bits is 1.
    3. The bitwise XOR in C or C++ takes two numbers as operands and does XOR on every bit of two numbers. The result of XOR is 1 if the two bits are different.
    4. The left shift in C or C++ takes two numbers, left shifts the bits of the first operand, the second operand decides the number of places to shift.
    5. The right shift in C or C++ takes two numbers, right shifts the bits of the first operand, the second operand decides the number of places to shift.
    6. The bitwise NOT in C or C++ takes one number and inverts all bits of it.
    #cprogramming #cpp #programming #computerscience #softwareengineering #tutorial

Komentáře • 75

  • @exoticcoder5365
    @exoticcoder5365 Před 3 lety +1

    This is the CLEAREST explanation I have seen on CZcams

  • @amintacce819
    @amintacce819 Před rokem

    Excellent, thank you, bro. For the first time, I understand bitwise operators in C++

  • @princerainu9503
    @princerainu9503 Před 6 lety +4

    best lecture on youtube about bitwise operators (so deep)
    I love it

  • @deekshithpranav1619
    @deekshithpranav1619 Před 3 lety +1

    Thanks bro, understood all the operators very well. Glad I found this video on YT at the top of search results.

  • @superdanzo64
    @superdanzo64 Před 5 lety +8

    really appreciate the work man, 100% sure this will get me through my exams!

    • @CppNuts
      @CppNuts  Před 5 lety

      glad i could help!!

  • @rafaelduarte185
    @rafaelduarte185 Před 6 lety +3

    Helped me a lot, Thank you!

    • @CppNuts
      @CppNuts  Před 6 lety

      Rafael Duarte, Glad you liked it.

  • @sayedanwar2838
    @sayedanwar2838 Před 3 lety +1

    Thank you, this helped me, and you didn't bore me thank u.

  • @davidemmanuel8600
    @davidemmanuel8600 Před 6 měsĂ­ci

    Excellent Lecture. Thanks.❤️❤️❤️

  • @meghapaul1496
    @meghapaul1496 Před 3 lety

    The explanation for left and right shift operands is dayuumm 👌🎉!

  • @eduarddez4416
    @eduarddez4416 Před 3 lety +1

    Thanks alot man , it was very clear and simple.

  • @Harshavardhan-es5xt
    @Harshavardhan-es5xt Před 3 lety

    Very helpful in short time..

  • @sujitpaul2139
    @sujitpaul2139 Před 3 lety

    Very helpful video sir!

  • @deepbhattacharyya6146
    @deepbhattacharyya6146 Před 2 lety

    ❤️❤️❤️❤️ very clear explanation 👍👍

    • @CppNuts
      @CppNuts  Před 2 lety

      Glad it was helpful!

  • @shahanaz_akter189
    @shahanaz_akter189 Před 5 lety +2

    Thank you so much sir for gift us this video

  • @sbsyr5555
    @sbsyr5555 Před 7 lety +3

    Nice explanation.

    • @CppNuts
      @CppNuts  Před 7 lety

      Thanks dude enjoy the learning :)

  • @jason_liam
    @jason_liam Před 3 lety +1

    Great videos ! Which software are you using for writing and highlighting on screen?

    • @CppNuts
      @CppNuts  Před 3 lety

      I take screenshots and draw on image.

  • @manupareek76
    @manupareek76 Před 4 lety +1

    Thanks sir....Hearty Salute..... Pls continue making videos....

  • @amulikekennedy3550
    @amulikekennedy3550 Před 6 lety +1

    this was really helpful thanks man

    • @CppNuts
      @CppNuts  Před 6 lety

      +Amulike Kennedy Welcome dude.
      Keep Learning!!

  • @lalitachauhan7038
    @lalitachauhan7038 Před 6 lety +1

    Nice explanation.thank you

    • @CppNuts
      @CppNuts  Před 6 lety

      Glad you liked it!!

  • @codinghand2807
    @codinghand2807 Před 3 lety

    Great Explanation brother. It helped me a lot. Hare Krishna❤️❤️❤️❤️❤️

  • @gfarhan33
    @gfarhan33 Před 3 lety

    thanks man!

  • @IntellectX12
    @IntellectX12 Před 2 lety

    Excellent 👍

  • @GauravKumar-ue7nz
    @GauravKumar-ue7nz Před 3 lety

    Thanks a Lot

  • @The_Student_phase
    @The_Student_phase Před 4 lety +1

    It was awesome.... thank u sir.

  • @robertsampson4000
    @robertsampson4000 Před 4 lety

    Great video, keep up the good work! :)

  • @vasireddyganesh
    @vasireddyganesh Před 4 lety +1

    Why parenthesis is needed in (a&b)

    • @CppNuts
      @CppNuts  Před 4 lety

      Parenthesis is needed to group operations and its preference is high.

    • @vasireddyganesh
      @vasireddyganesh Před 4 lety

      @@CppNuts yeah but why it is not executing... If there is no parthesis... Without parenthesis iam getting an error in case of bitwise operations

    • @CppNuts
      @CppNuts  Před 4 lety

      @@vasireddyganesh Please show your program.

    • @vasireddyganesh
      @vasireddyganesh Před 4 lety +1

      @@CppNuts
      #include
      Using namespace std;
      Int main()
      {
      Int a, b;
      Cin>>a>>b;
      Cout

    • @CppNuts
      @CppNuts  Před 4 lety

      Seems cout is getting confused here, should I print a a or should I print a & b.
      That's why when you are using parentheses that time it is sure that the result of a & b is going to be printed.

  • @saurabhpandey2018
    @saurabhpandey2018 Před 3 lety

    If(1) {Sir can you please share the resources from where you got this level of deep knowledge in c++}

    • @CppNuts
      @CppNuts  Před 3 lety +1

      Hahahaha
      No i don't have name for that, it comes with time.

  • @sonulohani
    @sonulohani Před 7 lety +1

    nice one bro

    • @CppNuts
      @CppNuts  Před 7 lety

      +Sonu Lohani Thanks dude..

  • @mdrezaulkarim47
    @mdrezaulkarim47 Před 4 lety +1

    thank u

  • @__3093
    @__3093 Před 3 lety

    nice!

    • @CppNuts
      @CppNuts  Před 3 lety

      Thanks for the visit

  • @phaneendrakondle4560
    @phaneendrakondle4560 Před 4 lety

    ~1 is -2 right???

  • @IshaqKhan-rk5bl
    @IshaqKhan-rk5bl Před 6 lety +1

    what is advatage of using left shift operator???

    • @IshaqKhan-rk5bl
      @IshaqKhan-rk5bl Před 6 lety +1

      i mean use of

    • @CppNuts
      @CppNuts  Před 6 lety +1

      there are so many advantages, one of them is it gets double. So if you just want to make some number double then instead of multiplying with 2 is costly process. Insted use left shift.

  • @RakeshThakur-eo2ug
    @RakeshThakur-eo2ug Před 4 lety

    Osm video

  • @MuhammadIrfan-rh1ii
    @MuhammadIrfan-rh1ii Před 5 lety +2

    Sir please describe bitwise not operator

    • @CppNuts
      @CppNuts  Před 5 lety +1

      Thanks for reminding me i will surely add it.

  • @akshaykumarpathuri7
    @akshaykumarpathuri7 Před rokem +1

    🤩

  • @enfannoir6151
    @enfannoir6151 Před 3 lety

    I love you. Friend