I'm trying it out just to see if I could solve it. It would be great if I could receive tips on how to improve it.
//input
var decimal = prompt("Please enter a decimal number");
if (decimal >= 1 && decimal < 1000000000) {
//convert to binary
var binConvert = parseInt(decimal, 10).toString(2);
//reverse binary number
var makeString = binConvert.toString();
var srj = makeString.split("").reverse().join("");
var makeNumber = Number(srj);
//convert back to decimal
alert(parseInt(makeNumber, 2));
} else {
alert("Input number should be: 1 <= N < 1 000 000 000. Please try again.");
}