Bitwise Operators in C (Part 1)

Поделиться
HTML-код
  • Опубликовано: 9 сен 2024
  • C Programming & Data Structures: Bitwise Operators in C (Part 1)
    Topics discussed:
    1. Introduction to Bitwise Operators.
    2. Types of Bitwise Operators.
    3. Bitwise AND Operator.
    4. Bitwise OR Operator.
    5. Bitwise NOT Operator.
    6. Difference between bitwise and logical operators.
    C Programming Lectures: goo.gl/7Eh2SS
    Follow Neso Academy on Instagram: @nesoacademy(bit.ly/2XP63OE)
    Follow me on Instagram: @jaspreetedu(bit.ly/2YX26E5)
    Contribute: www.nesoacademy...
    Memberships: bit.ly/2U7YSPI
    Books: www.nesoacademy...
    Website ► www.nesoacademy...
    Forum ► forum.nesoacade...
    Facebook ► goo.gl/Nt0PmB
    Twitter ► / nesoacademy
    Music:
    Axol x Alex Skrindo - You [NCS Release]
    #CProgrammingByNeso #CProgramming #BitwiseOperators

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

  • @sundaystories.1078
    @sundaystories.1078 3 года назад +60

    I am a diploma in civil engineering student, who got slided into cse. I just wanted to learn C language and searched for many playlists in RUclips and at last found NESO ACADEMY.. You guys are the best.. I've also installed the app and using it... Thankyou so much 🙏🏻

    • @nesoacademy
      @nesoacademy  3 года назад +11

      Glad to know this :)

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

      Same here I also did diploma in ce and enrolled in cse BTech

  • @ProjectKneepads
    @ProjectKneepads 2 года назад +58

    Result of ~7 is -8. Remember we're dealing with signed numbers here, and where computers represent negative numbers in 2's complement, that means that the sign bit is also flipped. (So if you do a = 7 and b = ~a +1, then b is -7. Cool thing about 2's complement is that you can do it again: a = ~b + 1 and the value of a will still be 7.)

    • @ShubhamKumar-sj6dp
      @ShubhamKumar-sj6dp 2 года назад +1

      Absolutely that is why I prefer standard text such as KnR C which cover these small details briefly but elegantly

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

      U r right .he explained nice but in wrong way

    • @routinewithspecial...8589
      @routinewithspecial...8589 7 месяцев назад

      bro can u please elaborate the explanation please

  • @nasibmohamed4295
    @nasibmohamed4295 6 лет назад +49

    i dont usually do youtube comments but I missed class for a week and this is one of the subjects we went through. I scoured the internet to find all this confusing, mumbo jumbo, nothing that quite broke it down to an understandable level. Your video did just that. THANK YOU!!

  • @genericyoutubechannel2601
    @genericyoutubechannel2601 2 года назад +20

    I sincerely appreciate that you stated at the beginning that these topics are very difficult. I found this easier than I had anticipated, no doubt owing to your skills at explaining things, but if I had struggled with it I would have felt "allowed" to struggle. Other RUclips educators try to reassure their viewers at the beginning by insisting how "simple" the complicated topics really are, even if they seem intimidating. I understand the good intention behind that approach, but when I watch such videos and then find myself struggling, which is discouraging by itself, I am also doubly discouraged by being unable to quickly grasp what I've just been told should be a very "simple" concept or idea. So, being told up-front that something is difficult but we'll all do our best genuinely helps me persist if I end up getting stuck. Thank you!

  • @peaceemmanuel4485
    @peaceemmanuel4485 3 года назад +22

    Man, my first intro to Bitwise Operators and I feel like I'm learning ABC. Thank you! thank you for explaining things so well!

  • @cameronrowe2032
    @cameronrowe2032 3 года назад +66

    Much better introduction to bitwise than my college instructor. Thanks!

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

    You, sir, are a life savior.

  • @kushalava007
    @kushalava007 4 года назад +31

    Want to see the man behind this great work

    • @komaldeepsingh293
      @komaldeepsingh293 4 года назад +2

      You can see his Instagram id. It's mentioned in description box.

  • @janhvinarayan1633
    @janhvinarayan1633 8 месяцев назад +1

    great explanation, I was confused that how does bitwise and work, I'm a 1st yr btech student of cse and my teacher explains nothing so ppl like u are lifesavers, thank u so much

  • @Official-tk3nc
    @Official-tk3nc 4 года назад +11

    You are teaching better than my professor Who has Ph.D from IIT . Love you sir really helpful. I want to know who is the CEO of NESO?

  • @mauryaashish1865
    @mauryaashish1865 3 года назад +3

    Finally cleared the difference between logical and bitwise operators in 7 minutes!

  • @beyou7255
    @beyou7255 3 года назад +2

    explainig the whole concept in just a little bit of time is amazing

  • @Official-tk3nc
    @Official-tk3nc 4 года назад +28

    One of my friends scored top marks in exam. Today I realised he is the student of NESO Academy.

  • @ChristopherFranko
    @ChristopherFranko 3 года назад +2

    This is the best explainer ive ever watched.. ever. Great quality!

  • @bawol-official
    @bawol-official 2 года назад +3

    This was giving me so much trouble to wrap my head around!!! Thank you for this!!!

  • @evanwells7460
    @evanwells7460 3 года назад +2

    The bottom left scared me into thinking I had dead pixels in my monitor. Also, excellent explanations! Thanks

  • @vaibhavkapadia1
    @vaibhavkapadia1 4 года назад +30

    sir i think ~7 must be -8 not 8 bcs you used %d in printf i.e integer data type which uses 2's complement representation

    • @lemmenmin7676
      @lemmenmin7676 2 года назад +5

      Ах вот почему ракеты падают!

    • @NikhilKumar-ni9yc
      @NikhilKumar-ni9yc 10 месяцев назад

      @@lemmenmin7676😂😂😂

  • @OfficialVasuRastogi
    @OfficialVasuRastogi 3 года назад +2

    That example made it crystal clear.🙏

  • @shirleyachara3809
    @shirleyachara3809 3 года назад +2

    Very clear and concise explanation, thanks.

  • @pojntfxlegacy611
    @pojntfxlegacy611 4 года назад +5

    Great explanation! This topic has always been quite confusing to me but you've cleared it up.

  • @mdashiouzzaman834
    @mdashiouzzaman834 3 года назад +2

    Really easy to understand with clear examples ❤️

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

    The indian youtuber coming in clutch

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

    The way you explained each concept is awesome 👌🏾👌🏾
    Thanku for this amazing videos

  • @SunZheini
    @SunZheini 3 года назад +3

    The whole series is very well explained

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

    This was easily understood, thanks for the detailed explanation.

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

    Sir u r God.... Sir...... Explaination goes peaks... In c language........ Tq soo much sir..... Love ❤ neso academy.....

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

    Thank you sir very nice gide & very nice best information bitwise operator teaching video.👍

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

    Your explaination is spot on, me having trouble understading yet took me 5 mins to understand from u

  • @espedale
    @espedale 5 лет назад +3

    It would be nice to see examples of how these are useful rather than explain them in the abstract. Thank you for making the video.

  • @USER-zf3tr
    @USER-zf3tr 3 года назад +1

    a clear level of explanation....
    thank u..

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

    An excellent and simple video of bitwise operations in C. Keep up the good work!

  • @chandralekha8370
    @chandralekha8370 3 года назад +3

    This is my 1st comment for a youtube channel..
    The way of explanation and presentation etc etc everything was very excellent. Great job...thank u soooo much for your videos..
    This is very much helpful especially in this pandemic situation.
    Kindly upload videos for DESIGN AND ANALYSIS OF ALGORITHM subject also.

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

    this method you are using to explain make eveything so easy to be undrestood

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

    this is the best explanation of bitwise function

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

    Thank you indian youtube man. I don't know who you are or why you know literally everything there is to know, but thanks yet again for saving me.

  • @LorenHelgeson
    @LorenHelgeson 4 года назад +2

    Very well explained. Thank you.

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

    Thkz

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

    today's best video for me.

  • @hindi-english1664
    @hindi-english1664 3 года назад +4

    great work! but i am confused!
    can you explain how this internally works!
    int a=-9,b;
    b=~a;
    printf("%d",b);
    o/p:-8
    please explain it will help!...

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

      Hi -9 binary representation =>1000 1001 when u do ~ (operation) 2's complement 1111 0111(sign bit will not modify) ==>complement ==>0000 1000==>8. simple formula ==> ( -(n+1))

  • @user-uh5ye8mg7e
    @user-uh5ye8mg7e 5 лет назад +2

    thank a lot you help me finish my home work!

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

    Very well explained! Keep it up...!

  • @EtBukaneluu
    @EtBukaneluu 3 года назад +2

    Nice video buddy,
    Loved it

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

    it was easy to understand, an awesome video.

  • @giaotran3311
    @giaotran3311 4 года назад +2

    Wow this is SO clear.

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

    Thank you sir it was a nice explanation

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

    Thank you for this great video!

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

    Thank you so much for this tutorial. I've been looking for an detailed and understandable explanation on this for hours.

  • @danilo2735
    @danilo2735 4 года назад +2

    man, perfect explanation.

  • @AhmedSayed-ki3fm
    @AhmedSayed-ki3fm Год назад

    Thank you, your way of delivering the information is simple and easy to be understood.

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

    I Liked that NESO TV has an integrated cam as well.......

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

    Thank you so much. I want to download this

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

    I love you NESCO ACADEMY

  • @FunTeenDev
    @FunTeenDev 11 дней назад

    Thanks!

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

    I think it's useful to think of the & (AND) and | (OR) linguistically. If I'm understanding how this works correctly, it goes something like: "If one bit AND the other are true (1), then the result is true (1). Otherwise, the result is false (0)." And likewise: "If either one bit OR the other is true (1), then the result is true (1). Otherwise, the result is false (0)."

  • @Santhosh-qp1hq
    @Santhosh-qp1hq 2 года назад

    You are really Amazing..... Such a detailed explanation I found no where

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

    Thanks again, you seem to have my entire college course made in youtube lol.

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

    best tutorial ever about this topic!

  • @sergioropo3019
    @sergioropo3019 6 лет назад +2

    Very well done Sir.

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

    Comments for myself: Bitwise operators compares each bit of a value at a time and returns a final value from the formed bits sequence from the operations. e.g. if sequence is 0000 0000 (for char), then it returns 0.

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

    People have asked what the practical use of bt manipulation is. It is used in low-level applications like Hardware Registers, and in compression algos as well as optimization.
    You can also use bit manipulation to perform common tasks like finding if a number is even or odd.
    Finding an odd occurance of a number in an array using using Hash Tables takes O(n) time. Bit manipulation on this same task takes O(1). So often times the fastest approach is Bit Manipulation.

  • @jess.uraura
    @jess.uraura 4 года назад +1

    Very clear. Thank you so much!

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

    Excellent video, one of the best C tutorials I’ve seen so far

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

    Thank you so much. This lecture was very helpful.

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

    Thanks a lot for such high quality educational content!

  • @Chi.chi.j
    @Chi.chi.j Год назад

    Thank you very much Neso Academy!

  • @jyothisaleras6914
    @jyothisaleras6914 4 года назад +2

    Simply amazing !

  • @atharvrastogi8970
    @atharvrastogi8970 Год назад +1

    POG 💪🏻

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

    Thanks alot..❤😊💕👨‍🎓

  • @chitharlashivaprasad9890
    @chitharlashivaprasad9890 3 года назад +2

    Sir, what happen if we take 7 , 8 instead of 7,4 in bitwise and operation, the output is 0 or not

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

    Thnku so much dude 😇

  • @WebContrive
    @WebContrive 3 года назад +2

    ~ operator explanation is wrong if we have 6 (0110) it becomes -7 (0111) in IDE, but according to your explanation it should be 9 (1001)

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

    I really love the way you teach. Greatful:)

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

    you are my master, master.

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

    Thnaks bro

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

    🙏Thank you sir for giving this knowledge. 🙏

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

    Detailed explaination.....

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

    Thank you

  • @deepika-hj7vu
    @deepika-hj7vu 2 года назад

    Great explanation. Thank you!

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

    Thank you so much

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

    Excellent work sir I have my exam day after tomorrow and this video helped me a lot sir...tqsm

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

    Awesome Explanation Sir

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

    this was extremely clear thank you!

  • @mdsarfrazahmad45
    @mdsarfrazahmad45 3 месяца назад

    Thank u❤

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

    Thanks

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

    Great explanation

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

    One issue is there in ~7= -8
    Can you explain it🤔

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

    Nice class sir

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

    Works for Java as well thanks !!!!

  • @mridulasthana8111
    @mridulasthana8111 7 месяцев назад

    Please explain with 8 bit machine, thanks

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

    the voice is soo sweeet :-)

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

    Simply super sir

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

    AND(&) 1:16
    OR(|) 2:55
    NOT(~) 3:43

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

    sir plz upload more videos in c ...

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

    Thnq u

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

    how can i understand that a&b=0 and a&&b=1 ???

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

      they're doing different things
      & is a bitwise operator, which works on the individual digits in a and b
      && is a logical operator which works on the truth/false values of a and b

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

    Super sir

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

    What is difference between bitwise AND operator and Logical AND operator..plz anyone reply me 🙏

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

      Logical AND returns either true or false means 0 or 1. But bitwise AND please click the link

  • @ShivaniSingh-vy2ve
    @ShivaniSingh-vy2ve 4 года назад

    Very nice explanation sir

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

    great video! Very helpful!

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

    Thanks for help.