Intro to Binary and Bitwise Operators in C++

แชร์
ฝัง
  • เผยแพร่เมื่อ 26 ธ.ค. 2024

ความคิดเห็น • 323

  • @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.

  • @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

  • @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.

  • @ojussinghal2501
    @ojussinghal2501 3 ปีที่แล้ว +60

    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.

  • @267praveen
    @267praveen 3 ปีที่แล้ว +78

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

  • @kuroakevizago
    @kuroakevizago 3 ปีที่แล้ว +11

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

  • @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!

  • @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

  • @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!

  • @stepanhrbek8151
    @stepanhrbek8151 3 ปีที่แล้ว +35

    Oh yes, bitwise operators, thanks!

  • @ArtixTero
    @ArtixTero 2 ปีที่แล้ว +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

  • @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 11 หลายเดือนก่อน +1

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

  • @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

  • @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.

  • @dimasveliz6745
    @dimasveliz6745 3 ปีที่แล้ว +5

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

  • @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!

  • @mohammedtirichine1934
    @mohammedtirichine1934 3 ปีที่แล้ว +4

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

  • @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

  • @ethanking123
    @ethanking123 3 ปีที่แล้ว +2

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

  • @inspite69
    @inspite69 3 ปีที่แล้ว

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

  • @AlejandroMFilz
    @AlejandroMFilz 3 ปีที่แล้ว +4

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

  • @robertsedgewick1266
    @robertsedgewick1266 3 ปีที่แล้ว +1

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

  • @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 😊 🤗

  • @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.

  • @hamzamuhammadkhan
    @hamzamuhammadkhan 3 ปีที่แล้ว +2

    FINALLLYYY THE CHERNO HAS COME BACKK

  • @thethinman4552
    @thethinman4552 3 ปีที่แล้ว +3

    thank you !!
    Next -> Modules and Concepts

  • @ThatHipsteCat
    @ThatHipsteCat 3 ปีที่แล้ว +1

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

  • @kaustubhnarkhede5166
    @kaustubhnarkhede5166 3 ปีที่แล้ว +1

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

  • @redenvalerio601
    @redenvalerio601 3 ปีที่แล้ว +1

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

  • @zed_business519
    @zed_business519 ปีที่แล้ว

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

  • @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.

  • @gustavocompagnoli8565
    @gustavocompagnoli8565 3 ปีที่แล้ว

    It’s a pleasure to see again. Welcome back

  • @K1zma
    @K1zma ปีที่แล้ว

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

  • @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

  • @Dannnneh
    @Dannnneh 3 ปีที่แล้ว +7

    Awesome, the board writings are definitely helpful.

  • @Resurr3ction
    @Resurr3ction 3 ปีที่แล้ว

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

  • @overthinker8532
    @overthinker8532 3 ปีที่แล้ว

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

  • @thechubbypanda
    @thechubbypanda 3 ปีที่แล้ว +20

    The thumbnail is staring into my soul

  • @MBdz557
    @MBdz557 3 ปีที่แล้ว +2

    Best c++ course ever!!!

  • @crystalflank
    @crystalflank 3 ปีที่แล้ว

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

  • @pako_powr
    @pako_powr 3 ปีที่แล้ว

    really like the blackboard style explanation, good video

  • @imagination704
    @imagination704 3 ปีที่แล้ว +33

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

  • @Rorybabory
    @Rorybabory 3 ปีที่แล้ว

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

  • @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.

  • @orels1_
    @orels1_ 3 ปีที่แล้ว

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

  • @justian428
    @justian428 3 ปีที่แล้ว

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

  • @SergeiLitovko
    @SergeiLitovko 3 ปีที่แล้ว

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

  • @stephen9849
    @stephen9849 3 ปีที่แล้ว +1

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

  • @syth-1
    @syth-1 3 ปีที่แล้ว

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

  • @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!

  • @gustavocompagnoli8565
    @gustavocompagnoli8565 3 ปีที่แล้ว

    It’s a pleasure, back to seen again.

  • @bouthardmj661
    @bouthardmj661 3 ปีที่แล้ว

    Oh yes!! right on time bro!

  • @athanasiosterzakis128
    @athanasiosterzakis128 3 ปีที่แล้ว

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

  • @karbonk9333
    @karbonk9333 3 ปีที่แล้ว +1

    the old Cherno is back

  • @marcelgonzalez1376
    @marcelgonzalez1376 3 ปีที่แล้ว

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

  • @mazdakhng3013
    @mazdakhng3013 3 ปีที่แล้ว

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

  • @RickTrajan
    @RickTrajan 3 ปีที่แล้ว

    Can't wait for new videos about the topic!

  • @tbswerve2497
    @tbswerve2497 3 ปีที่แล้ว

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

  • @petyavodolaz
    @petyavodolaz 2 ปีที่แล้ว

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

  • @mikaelkabraelian8518
    @mikaelkabraelian8518 3 ปีที่แล้ว

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

  • @VasaMusic438
    @VasaMusic438 3 ปีที่แล้ว

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

  • @lifeless9768
    @lifeless9768 3 ปีที่แล้ว +1

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

  • @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 ?

  • @EminTuralic
    @EminTuralic 3 ปีที่แล้ว +4

    A c++ video woo

  • @godnyx117
    @godnyx117 3 ปีที่แล้ว

    Welcome back king!

  • @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!

  • @Enskkc
    @Enskkc ปีที่แล้ว +1

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

  • @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!

  • @krishangopal1803
    @krishangopal1803 3 ปีที่แล้ว

    Nice to see you after a long time😀😀😀

  • @starc0w
    @starc0w 3 ปีที่แล้ว

    Wow! Great! Thank you Cherno!

  • @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

  • @adilkumashev8964
    @adilkumashev8964 3 ปีที่แล้ว

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

  • @kenny-kvibe
    @kenny-kvibe 3 ปีที่แล้ว

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

  • @michaelnichxls
    @michaelnichxls 3 ปีที่แล้ว

    I actually really needed this, thank you!

  • @Narinerd
    @Narinerd 3 ปีที่แล้ว

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

  • @AnastasiiaNovik
    @AnastasiiaNovik 3 ปีที่แล้ว

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

  • @billynugget7102
    @billynugget7102 3 ปีที่แล้ว

    The whole drawing thing is beast 👌

  • @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) :)))

  • @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. ❤️

  • @slimshadylady9124
    @slimshadylady9124 3 ปีที่แล้ว

    looking forward to seeing the series continue

  • @muddtheboss415
    @muddtheboss415 3 ปีที่แล้ว

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

  • @gualdim
    @gualdim 3 ปีที่แล้ว

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

  • @DibsOnMe
    @DibsOnMe 3 ปีที่แล้ว

    Amazing video, thanks Cherno!

  • @HiPh0Plover1
    @HiPh0Plover1 3 ปีที่แล้ว

    the timing of this topic is perfect

  • @nicklesseos
    @nicklesseos 3 ปีที่แล้ว

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

  • @kltechhub
    @kltechhub 3 ปีที่แล้ว

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

  • @rasmadrak
    @rasmadrak 3 ปีที่แล้ว

    Tried to watch this with automatic generated captions. Hilarious! :D
    (Great episode though! )

  • @eversonnunes5662
    @eversonnunes5662 3 ปีที่แล้ว

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

  • @chanabasayyasindagimath9516
    @chanabasayyasindagimath9516 3 ปีที่แล้ว

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

  • @Khaliszt
    @Khaliszt 3 ปีที่แล้ว

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

  • @ichizos9615
    @ichizos9615 3 ปีที่แล้ว +1

    Cherno at 6:10: int a = *ś*
    Me: Wait... that's illegal, it won't work!
    Cherno: it's 5
    Me: oh...

  • @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

  • @AyushSharma-ny8bm
    @AyushSharma-ny8bm 3 ปีที่แล้ว +4

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

  • @georgichelenkov4360
    @georgichelenkov4360 3 ปีที่แล้ว

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