Answers for "javascript get binary form"

0

number to binary javascript

const convertNumberToBinary = n => {
    // convert number to binary
    let binary = (n >>> 0).toString(2).split('').sort().join('');
    // convert binary to number
    let number = parseInt(binary, 2);
    // return result
    return number;
}
Posted by: Guest on June-23-2020
2

how to get binary value of int javascript

const convertNumberToBinary = number => {
    return (number >>> 0).toString(2);
}
Posted by: Guest on May-28-2020

Code answers related to "javascript get binary form"

Code answers related to "Javascript"

Browse Popular Code Answers by Language