I am unable to understand javascript bitwise

I am unable to convert the numbers into binary format. It is too difficult to understand. Please help me with this so that I will be able to move ahead. Thank you.

Hi.
It is very simple. Take pen and paper. Let’s do it step by step.
Step 1: divide the number by 2 until it reaches to 1
For example let’s find binary of 13
13 / 2 => remainder = 1 quotient = 6 (take whole number)
6 / 2 => remainder = 0 quotient = 3
3 / 2 => remainder = 1 quotient = 1
1 / 2 => remainder = 1
step 2: Now arrange the remainders from bottom to top: which is 1101 which is binary of 13.

Another example: find binary of 20
20 / 2 => remainder = 0, quo = 10
10 / 2 => remainder = 0, quo = 5
5 / 2 => remainder = 1 quo = 2
2 / 2 => remainder = 0 quo = 1
1 / 2 => rem = 1

Arrange from bottom to top: 10100
I hope it is clear now.

Note: the binary conversion for negative numbers is different.

Thanks.