2 ms·
Derivative of a binary number: Think of any binary number as a sequence of 0s and 1s in a certain order For example, 16 in binary is the sequence: 1000 Readi
by nico 2y ago
Derivative of a binary number:
Think of any binary number as a sequence of 0s and 1s in a certain order
For example, 16 in binary is the sequence: 1000
Reading the sequence from right to left, two bits at a time, for each one of those two bits, we can note if the value of the “earlier” bit in the sequence changed
I can note a change as 1 and a not change as 0, then the above sequence becomes:
0 (0-0 no change)
0 (0-0 no change)
1 (0-1 changed)
Result: 100
In decimal: 8
Now if I want to “integrate” that sequence, I can do the reverse, but now I have ambiguity, if I start with 0, the sequence would be the original:
0
0 (0 means no change)
0 (0 means no change)
1 (1 change)
Result: 1000
But if we start with 1 instead:
1
1 (0 no change)
1 (0 no change)
0 (1 change)
Result: 0111
Intuitively you can think of this as tracking a “discrete rate of change”
Usually the derivative or slope of a function gives a real value, now imagine “zooming into” the function until you can’t track a real value anymore, only whether what you are looking at is changing or not every time you look
- nico 2y agoThis can also be generalized to anything that can be expressed as sequence generated by a function You can always just split the thing into it’s sequential elements, then get a pair-wise derivative in between the elements The sequence of pair-wise derivatives is then the equivalent of the derivative of the original sequence If you do this to the limit where the “space” between the elements is 0, then you get the continuous case
- johnthescott 2y agoentropy of a bit string may be another way to view the bitwise derivative. paper here for analyzing primes: https://arxiv.org/abs/1305.0954 [BiEntropy - The Approximate Entropy of a Finite Binary String]
- nico 2y agoThank you for the reference, these concepts are definitely closely related This is super interesting: > We successfully test the algorithm in the fields of Prime Number Theory (where we prove explicitly that the sequence of prime numbers is not periodic) What we do, and what ML algorithms try to imitate, when learning, is exactly that: finding loops (periodic sequences) within the data (or rather, fitting the data to continuous “loopy” representations)