Doing binary arithmetic in Windows Calculator and

bitrex
Messages
190
Reaction score
0
I was doing some conversions from binary to decimal and vice versa today using Windows Calculator and I noticed the following, if I multiply B11111111 and B11111111 I get the following: B1111111000000001. Uhhh...great! What's going on here? It looks like it's rolling over the 8 LSB when it shouldn't, or something...:confused:
 
Mathematics news on Phys.org
No, it's just giving you the right answer, as remarkable as that might seem!

B11111111 is just 28-1= 255. B11111111 times B11111111 is the same as 255(255)= 62025 which, in binary, is B1111111000000001.

In more detail: B11111111 is, as I said, 28-1. B11111111 times B11111111 is (28- 1)(28- 1)= (28)2- 2(28)+ 1= 216- 29+ 1. 216- 29= 29(216- 9-1)= 29(27-1). That "27-1" is the reason for the 7 "1"s leading the number. That 29 is the reason it is followed by 9 "0"s- or would be if it were not for that final "+ 1".
 
HallsofIvy said:
In more detail: B11111111 is, as I said, 28-1. B11111111 times B11111111 is (28- 1)(28- 1)= (28)2- 2(28)+ 1= 216- 29+ 1. 216- 29= 29(216- 9-1)= 29(27-1). That "27-1" is the reason for the 7 "1"s leading the number. That 29 is the reason it is followed by 9 "0"s- or would be if it were not for that final "+ 1".

Nice explanation, HallsofIvy. You may be interested in another binary pattern I discovered recently: integers made up of n digits of 9s have binary representations that have exactly n digits of trailing 1s (e.g., 9,999,999 is 100110001001011001111111 in binary). I proved it here: http://www.exploringbinary.com/nines-in-binary/ .
 
Thanks for the explanation! After thinking about it, I see the flaw in my reasoning. I was expecting B11111111 * B11111111 to become B1111111111111111, remembering that when doing it out longhand the partial product of the multiplicand is always 1 if it and the multiplier are 1. Since there are no zeros in either of them, I expected the result to have no zeros also. However, I was forgetting about the "placeholder" zeros that accumulate as the partial products are shifted left.
 
Insights auto threads is broken atm, so I'm manually creating these for new Insight articles. In Dirac’s Principles of Quantum Mechanics published in 1930 he introduced a “convenient notation” he referred to as a “delta function” which he treated as a continuum analog to the discrete Kronecker delta. The Kronecker delta is simply the indexed components of the identity operator in matrix algebra Source: https://www.physicsforums.com/insights/what-exactly-is-diracs-delta-function/ by...
Fermat's Last Theorem has long been one of the most famous mathematical problems, and is now one of the most famous theorems. It simply states that the equation $$ a^n+b^n=c^n $$ has no solutions with positive integers if ##n>2.## It was named after Pierre de Fermat (1607-1665). The problem itself stems from the book Arithmetica by Diophantus of Alexandria. It gained popularity because Fermat noted in his copy "Cubum autem in duos cubos, aut quadratoquadratum in duos quadratoquadratos, et...
Thread 'Imaginary Pythagorus'
I posted this in the Lame Math thread, but it's got me thinking. Is there any validity to this? Or is it really just a mathematical trick? Naively, I see that i2 + plus 12 does equal zero2. But does this have a meaning? I know one can treat the imaginary number line as just another axis like the reals, but does that mean this does represent a triangle in the complex plane with a hypotenuse of length zero? Ibix offered a rendering of the diagram using what I assume is matrix* notation...
Back
Top