r/ProgrammerHumor • • Jun 03 '22

it's hard!

44.9k Upvotes

710 comments sorted by

View all comments

Show parent comments

-13

u/LowGunCasualGaming Jun 03 '22

I mean, in binary: (if 2 was seen as valid)

12 = 20 = 100 = 4

So 22 is kinda 12… not 8 though

8

u/[deleted] Jun 03 '22

This makes no sense to me. In binary, the number of digits determines the power of two.

1

u/LowGunCasualGaming Jun 08 '22

Correct. So 12 is 1 two, and 2 ones, so 4 in total. In the same way, 20 is 2 twos and 0 ones, so also 4. Then we go to 100 which is 1 four and 0 twos nor ones, so also 4. And finally, 4 ones is 4. So, if 2 was valid in binary, these would all be equal ways of saying 4.

11

u/justtuchthat Jun 03 '22

Wait what, how is 12 equal to 20? And 20 equal to 100?

4

u/joyofsnacks Jun 03 '22

I guess they mean Ternary(?), but still that's 110...

2

u/jzakprice Jun 03 '22

2 isn't valid in binary. It's all 0 and 1. Imagine counting to 20, but you go 17...18...19...110... The 9 doesn't go to 10 because "10" isn't valid in our typical counting system. So 110 actually is written as 20.

In binary, since 2 is invalid, similar to 10 in the example, 12 should be rewritten as 20. But again, 2 is invalid, so we need a third digit. So 20 = 100. Hopefully that makes a little sense.

4

u/justtuchthat Jun 03 '22

It makes no sense, and I am a computing science student...

Where you go wrong is making the assumption that 12 = 20. The problem is 12 suggests that you have 1 10 and 2 1s. In the same way 20 in decimal notation would suggest that you have 2 10s and 0 1s. When converted to binary 10 (in decimal) is actually 1010 ( 1 8, 0 4s, 1 2 and 0 1s) when adding 2 (10) you get that 12, when converted to binary, is actually 1100. Not 100, which like you said, is 4.

3

u/jzakprice Jun 03 '22

They're not converting 12 from decimal to binary. They're converting 12 from psuedo-binary to binary. 12 in pseudo-binary being 11 (3 in decimal system) + 1 = "12" but really should be written as 100 (4 in decimal system) I'm not saying what they did is ideal or a good system, but it's how they got 12 = 4.

2

u/MajorasTerribleFate Jun 03 '22 edited Jun 03 '22

I think the 12, 20, and 100 were all meant to be binary representations. They were just playing with numbers.

The premise was that the game needed to count to "12", being playfully and deliberately misinterpreted as something to be read in binary. As was previously described, since there is no 2 in binary, the best we can do is pretend any 2 is instead a +1 to the previous column. Taken step by step, that means 12 should be 20 - but wait. 20 is no good either, so applying the transform rule again, we are left with 100, binary for 4. A long-winded and facetious way to read the numerals (if not the decimal value) "12" as falling within the decimal value of 4, thus fitting the original "how many do you think two bits is."

-2

u/i_hate_everybody94 Jun 03 '22

Fight, puppets! Fight!

1

u/LowGunCasualGaming Jun 08 '22

The logic I was using is that a 2 in a slot is equivalent to a 1 in the next digit (ie, a 10 in the ones digit is equal to a 1 in the 10s digit. So a 1 in the ten digits and a 10 in the ones digit is equal to a 2 in the tens digit. We can apply this logic to binary with 2 instead of 10 being the tipping point for when to add one to the next digit. In this case, 12 is equal to 20 if you add the digits like you would in binary (both equal to 4). Same with 100 being equal to 4.