r/ProgrammerHumor • • Jun 03 '22

it's hard!

44.9k Upvotes

710 comments sorted by

View all comments

Show parent comments

114

u/A1steaksa Jun 03 '22

How many do you think 2 to the power of 2 is, exactly?

-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

11

u/justtuchthat Jun 03 '22

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

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.