Convert a decimal number to binary

🏷️ Javascript

Number(value).toString(2);

Convert binary to decimal

parseInt(binary, 2);