# How can 1+1 give 10 and 11?

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?

• are both equation with the same system, or two diferent way to add 1 and 1? – Kepotx Mar 22 '18 at 14:35
• Here is another equation: 1+1=0 in Z/2Z. – Daniel Wagner Mar 22 '18 at 19:45
• 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. – BruceWayne Mar 22 '18 at 22:39
• @BruceWayne Alternatively, a significant portion of SE participants arrive through Stack Overflow and already have programming on the brain anyway. – jpmc26 Mar 23 '18 at 1:22
• There are 10 types of puzzler, those who...(and those who do not) – Bilkokuya Mar 23 '18 at 10:22

The first is:

The second is:

concatenation of strings.

• 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! – James Dicken Mar 22 '18 at 14:37
• @JamesDicken A fourth would be 1+1=1 where zero is 0 and any non-zero entity is 1. – Klas Lindbäck Mar 23 '18 at 8:06
• Answering a question like this that is featured on Stack Exchange does wonders for one's reputation... – Statman Mar 23 '18 at 11:12
• @KlasLindbäck Or perhaps it's boolean logic, where + is logical or (for 1+1=1) – phflack Mar 23 '18 at 13:23
• 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. – The_Lone_Devil Mar 23 '18 at 13:54

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.

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

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).

• Actually I think both of these answers are correct. – Statman Mar 22 '18 at 14:42
• 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. – James Dicken Mar 22 '18 at 14:50
• 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. – Happy Green Kid Naps Mar 22 '18 at 22:51
• Base 1 is often referred to as a "tally system". – CollinD Mar 23 '18 at 0:27
• @HappyGreenKidNaps: You can disagree all you want. Doesn't make you right: en.wikipedia.org/wiki/Unary_numeral_system – Chris Mar 23 '18 at 14:22

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

1 + 1 = 11

Gray code, another way to count with 0 and 1

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

"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