I am sending and receiving packets with the help of Node.JS Buffers but I am not sure how to convert these buffers into a binary representation. I tried this but it did not work
let buff = Buffer.alloc(10);
buff[0] = 10;
buff[1] = 16;
buff[2] = 20;
buff[3] = 32;
buff[4] = 9;
console.log(buff);
console.log(buff.toString('binary'));