How To Set Clear Toggle Check Change One Bit Of int Variable In C&C++?

  Рет қаралды 21,046

CppNuts

CppNuts

Күн бұрын

JOIN ME
-----
KZbin 🎬 / @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'ill learn how to change set or unset selected bit of int variable in c and c++ programming language.
For more details please watch full video and do let me know if there is any doubts in comment section.
#cpp #interviewquestions #programming #tutorial #coaching #beginners #computerscience #softwareengineering

Пікірлер: 30
@MrChrisiscool15
@MrChrisiscool15 3 жыл бұрын
Was looking for someone to explain it and found the one. Best explanation so far. Thank you
@mandeepsingh-mq9dr
@mandeepsingh-mq9dr 3 жыл бұрын
for checking a particular set bit , we can do int bit = number&(1
@Agreedtodisagree
@Agreedtodisagree 4 жыл бұрын
I keep coming back to this video. It's one of my bookmarks.
@CppNuts
@CppNuts 4 жыл бұрын
Glad you enjoy it!
@nagarajvannal8176
@nagarajvannal8176 5 жыл бұрын
Clearly explained, Thank you.
@gousebashashaik2470
@gousebashashaik2470 Жыл бұрын
Great explanation.
@mactheo2574
@mactheo2574 2 жыл бұрын
Amazing clear explanation. Thank you!
@CppNuts
@CppNuts 2 жыл бұрын
Glad it was helpful!
@Raam1827
@Raam1827 Жыл бұрын
You said changing nth to bitvalue i have little confusion in it if i want to set some nth bit to 1 we have set operation like wise particular bit to 0 have clear operation and also have toggle then whats the use of this one??
@gabrielsattemo7258
@gabrielsattemo7258 2 жыл бұрын
Amazing video!
@bunnyrabits
@bunnyrabits 4 жыл бұрын
wow! Best explaination ever. You are great sir!
@CppNuts
@CppNuts 4 жыл бұрын
So nice of you
@Adnan-ss1ol
@Adnan-ss1ol 3 жыл бұрын
Good explanation thank you sir
@CppNuts
@CppNuts 3 жыл бұрын
Welcome dude..
@ronnysingh4165
@ronnysingh4165 6 жыл бұрын
Amazing....Nice work
@CppNuts
@CppNuts 6 жыл бұрын
I appreciate it!!
@sudeshdhamke4937
@sudeshdhamke4937 4 жыл бұрын
I love the way u explained... Thanks
@CppNuts
@CppNuts 4 жыл бұрын
Thanks man!!
@vvpChannel3112
@vvpChannel3112 2 жыл бұрын
This was asked to me in some interview.
@rampandi9302
@rampandi9302 6 жыл бұрын
Very useful sir. Thanku
@CppNuts
@CppNuts 6 жыл бұрын
Welcome dude!! 😎
@rahulkale1955
@rahulkale1955 3 жыл бұрын
thank you so much sir.
@CppNuts
@CppNuts 3 жыл бұрын
Welcome..
@pask4841
@pask4841 5 жыл бұрын
Any idea how to create a function which can do this? I have been successful by using macro like functions, but they make it quite difficult to find an error, when you can't build.
@Vineeth_Shankar
@Vineeth_Shankar 4 жыл бұрын
How do you know that we have to use left shift negation and & operation to clear a bit? Please explain logic
@gallilos
@gallilos 4 жыл бұрын
int actually have 32/64 bit yes? not only 4?
@bittupandey6645
@bittupandey6645 3 жыл бұрын
best one
@TheTiznone
@TheTiznone Жыл бұрын
Cool now try to set 0th bit to 0 in number 1
@ritikshar
@ritikshar 6 жыл бұрын
Thank you so much
@CppNuts
@CppNuts 6 жыл бұрын
It's a pleasure!!
Must Watch For Knowledge For C & C++ Programmer
1:25
CppNuts
Рет қаралды 5 М.
Good teacher wows kids with practical examples #shorts
00:32
I migliori trucchetti di Fabiosa
Рет қаралды 12 МЛН
Крутой фокус + секрет! #shorts
00:10
Роман Magic
Рет қаралды 39 МЛН
How it feels when u walk through first class
00:52
Adam W
Рет қаралды 18 МЛН
Officer Rabbit is so bad. He made Luffy deaf. #funny #supersiblings #comedy
00:18
Funny superhero siblings
Рет қаралды 18 МЛН
Why Template Functions Only Defined Inside Header Files?
6:31
Structural Padding & Packing In C & C++
15:28
CppNuts
Рет қаралды 110 М.
Ep 047: Clearing Bits using the Bitwise-AND
20:40
Intermation
Рет қаралды 3,2 М.
How do I access a single bit?
11:07
Jacob Sorber
Рет қаралды 21 М.
How to set and clear a bit
8:39
Pankaj prasad
Рет қаралды 25 М.
How To Overload pre and post Increment operator In C++?
5:23
Reversing all the bits in an integer
15:18
CodeVault
Рет қаралды 12 М.
How to set, clear and toggle a bit in embedded C
10:05
Embedotronics Technologies
Рет қаралды 6 М.
Good teacher wows kids with practical examples #shorts
00:32
I migliori trucchetti di Fabiosa
Рет қаралды 12 МЛН