Browsing all articles tagged with bit-wise operator - Share Programming Tips
How to set, clear ,toggle and check a single bit in C?
As being an embedded software engineer i would really suggest you this tricks. ..! In many application you need to deal with this bit wise operation. Sometimes you know this all stuff very well but still some time it takes time to construct this logic or some time you got some mistakes in it. so i suggest you to paste this on your desk until you paste this in your mind..!
To set a bit
Use the bitwise OR operator (|) to set a bit.
number |= 1 << x;
That will set bit x.
Search in this website
our sponsors
latest comments
- JIGAR PATEL on List of all standard version of c language
- agabein on List of all standard version of c language
- David Wood fin on Stop Plugin from showing updates
- Alice on C programming interview questions and answers for freshers
- smitesh on How to access/unblock songs.pk in india?
Find us on Facebook
Top Authors
Find us on stackoverflow
Polls
Loading ...
My Bookmarks
- Audio/video Recorder & player application based on MATLAB
- check dependency of your binary
- defination of all standard c programming language function
- Great Question-Answer on c programming
- know what your c code means
- Limition of c programming language
- List of all version of c programming language
- Online c compiler
- php freelancing work
- some more stuff on C programming language
- Volatile Keyword in Embedded System
- Write Android application in c language