Now we will see the conversion from decimal to binary. Let us show the method with the help of an example. Suppose 95 needs to be converted to binary. Now we need to find the maximum value of n, where 2^n <= 95. The power of the two are 1,2,4,8,16,32,64,128. Here we see 64 <95 or 2^6 = 95. Then n is 6. And our binary number will be seven digits (0 to 6). Since 64 < 95, so this number can be taken. Then in place of sixty four (first from left to right from seventh) will be 1 (1xxxxxx). Now reduce the value of n 1. 64 + 2^5 = 64 + 32 = 96 which is greater than 95. So it cannot be taken. Therefore, I put 0 in the place of thirty-two (10xxxxx). This time reduce the value again, n = 4. 64 + 2^4= 64 + 16 = 80 < 95 .so 1 will sit in sixteen place(101xxxx)।. Now reduce the value of n ,n = 3. 80 + 2^3= 80 + 8 = 88 < 95 . Place of 8 will be 1 (1011xxx), Then n = 2 for 88 + 2^2 = 88 +4 = 92 < 95. 1 will also sit in place of four . Then n= 1. 92 + 2^1 = 92 + 2 = 94 < 95।. 1will add in the place of two(101111x). Now n = 0. 94 + 2^0 = 94 + 1 = 95. So I put 1 in the place of one's. Now the Binary digits will be : 1011111

How will I findout the value of n ? Can anyone tell me which method the author has used here?

3 Ways to Convert from Decimal to Binary - wikiHow[^]

https://www.thoughtco.com/changing-from-base-10-to-base-2-2312136

1|47 | 2

1 | 23 | 2

1 | 11 | 2

1 | 5

1 | 2

0 | 1 | 2

1 | 0 going up on the reminders 95 = 1011111

or in C++ https://pastebin.com/UJ8a5mN1