L1. Introduction to Bit Manipulation | 1's 2's Compliment | Bit Operators

Поделиться
HTML-код
  • Опубликовано: 27 окт 2024

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

  • @hetpatel7399
    @hetpatel7399 7 месяцев назад +348

    Respect button for striver bhaiya-->

    • @parvahuja7618
      @parvahuja7618 7 месяцев назад +3

      just striver, dont add bhaiya

    • @KarthikKumaresan-k1o
      @KarthikKumaresan-k1o 5 месяцев назад +3

      need likes huh?

    • @saarza9991
      @saarza9991 2 месяца назад

      Same guy goes behind shraddha "didi" like a dog😂

    • @saarza9991
      @saarza9991 2 месяца назад +1

      He's striver not bhaiya

    • @souravsharma5465
      @souravsharma5465 2 месяца назад +1

      bhai arrow ke side mai report button aa rha hai ky kru ?? daba du

  • @sumitkumartah2106
    @sumitkumartah2106 7 месяцев назад +56

    Respect for this man 💗.......The man who changed the myth DSA is hard

  • @Noob_Coder1234
    @Noob_Coder1234 7 месяцев назад +85

    Remember if striver is making than this will be the best bit manipulation playlist on youtube

    • @chad._life
      @chad._life 3 месяца назад +2

      larn inglis

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

      @@chad._life chal beta aage nikal 😂

  • @akashspace837
    @akashspace837 7 месяцев назад +34

    Most Awaited Playlist... Bit Manipulation!

  • @allinonemoviesyt
    @allinonemoviesyt 7 месяцев назад +151

    6:09 there is a problem in the written code
    while loop condition will be (n != 0) instead of (n != 1)
    if we are using while(n != 1) , then we have to explicitly push back 1 to end of the string after the while loop ends

    • @gaurangsaini01
      @gaurangsaini01 7 месяцев назад +8

      I was about to comment the same , good observation :)

    • @anshuraj5734
      @anshuraj5734 7 месяцев назад +4

      I too observed the same.

    • @maheshwarang4000
      @maheshwarang4000 7 месяцев назад +2

      Yeah

    • @parvahuja7618
      @parvahuja7618 7 месяцев назад +2

      also we can just the concept of indexes and math.pow() function

    • @VineetKumar-fk2rl
      @VineetKumar-fk2rl 6 месяцев назад +1

      Yep I also noticed when I coded

  • @Dadgdyb
    @Dadgdyb 7 месяцев назад +13

    Thank you very much striver ,
    You are teaching us and working at the same time and too providing us with the best video that to free ,
    I'm Grateful.

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

    I was thinking of learning bit manipulation and here you are 🔥

  • @varun1017
    @varun1017 7 месяцев назад +61

    Next, we want strings

  • @koustaveditz9995
    @koustaveditz9995 7 месяцев назад +62

    i was the guy who requested striver bhaiya to make playlist on bit manipulation. cheers guys☺

    • @codeman0017
      @codeman0017 7 месяцев назад +4

      no it was me

    • @abhinav6726
      @abhinav6726 7 месяцев назад +13

      nahi me tha mene call kiya tha striver bhai ko playlist ke liye to unhone thik hai upload krta hu bolke upload krdi bit manipulation

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

      @@abhinav6726 hn lekin twitter par maine bola tha

    • @soumi6720
      @soumi6720 2 месяца назад +2

      ask him to make on strings

    • @koustaveditz9995
      @koustaveditz9995 2 месяца назад

      @@soumi6720 bol dunga, but wants to know more about hu

  • @mukeshrawat8816
    @mukeshrawat8816 7 месяцев назад +4

    just completed lt1 now moving on to the 2nd one.
    a big thanks to you bhaiya.

  • @trailblazer555
    @trailblazer555 7 месяцев назад +3

    Thanks a lot striver for your great effort!!! In this video 13 played a hero role...

  • @LinhHoang-ml1qo
    @LinhHoang-ml1qo 7 месяцев назад +4

    Thank you so much striver, you have changed my mind about coding

  • @yoddha621
    @yoddha621 29 дней назад

    Already have known these in the past, but after watching this video I was amazed as I had forgotten many things already. It was like having the knowledge for the first time lol.

  • @megSitati
    @megSitati Месяц назад +1

    Truly appreciate this content. I finally get to understand bit manipulation

  • @YuvrajSingh-qz9ss
    @YuvrajSingh-qz9ss 7 месяцев назад +12

    This playlist helps us to learn bit manipulation

  • @bhausaheb213
    @bhausaheb213 7 месяцев назад +2

    Thank you Striver for this Amazing Playlist....😊

  • @asan9657
    @asan9657 7 месяцев назад +1

    Actually I have done all questions of bit Manipulation from ATOZ DSA sheet but still watching for one and only striver bhaiya

  • @ShivaMahajan07
    @ShivaMahajan07 7 месяцев назад +6

    Legend is back🔥

  • @TON-108
    @TON-108 7 месяцев назад +2

    Finally Bit Manipulation 🎉
    Thank You Bhaiya ❤

  • @divyanshbhatt8273
    @divyanshbhatt8273 7 месяцев назад +2

    most awaited series Mann! you are great

  • @Logeshwar-s7m
    @Logeshwar-s7m 7 месяцев назад +2

    i am appreciating your effort
    also make playlist for greedy and stack & queues

  • @ShauryaPundir
    @ShauryaPundir 5 месяцев назад +1

    I wonder my dsa, if Striver Sir weren't in youtube.Thanku Sir.

  • @shahidullahmuffakir668
    @shahidullahmuffakir668 4 месяца назад

    after completing your amazing dp playlist, now I started this playlist , your voice sound a bit different here 😄
    Thanks brother for the amazing content.

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

    Hey bro just one request from my side is please try to complete whole sheet as soon as possible the sheet is legendary thanks again for giving it free

  • @NonameNoname-f2t
    @NonameNoname-f2t 7 месяцев назад +1

    i am so happy .. keep doing hard work

  • @vishnushashank1524
    @vishnushashank1524 7 месяцев назад +3

    for those who have confusion on negative numbers, revisit this 25:34

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

    concepts are cleared❤❤
    thank you striver Bhaiya❤

  • @RishabhSharma-p9o
    @RishabhSharma-p9o 5 месяцев назад

    a perfect lecture for intro of bit.

  • @stith_pragya
    @stith_pragya 6 месяцев назад +1

    Thank You So Much for this wonderful video.........🙏🏻🙏🏻🙏🏻🙏🏻🙏🏻🙏🏻

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

    Finally learned this stuff after avoiding it for so long

  • @varun1017
    @varun1017 7 месяцев назад +2

    Waiting from 2 months for this playlist.

  • @creativefacts143
    @creativefacts143 7 месяцев назад +1

    Thank you striver, and now only I think strings playlist is balance

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

    Understood,thanks striver for this amazing video.

  • @Suraj.5260
    @Suraj.5260 7 месяцев назад +3

    That really cleared my fear of Bits . Thank u .

  • @Braveuser-x7j
    @Braveuser-x7j 7 месяцев назад

    wow after long time _new Playlist is coming, sir can you make a playlist on "Two pointer"....Thank you❤❤❤❤

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

    finally!!!!!!!!!!! can't be more happy ❤‍🔥❤‍🔥❤‍🔥❤‍🔥❤‍🔥

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

    Yaaaay... Finally Bit Manipulation... Ab lagegi job sbki

  • @ranjeet_sohanpal
    @ranjeet_sohanpal 4 месяца назад

    Trick for 2s compliment in O(n)
    Start from end, the moment you encounter 1, you start flipping the bits that appear after it.

  • @ajitmahatoshorts
    @ajitmahatoshorts 7 месяцев назад +1

    Bas ab String or Heaps reh gya 😊 jaldi complete kardo bhaiya inhe v

  • @riteshbisht94
    @riteshbisht94 7 месяцев назад +2

    East or West Striver bhaiya is best 💯

  • @rudrajitgupta3688
    @rudrajitgupta3688 7 месяцев назад +1

    I was waiting for this such a long time...Bits manipulation is super fun but was reluctant to learn cos of missing Striver-Factor
    Well now we have it and the community couldnt be more blessed❤.. Thank u Gurudev apnake onek onek ashirbadh r shubhechaa ❤

  • @ashurajput6916
    @ashurajput6916 2 месяца назад +4

    At last negation operation part 34:30 onwards
    So, i think bhaiya got a little confused by that, lemme break it down correctly. so on using the negation operation "~" this simply flips all bits and store the result. nothing much.. just simple flip all bits.
    Let's work out with case of positive number
    consider
    n = 5 = 00000000000000000000000000000101
    now,
    ~n = 11111111111111111111111111111010
    this is what is stored inside computer, now upon reading this number when we require it somewhere to be printed or anything. the computer looks at the 31st bit and sees it is set, thus the number is negative, thus a negative sign will be put and now to fetch its value, computer perform 2's complement. So,
    00000000000000000000000000000101

    • @hustlinglie5530
      @hustlinglie5530 2 месяца назад +1

      Thanks a lot for this detailed explanation man

    • @chaitanyapasula5887
      @chaitanyapasula5887 12 дней назад

      Thanks a lot bro. This cleared all my confusion!

  • @hakunamatata-nl4js
    @hakunamatata-nl4js 4 месяца назад

    thank you so much
    these lectures are so so good

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

    Thank you so much Striver 😭😭

  • @CodeByRobin
    @CodeByRobin 29 дней назад +2

    At 30:50 when you are taking 2's complement, you are not flipping the signed bit, but at 37:00 , when you are taking 2's complement again in another example, you are flipping the signed bit as well.... please explain , if I am missing something or clear my confusion

    • @siddiqabr7110
      @siddiqabr7110 6 дней назад +1

      He made a mistake it Just flips either way even if it is positive or negative

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

    Thank you very much for your dedication

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

    Was eagerly waiting for the video

  • @ryugagaming195
    @ryugagaming195 7 месяцев назад +2

    Sir plz make playlist on sliding window

  • @ishanmoykhede9484
    @ishanmoykhede9484 7 месяцев назад +1

    comeback shuru

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

    Thank you for this series🙏🙏

  • @UECAshutoshKumar
    @UECAshutoshKumar 7 месяцев назад +1

    thank you 😊

  • @sharpstudy4043
    @sharpstudy4043 3 месяца назад +2

    Bhai while loop ki condition alg ayge :
    while(n>0) hoga

  • @cosmiccometyt
    @cosmiccometyt 4 месяца назад

    thank you so much for this course, we know that the course is probably draining you, as is visible from your face so pls take rest when you need to

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

    Great Content !, Can you extend this playlist by adding bitmask and bitmask DP? Thank you!

  • @vishalbhatt9312
    @vishalbhatt9312 6 месяцев назад +3

    There is an error in the code 9:44 it doesn't matter if there is one or not you have to update the value of p2
    for (int i = a.length() - 1; i >= 0; i--) {
    if (a.charAt(i) == '1') {
    num += p2;
    }
    p2 *= 2;
    }

  • @StrautBell
    @StrautBell 7 месяцев назад +4

    Waiting for String playlist

  • @Harikesh662
    @Harikesh662 Месяц назад +1

    At 5:27 n!=1 is wrong n!=0 is correct

  • @Josuke217
    @Josuke217 2 месяца назад +3

    Starting today: 10th August 2024.

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

    Great job bhai.

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

    For INT_MIN you have made the binary as 1(-ve) 0 0 0 ....0 0 0 0 this is representing ZERO not the INT_MIN before calculating two's complement
    Correct me if i'm wrong

  • @zee_desai
    @zee_desai 4 месяца назад

    def binary_to_decimal(binary_string):
    res = 0
    base = 1
    for i in range(len(binary_string) - 1, -1, -1):
    num_added = binary_string[i] == "1"
    res += (base * num_added)
    base *= 2
    return res

  • @harshshah2215
    @harshshah2215 7 месяцев назад +10

    36:13 why sign bit doesnt effect by complement

    • @Dineshkumar_dk
      @Dineshkumar_dk 4 месяца назад

      same doubt for me also

    • @kushgupta6892
      @kushgupta6892 4 месяца назад +1

      this is because the last bit is reserved for the sign bit. Therefore the actual value of the number is the value calculated from the bits excluding the sign bit. Let us assume the number obtained excluding the sign bit is y. We know from the sign bit y is negative. Therefore y is stored as 2's compliment. We take +y (take the 31st bit as 0) then take 1s compliment and add 1 to it. The result becomes the same as shown in the video. Just make sure you don't consider the sign bit in the calculations if it is 1 already.

    • @akshanshkaushal9422
      @akshanshkaushal9422 2 месяца назад

      @@kushgupta6892 really?

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

    THANK YOU STRIVER...🙂

  • @Hema-18181
    @Hema-18181 7 месяцев назад

    Thank youu STRIVER💃

  • @tej.askamble
    @tej.askamble 7 месяцев назад

    Wait is over 🥳🥳🥳🥳

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

    Thanks and I promise I will finish by tommorow

    • @Monika-vs6bw
      @Monika-vs6bw 7 месяцев назад

      did you?

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

      @@Monika-vs6bw yup done ..

  • @sarangkumarsingh7901
    @sarangkumarsingh7901 19 дней назад +1

    Understood

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

    Kindly bring entire Bit Manipulation in 1 GO.

  • @Dineshkumar_dk
    @Dineshkumar_dk 4 месяца назад +2

    when doing NOT ,in 2's complement why the sign bit doesn't change? but when we storing negative number, at that time in 2's complement sign bit is changing. can you please clear this? @takeUforward

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

    I really like this man

  • @riddlemastermind25
    @riddlemastermind25 7 месяцев назад +1

    Thalaivaaa❤

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

    Lots Lots Lots of Love 🤟

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

    for both positive and negative in case of not we have to do 2's compliment

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

    Strings (hard problems) ka video solutions or Articles add kardo bhaiya ❤

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

    Much needed one

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

    Much needed topic 😅

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

    Striver thank you very much. God bless you ❤
    Please could you explain how to rotate number by k steps. K may be less than 0 or greater than 32
    If it is < 0 rotate right , if positive rotate left.

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

    Understood. Thank you!

  • @Deb-k8k
    @Deb-k8k 7 месяцев назад +1

    Respect ❤

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

    Love you Bhai so much❤

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

    UNDERSTOOD!!

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

    thank you striver

  • @Learnprogramming-q7f
    @Learnprogramming-q7f 6 месяцев назад

    Thank you bhaiya

  • @vishnu4647
    @vishnu4647 7 месяцев назад +2

    what happen to string module which was before linkedlist??

  • @DeepakPatel-d5v
    @DeepakPatel-d5v 5 месяцев назад

    Thanks a lot Bhaiya

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

    Many many thanks

  • @prabhakaran5542
    @prabhakaran5542 7 месяцев назад +1

    100th like from me was my pleasure ❤

  • @AnuragShekharANDRE23
    @AnuragShekharANDRE23 6 месяцев назад +1

    there is a mistake in 4:42 "number to binary" code -> if(n!=1) => you are leaving the last 1 after the division.

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

    Waiting for more lec plz complete it asap plzzzzzzzz

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

    Thank you sir

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

    understood ❤

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

    Respect !!!!!!!!!!!!!!!!!!!!

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

    Striver is going to destroy the dsa market by giving High level of free content 😂

  • @AdityaRaj-ti3uz
    @AdityaRaj-ti3uz 7 месяцев назад

    hi Striver i have a question 6:25 you were explaining the time complexity of the code log base 2 n but the reverse function will take 0(n) time complexity so eventually the code will take 0(n) or log n?

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

    Thank you very much

  • @Soum1947
    @Soum1947 4 месяца назад

    Respect !

  • @MohitKumar-o3l1u
    @MohitKumar-o3l1u 3 месяца назад

    Understood!!!

  • @rr-cw6mf
    @rr-cw6mf 7 месяцев назад

    please make string series next

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

    tysm sir

  • @Priyasingh-xr6df
    @Priyasingh-xr6df 7 месяцев назад +1

    A2Z sheet is not updated with notes and video links for bit manipulation.