Regarding the decimal to binary

why here n&1 is taken what happen with this , and if any other method is this then pls give me you are doing all the things complicated. provide me other method and tell me about n&1…

Hey @ssmit_joshi
n&1 is checking if n is odd or not
its alternative is n%2==1

If u have doubt in other specific thing then let me know ,otherwise please mark this as resolved :slight_smile:

here why we have to reverse the number at lastof program ?

do a dry run on some sample and u will understand why :slight_smile: