This convention is in place due to the original definition of Decibel (dB) as a measure of a ratio between powers. If X, X0 are power measurements( X0 could be the input or reference power, X the output ), then the dB measurement was defined as X_dB = 10log_10 (X/X0) This way, if X is 10 times X0, we read X is 10dB greater than X0. On the usefulness of utilizing the log_10: it allows to express a very large range of ratios in a range of moderate size, allowing one to clearly visualize huge changes of some quantity. Many contributions to Control Theory have come from the area of Electrical Engineering. Since in a circuit with constant resistance, the power developed is proportional to the square of the applied voltage, then if V and V0 are two voltages of interest (I/O) one finds that: V_dB= 10log_10(V^2/V0^2) = 20log_10(V/V0) which is the reason why Electrical engineers use the dB defined as 20log_10(V/V0), and so Control theorists do!

C code for converting decimal to binary: char buff[10]; int i; printf("enter the number\n"); scanf("\n%d", &i); itoa(i,buff,2); printf("%s", buff);