Contact: aviboots(AT)netvision.net.il
41,522 questions
54,123 answers
573 users
function get_bits(n){ return (n >>> 0).toString(2); } let n = 365 const pos = 2; console.log(get_bits(n)); n ^= (1 << pos); console.log(get_bits(n)); /* run: 101101101 101101001 */