Doing binary arithmetic in Windows Calculator and

Click For Summary

Discussion Overview

The discussion revolves around binary arithmetic, specifically the multiplication of binary numbers using Windows Calculator. Participants explore the implications of binary multiplication and the resulting binary representation, addressing misconceptions and clarifying the mechanics of binary operations.

Discussion Character

  • Technical explanation
  • Conceptual clarification
  • Debate/contested

Main Points Raised

  • One participant notes an unexpected result when multiplying B11111111 by B11111111, suggesting a potential rollover of the least significant bits (LSB).
  • Another participant argues that the result is correct, explaining that B11111111 equals 255 and that the multiplication yields 62025, which is accurately represented as B1111111000000001 in binary.
  • A further elaboration on the multiplication process is provided, detailing how the binary representation is derived from the mathematical expression of the multiplication.
  • A participant shares an observation about a pattern in binary representations of integers made up of n digits of 9s, claiming that they have exactly n digits of trailing 1s in binary form.
  • One participant acknowledges a flaw in their initial reasoning regarding the expected outcome of the multiplication, realizing the importance of placeholder zeros in binary multiplication.

Areas of Agreement / Disagreement

Participants express differing views on the initial interpretation of the multiplication result, with one participant questioning the outcome while others defend its correctness. The discussion includes clarifications and corrections, but no consensus is reached on the initial misunderstanding.

Contextual Notes

The discussion highlights the complexities of binary arithmetic and the potential for misconceptions when transitioning between binary and decimal representations. There are unresolved aspects regarding the understanding of binary multiplication mechanics.

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.
 

Similar threads

  • · Replies 13 ·
Replies
13
Views
3K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 10 ·
Replies
10
Views
3K
  • · Replies 10 ·
Replies
10
Views
6K
  • · Replies 13 ·
Replies
13
Views
4K
  • · Replies 10 ·
Replies
10
Views
3K
  • · Replies 7 ·
Replies
7
Views
1K
  • · Replies 18 ·
Replies
18
Views
3K