Contact: aviboots(AT)netvision.net.il
43,919 questions
57,323 answers
573 users
fun getBits(n: Int): String { return n.toString(2) } fun main() { var n = 365 val pos = 2 println(getBits(n)) n = n xor (1 shl pos) println(getBits(n)) } /* run: 101101101 101101001 */