Let’s say i have several Letter, and also to consider whether it is we th bit is decided otherwise perhaps not, we are able to Therefore for the no. 2 we . The brand new binary sorts of dos we include just we th part given that put (otherwise step 1), otherwise every bit is actually 0 around. When we commonly Therefore which have N, and in case the new we th piece of N is determined, this may be have a tendency to return a low no count (2 we as particular), more 0 might possibly be returned.
Now, we truly need step three bits, you to bit for every single feature
2. Now let’s check if it’s 2nd bit is set or not(starting from 0). For that, we have to AND it with 2 2 = 1<<2 = <100>2 . <10100> <100>= <100>= 2 2 = 4(non-zero number), which means it’s 2nd bit is set.
A large benefit of portion manipulation is the fact it will help so you can iterate overall the subsets away from an enthusiastic Letter-feature lay. As everyone knows there have been two Letter you’ll subsets out of virtually any set that have N points.