Modul 1.2 saral codechef binary class

  1. modul1.2 :-
    binary to decimal:-
    we have any binary number so we have to find that decimal number without in binary o to till that number so we lets start…
    we have 101010 binary number so
    first
    1=1
    10=2
    101=5
    1010=10
    10101=21
    101010=42
    where we add 1 there we do that decimal number double and 1 add then we want add 0 so that decimal number we have to double then we want to add 1 so that decimal do double and add 1 so same way it will come .