+ 1
How to know the bits of the numbers..?
Is Bitwise used only when we know that number bits...? why we use that bitwise operators??
5 odpowiedzi
+ 2
mon have a look at this series of lessons in Bitwise Operations in the Community section:
https://www.sololearn.com/learn/4070/?ref=app
+ 2
Ipang in bitwise lesson
https://www.sololearn.com/learn/4076/?ref=app
+ 2
mon
The lesson didn't mention any need to know how many bits there is in a number, where did you get the idea it was necessary?
https://www.theserverside.com/definition/bitwise-operator
+ 1
Do you have any code which raised this question in your mind?
0
example of simple bitwise practical usage
{a: 1, b:2, c:4, d:8} flags
store b,c,d status to one byte
2 + 4 + 8 = 14
0000 1110
are c,d activated ?
4 + 8 = 12
14 and 12 = 12 // yes
are a,b activated ?
1 + 2 = 3
14 and 3 = 2 // no