Converting decimal to binary means finding which powers of 2 add up to your number. There are two standard methods, and they always agree.
Method 1: subtract powers of 2. Walk down the powers 128, 64, 32, 16, 8, 4, 2, 1. If a power fits into what's left, write 1 and subtract it; if not, write 0. It's quick for small numbers and shows exactly why the answer is right.
Largest-first always works because each power is bigger than all the smaller ones combined. If you skip a power that fits, the rest can never make up the gap.
Method 2: repeated division. Divide by 2, write down the remainder, and repeat on the quotient until it reaches 0. The remainders are the bits LSB first, so read them bottom-up. It's purely mechanical and works for any size.
How many bits will you need? The smallest n with 2ⁿ − 1 ≥ your number (see bit width). Check every answer by converting back (binary to decimal conversion).