5
$\begingroup$

Just a quick, easy sum to pass the time for those at work.

This was used as an exercise when I did a programming course to outline the importance of thinking outside the box. It was also used to demonstrate that just because an answer is right, does not mean other answers are wrong.

1 + 1 = 10

How is this so?

Also,

1 + 1 = 11

How is this the case?

$\endgroup$
  • $\begingroup$ are both equation with the same system, or two diferent way to add 1 and 1? $\endgroup$ – Kepotx Mar 22 '18 at 14:35
  • 6
    $\begingroup$ Here is another equation: 1+1=0 in Z/2Z. $\endgroup$ – Daniel Wagner Mar 22 '18 at 19:45
  • 2
    $\begingroup$ I'd bet one reason the answers came in so quickly is "...when I did a programming course...". I also immediately thought "I bet binary is coming in somewhere". I'd bet it you made the description a little more vague, it would be a little trickier. $\endgroup$ – BruceWayne Mar 22 '18 at 22:39
  • 5
    $\begingroup$ @BruceWayne Alternatively, a significant portion of SE participants arrive through Stack Overflow and already have programming on the brain anyway. $\endgroup$ – jpmc26 Mar 23 '18 at 1:22
  • 1
    $\begingroup$ There are 10 types of puzzler, those who...(and those who do not) $\endgroup$ – Bilkokuya Mar 23 '18 at 10:22
25
$\begingroup$

The first is:

addition of integers in binary.

The second is:

concatenation of strings.

$\endgroup$
  • 1
    $\begingroup$ You are indeed correct. There are two more answers to 1 + 1. The obvious one being 2. I cant remember what the fourth answer is though, bonus "points" if you get it! $\endgroup$ – James Dicken Mar 22 '18 at 14:37
  • $\begingroup$ @JamesDicken A fourth would be 1+1=1 where zero is 0 and any non-zero entity is 1. $\endgroup$ – Klas Lindbäck Mar 23 '18 at 8:06
  • 1
    $\begingroup$ Answering a question like this that is featured on Stack Exchange does wonders for one's reputation... $\endgroup$ – Statman Mar 23 '18 at 11:12
  • 2
    $\begingroup$ @KlasLindbäck Or perhaps it's boolean logic, where + is logical or (for 1+1=1) $\endgroup$ – phflack Mar 23 '18 at 13:23
  • 4
    $\begingroup$ 1+1=11 would also work in unary where 1 has been designated as the value. so 1 in this unary is 1 in decimal, and 11 in unary is 2 in decimal and so forth. $\endgroup$ – The_Lone_Devil Mar 23 '18 at 13:54
-2
$\begingroup$

1+1=0 in modular calculus like in (1+1) mod 2

$\endgroup$
4
$\begingroup$

the remaining answer might be:

"b", as summing the codepoints of the two 1 characters (which is how some languages may handle addition of characters) results in 98, the codepoint for b

$\endgroup$
1
$\begingroup$

To potentially address alternate additions as answers have already been posted:

Thinking slightly (way?) outside of the box:

1 + 1 = 1 as in if in PHP 1 represents an array that has a non-numeric key, then the sum of the array with itself is the original array.

Or if the conditions were slightly modified:

1 + 1 = 12 where again in PHP 1 represents an array; however, the key is numeric the addition of the array to itself then would result in a appending the original array to itself with a new key.

$\endgroup$
14
$\begingroup$

In the first addition, the two numbers are written is base 2. In the second addition, the two numbers are written in base 1 (and the only digit is 1).

$\endgroup$
  • 8
    $\begingroup$ Actually I think both of these answers are correct. $\endgroup$ – Statman Mar 22 '18 at 14:42
  • 2
    $\begingroup$ Apologies, now I have been further enlightened on the matter I can see they are both correct. However I was referring to string concatenation in the second equation as has been stated by Statman and several others in their answers. $\endgroup$ – James Dicken Mar 22 '18 at 14:50
  • 2
    $\begingroup$ I disagree. In Base n, the symbols that are used for digits are from 0 thru n-1 e.g., binary or base 2, the digits are either 0 or 1. In base 10, the digits are 0 through 9. In base-16, the digits are [0-9a-f]. In a way, base one is nonsensical. $\endgroup$ – Happy Green Kid Naps Mar 22 '18 at 22:51
  • 6
    $\begingroup$ Base 1 is often referred to as a "tally system". $\endgroup$ – CollinD Mar 23 '18 at 0:27
  • 5
    $\begingroup$ @HappyGreenKidNaps: You can disagree all you want. Doesn't make you right: en.wikipedia.org/wiki/Unary_numeral_system $\endgroup$ – Chris Mar 23 '18 at 14:22
7
$\begingroup$

The first equation:

binary addition, as in base 2, 01+01 = 10

The second equation:

string concatenantion, as "1"+"1" make the string "11"

as you mention in another answer comment, there are other possible equation:

1 + 1 = 2

integer addition

1 + 1 = 11

Gray code, another way to count with 0 and 1

$\endgroup$
  • 1
    $\begingroup$ All correct, very well explained as well. Also thank you for filling in the missing gap in my memory. $\endgroup$ – James Dicken Mar 22 '18 at 14:48
  • 1
    $\begingroup$ @JamesDicken that's because you need 15 reputation to be able to vote. You can learn more about privileges here $\endgroup$ – Kepotx Mar 22 '18 at 14:52
  • 1
    $\begingroup$ Literally just got the 15 rep as I commented so previous comment has been edited. Thank you for informing me though. $\endgroup$ – James Dicken Mar 22 '18 at 14:53
14
$\begingroup$

What a coincidence. I'm a programmer at work right now.

The first equation is correct if

the calculation is performed in base 2 (binary).

The second equation is correct if

interpreted as a string concatenation operation.

$\endgroup$
  • 2
    $\begingroup$ Started writing this before Statman's answer but he FGITW'd me. $\endgroup$ – F1Krazy Mar 22 '18 at 14:37
  • 1
    $\begingroup$ I did, but I fumbled my gun and had to edit my answer after posting, so we'll call it a draw! $\endgroup$ – Statman Mar 22 '18 at 14:39
  • 2
    $\begingroup$ Unfortunately it will only let me accept one answer which goes to Statman purely based on being the first $\endgroup$ – James Dicken Mar 22 '18 at 14:52
  • 1
    $\begingroup$ “I'm a programmer at work right now“ — No, you’re not. $\endgroup$ – Johannes Mar 24 '18 at 15:29

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.