0
$\begingroup$

I saw this video on how to teach binary number on Twitter: https://mobile.twitter.com/MichaelGalanin/status/1140072321006428160

and i noticed is that the binary correspondent to the N numbers change from 0 to 20 according to a flipping sequence from left to right.

(1,2,1,3,1,2,1,4,1,2,1,3,1,2,1,5,1,2,1,3....)

which seems to me that it go that way

1,2,1,3,1,2,1,4,1,2,1,3,1,2,1,5,1,2,1,3,1,2,1,6,1,2,1,3,1,2,1,7,1,2,1,3,1,2,1,2,1,8

here is the sequence of flips ordered in easier way for the weary eyes:

1213

1214

1213

1215

1213

.

.

.

.

my question is, is this sequence of flips proven true to all N binary Numbers? is it even true at all after 20?

$\endgroup$
  • $\begingroup$ I think you made an error in your extraction of the sequence. I believe it should look something like 1,2,1,3,1,2,1,4,1,2,1,3,1,2,1,5,1,2,1,3,1,2,1,4,1,2,1,3,1,2,1,6 Essentially there is a pattern in the number of flips for a binary number. I can think of a definitive proof off the top of my head, but it would involve reflection for each new number of flips. Edit: Looks like you can predict it based on highest power of 2 that divides that number. $\endgroup$ – Kitter Catter Jun 16 at 5:00
0
$\begingroup$

The number of flips would correspond to the number of zeros terminating the binary numbers. Essentially the number of flips corresponds to the cascading of 1's->0's.

This immediately implies that the number of flips must be the highest power of 2 that divides the number plus one.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.