Intro to Binary and Bitwise Operators in C++

Поділитися
Вставка
  • Опубліковано 28 лис 2024

КОМЕНТАРІ • 326

  • @TheCherno
    @TheCherno  3 роки тому +206

    C++ series is back!! ❤️ Thank you all for watching! Don't forget that the first 1000 people to use the link will get a free trial of Skillshare Premium Membership: skl.sh/thecherno03211

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

      Yes!!!!!

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

      @Elite Fusion yes, and this video is a part of that course

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

      Great series and so entertaining!
      Do you have any videos planned for intrinsic functions? I've seen a couple already, but I still don't quite get how it works...
      Would be great to see it coming at some point in time :)
      But already thanks a lot for all the great work! Keep on going!

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

      Yesss

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

      Do you have any websites to supplement the learning

  • @devpartap9748
    @devpartap9748 3 роки тому +254

    Holy cow!!! We got a c++ video, after centuries!!

  • @CreativeSteve69
    @CreativeSteve69 3 роки тому +102

    Yay glad to see the c++ series making a comeback cherno.

  • @267praveen
    @267praveen 3 роки тому +78

    Topics suggestions
    1. Variadic templates
    2. Regex
    3. Memory model in C++
    4. Perfect forwarding
    5. SFINAE

  • @Bruhger
    @Bruhger 3 роки тому +41

    The main difference between some of my uni classes and your YT series, is that I understand all of what you have to say, in compile time. No extra learning required.

  • @pepepotamo4819
    @pepepotamo4819 3 роки тому +55

    I'm about to finish the C++ series and now this DLC!

    • @sadhlife
      @sadhlife 3 роки тому +6

      free DLC is always appreciated

  • @playonce4186
    @playonce4186 3 роки тому +29

    You are getting younger and younger day by day, is that the effect of mastering C++ and 3d graphics after the headache is over :D

  • @ojussinghal2501
    @ojussinghal2501 3 роки тому +59

    Cherno: Bitwise operators
    Also Cherno in the same video: How capacitors store state of bits in RAM
    You are one of a kind programming tutor.

  • @igorsemenov7224
    @igorsemenov7224 3 роки тому +25

    At last! Thank you, I learned a lot from your c++ series and now it's back, I'm so glad!

  • @stepanhrbek8151
    @stepanhrbek8151 3 роки тому +35

    Oh yes, bitwise operators, thanks!

  • @slavago_1
    @slavago_1 3 роки тому +15

    Wow, now you're into some computer engineering stuff! You told me in 20 mins all that my university teachers were telling me for 1 year. Well done, The Cherno! Make more videos like this! Thank you!

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

    Great explanation! However, I think it's important to distinguish between binary value and binary representation in memory. What we have at 16:23 is (little-endian) representation.
    Say you have 255 and not 5, so 1111 1111 0000 0000 0000 0000 0000 0000. Now because it's representation, after bit-shifting the value by 1 to the left,
    you would have 1111 1110 0000 0001 0000 0000 0000 0000 in representation, which is correct, but it's not clear how the 16th bit became one.
    So for clarity, I believe it makes sense to demonstrate bit-shifts on the binary value:
    0000 0000 0000 0000 0000 0000 1111 1111

  • @kuroakevizago
    @kuroakevizago 3 роки тому +11

    Cherno 2021 : "Compiler is smart, smarter than you probably"
    Somehow I feel that Compiler really is smarter than me XD

  • @majestic-domination
    @majestic-domination 3 роки тому +2

    This is by far the most comprehensive introduction to bitwise operators I have ever seen. Really good content

  • @aliksargsyan2782
    @aliksargsyan2782 10 місяців тому +1

    This is very useful when someone wants to program CPU, MEMORY stuff like that

  • @dimasveliz6745
    @dimasveliz6745 3 роки тому +5

    I'm very happy to see how the UA-cam and Twitter pools were effective!!! Thanks for listening us! Wishing you a successful NEW period and many more views!

  • @absorbingdude
    @absorbingdude 3 роки тому +3

    Finally, I have just finished watching this playlist (at the moment there are only 96 episodes), God, in 2 weeks I watched almost 100 videos at 2x speed. It was during these 2 weeks that I learned a lot of new things, and once again I was convinced that C++ is impossible to learn, because it is replenished.
    Thanks a lot Cherno, you're an incredible person, I'll start watching the OpenGL learning playlist soon!
    Greetings from Russia!

  • @jonteguy
    @jonteguy 3 роки тому +4

    You have no idea how happy I am that you are continuing this.
    You are by far the easiest person to follow along regarding CPP teachings.
    I've done courses on Udemy by professionals since you stopped uploading to this series and none of them are as easy to follow along as you are. That being said I still learned a lot from them. But some of the technical stuff, regarding memory and stuff you are the easiest. I think because you go into Assembly sometimes and show the backbone.
    It does a lot to help people *actually understand* what's going on.
    "Any fool can know, the point is to understand" - Einstein

  • @matthewpapesh
    @matthewpapesh Рік тому +2

    My favorite and goto playlist for reviewing C++ for the past few years! I've also been following your OpenGL series and both have been very interesting and helpful. Thanks a ton!

  • @stefmijs8238
    @stefmijs8238 3 роки тому +2

    Thank you for continuing the c++ series. So far the c++ series have helped me with my study and work. Greets from the Netherlands.

  • @brucesmith9144
    @brucesmith9144 3 роки тому +2

    One thing I like about C/C++ is the bit-fiddling capabilities. Used these operators for many years for filtering and and analyzing electronic measurement data. Eg: lends itself nicely to things like 2’s complement conversion and arithmetic operations of binary data.

  • @kimberlymutanga1068
    @kimberlymutanga1068 3 роки тому +14

    Dude your work is amazing you explain this stuff in a fun and cool way
    I apreciate your work broo
    Thank you so much

  • @nahuelarjona
    @nahuelarjona 3 роки тому +2

    Hell yeah!!! It's been 84 years... but definitely worth the wait 🙌

  • @jayavamsikrishnamnaiduallu4358
    @jayavamsikrishnamnaiduallu4358 3 роки тому +4

    You took our advice. Thanks. Now I am 😊 🤗

  • @thethinman4552
    @thethinman4552 3 роки тому +3

    thank you !!
    Next -> Modules and Concepts

  • @ethanking123
    @ethanking123 3 роки тому +2

    Oh man, please keep on doing this, I'd love to see more c++ series videos to come.

  • @mohammedtirichine1934
    @mohammedtirichine1934 3 роки тому +4

    Soo happy to see your video notification on my panel again
    It's been a while

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

    Nice to see you back in this series! Great video as usual

  • @AlejandroMFilz
    @AlejandroMFilz 3 роки тому +4

    Hey, you still alive! :D
    I come from the OpenGL playlist, you're amazing teaching, thank you!!!

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

    I love the new thing with you drawing pictures to further explain what you're talking about, it makes it very easy to follow.

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

    Dropped it literally as soon as I needed it for my OS class. Thanks so helpful!

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

    The best explanation of bitwise operators and binary I have ever seen. Amazing.

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

    good to see you back! and also really loved the new style of explanation.. hope to see more like these!

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

    Thank you SO MUCH for making these Bitwise operations videos. I feel like every time I start feeling like I'm learning to program better, I see a snippet of code either in your code review series or something on StackExchange and there's Bit-Shift stuff happening everywhere and it's always made me feel so dumb and confused about what the point of using it was or when I'd need/want to use it. Thank you for making this!
    Also I had no idea that the windows calculator had a programmer mode, that rules

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

    bro you are amazing, you have just simplified the concept more than enough. thanks.

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

    Without going into details . . . . . capacitors . . . . . binary . . . . . endianness . . . . . hexadecimal . . . .
    i love this series

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

    That bit shift explanation was amazing, I thought the doubling and halving were coincidental until this video. Thank you!

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

    Jump to 15:29 to learn about bitwise operators, bitshift left and bitshift right.

  • @Dannnneh
    @Dannnneh 3 роки тому +7

    Awesome, the board writings are definitely helpful.

  • @thechubbypanda
    @thechubbypanda 3 роки тому +20

    The thumbnail is staring into my soul

  • @imagination704
    @imagination704 3 роки тому +33

    Omg yes!!!!!!!!!!!!!! Low level!!!! OmG!!!!

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

    Aha, I came across bitwise operator recently and someone on internet has made a whole video about that. Thanks Cherno!

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

    I love you man! I learned so much from you! Thankyou!

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

    Thanks for coming back mate! These are the best coding tutorials on the internet.

  • @hamzamuhammadkhan
    @hamzamuhammadkhan 3 роки тому +2

    FINALLLYYY THE CHERNO HAS COME BACKK

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

    Yaaaay
    You're back.
    I love learning C++ but I'm not a fan of game development, so this series is great for me.

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

    Glad we're back to the C++ series and great introductory video. I'm eager to see the next ones now!!

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

    So the decimal system is base 10 and binary is base 2. Shifting left is essentially adding a zero to the right of the number, which is multiplying by the mathematical base. So in decimal adding a zero to the right is multiplying by 10 and in binary it's multiplying by 2. Same with shifting right being like removing a place from the right, or dividing by 10 in decimal and dividing by 2 in binary.
    Cool! I never knew this, but this makes things really clear. Thanks!

  • @syth-1
    @syth-1 3 роки тому

    Just came across what bitwise operator was yesterday and now the Cherno explanation - heck Ye!

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

    really like the blackboard style explanation, good video

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

    Glad to see another video from this amazing series that kick-started my C++ career.

  • @MBdz557
    @MBdz557 3 роки тому +2

    Best c++ course ever!!!

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

    Awesome! I'm no beginner but I didn't know the compiler optimised power-of-two multiplications into bit shifts. Something for everyone in these videos, glad you're returning to it!

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

    Love the drawings. Feels a lot like watching Freya Holmers’s stream / tutorial - very visual and easy to understand

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

    so happy to see you back! never forget your precise & deep explanations of the topics

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

    It’s a pleasure to see again. Welcome back

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

    The C++ series is my favorite way of learning c++

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

    You actually saved my life multiple times, you explain things so well

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

    Thanks a lot man for talking about this topic. Normally bit shifting always had jumped over my head because I couldn't make any sense why it works like that until this video. Your in-depth explanations is really amazing. Waiting for next video. ❤️

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

    Can't wait for new videos about the topic!

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

    How does it feel to be one of the best C++ resources out there?
    Keep it up! The quality of the videos is just getting better and better!

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

    the old Cherno is back

  • @AyushSharma-ny8bm
    @AyushSharma-ny8bm 3 роки тому +4

    The Cherno is back.. tall & strong😎!!
    Welcome back brother!🔥😊🤗

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

    The whole drawing thing is beast 👌

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

    I loved the extra information (sidetracked) in this video. I think it added useful additional content. Thanks.

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

    Thanks. Visualizing your explanation makes it much easier to understand.

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

    О слава богам ты вернулся! твои видео напрямую влияют на всю индустрию разработки на с/с++ :D

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

    holy shit cherno this is awesome, thank. I understood the binary thing like magic. Thank you so much

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

    Ну, наконец то! Дождались.🙏

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

    Just when I have an assignment on the topic. Thanks Cherno

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

    the timing of this topic is perfect

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

    We want at least one C++ episode per week! Great series!

  • @user-sl6gn1ss8p
    @user-sl6gn1ss8p 3 роки тому +4

    14:06 laughs in fast inverse square root madness

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

    looking forward to seeing the series continue

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

    Yes!! This c++ series it the best on youtube!

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

    Thank you so much for this. you're the best at teaching c++

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

    Thank you for the in depth explanation! These make way more sense to me now.

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

    Nice to see you after a long time😀😀😀

  • @LS-cb7lg
    @LS-cb7lg 3 роки тому +2

    hey, i love that the series continues! can you make a video about testing? i think this is a very important subject that the playlist has not yet covered... thank you so much, love your video(s) :)))

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

    I actually really needed this, thank you!

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

    I absolutely love this series, and therefore this video, but I find it funny that I'm 14 out of 22 minutes in and you've barely spoken a word about any of the bitwise operators listed in the intro... I do appreciate the tangential conversation about word notation though, makes me feel good to have a clue what you're talking about. :P

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

    Awesome! Been waiting a long time for a video on binary operators 😁

  • @EminTuralic
    @EminTuralic 3 роки тому +4

    A c++ video woo

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

    You’re doing great, dude! Been learning a lot in your channel. Thanks you for spreading knowledge.

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

    Amazing video, thanks Cherno!

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

    It’s a pleasure, back to seen again.

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

    Yay! Some of the new c++17 and 20 stuff is pretty cool. A lot of stuff being done in templating

  • @kenny-kvibe
    @kenny-kvibe 3 роки тому

    That coffee ending, mmmm.
    Great video, I'm a complete noob at C++, but so far I love it.

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

    Just found your channel from trying to learn this please continue this mini series

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

    Wow, you started the series about c++ ~4 years ago, and keep doing it

  • @SandFoxling
    @SandFoxling 3 роки тому +3

    Hisashiburi dane Cherno San!

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

    Great Video! Thank you Cherno. Looking forward to your other videos.

  • @manuelpagliuca
    @manuelpagliuca 3 роки тому +4

    Really good, can't wait for the next video, you should do more with "Compiler Explorer" and what about an assembly playlist ?

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

    Thank you man, your explanations are rock solid. +1000 didactic for the use of a pen tablet

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

    Wow! Great! Thank you Cherno!

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

    Welcome back king!

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

    Beautiful explaination... Thanks to Teacher Sir...

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

    Finally C++ Series !!!! Thank!!!

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

    Thanks for the whole information. It was very helpful!! Including all the introduction

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

    Me: "going though comments to see what people think about bitwise operators"
    Everyone: 🎉🎉🎉🎉🎉🎊🎊🎊🎉🎉🎉🎉 The cherno is back WOOOHO 🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉