#Expressing 1000 as the sum of powers of 2

19 messages · Page 1 of 1 (latest)

green solar
#

Express 1000 as the sum of powers of 2, where each power of 2 appears at most twice.

iron moatBOT
unique flicker
#

I mean you don't even need to have the twice rule, you can do it by simply converting 1000 into binary

#

Binary for 1000 is 0b1111101000 which means you can write it as 2^3 + 2^5 + 2^6 + 2^7 + 2^8 + 2^9

rancid pelican
#

ok if you’re doing it by hand and can’t convert into binary

#

you can find the largest power of two that is less than 1000

#

then subtract that power of two

#

then find the largest power of two that is less than that

#

subtract that

#

repeat until u get 0

#

its like long division but in base 2

unique flicker
#

That's... exactly how you convert to binary?

rancid pelican
#

if you dont know how to convert to binary saying “convert to binary” misleads the process

unique flicker
#

Makes sense

green solar
worn spindle
green solar
#

how do i make this channel solved

unique flicker
#

Use .close

somber wolf
#

.solved