+ 2

Bitwise operations.

What practical application have bitwise operations? Give simple examples of practical application, so that you can clearly see that writing code with a bitwise operation is better than any other method.

29th Jul 2019, 8:15 PM
Solo
Solo - avatar
7 Answers
+ 4
Vasiliy the best answers are sometimes easier found by searching on a search engine eg Google , Bing , and so on or by checking on stackoverflow if <- we haven't answered it here.... https://stackoverflow.com/questions/2096916/real-world-use-cases-of-bitwise-operators
30th Jul 2019, 4:38 AM
BroFar
BroFar - avatar
+ 3
https://www.sololearn.com/discuss/1847830/?ref=app
29th Jul 2019, 10:55 PM
Schindlabua
Schindlabua - avatar
+ 3
You can always search the database of Q&A questions to find a related question first before posting.
30th Jul 2019, 1:15 AM
Sonic
Sonic - avatar
+ 2
Hi. You can for example store an array of flags in an integer (each bit representing On/Off or True/False) Hope this helps. Cheers. C
29th Jul 2019, 8:42 PM
ChrA
ChrA - avatar
+ 2
Sonic Unfortunately I did not find the proper answer in the search engine. 😕
30th Jul 2019, 2:39 AM
Solo
Solo - avatar
+ 1
ChrA 🙋 can you give an example in any programming language available to you?
29th Jul 2019, 8:59 PM
Solo
Solo - avatar
+ 1
Hey. I've been on vacations but did some _minimal_ example here. https://code.sololearn.com/c0eXZWLvitwF/?ref=app Any comments on the code are more than welcome 😀 Hope this helps. Cheers. C
3rd Aug 2019, 12:03 PM
ChrA
ChrA - avatar