Julius Plenz – Blog

dec2bin for the poor

Convert 0x53 to binary, quick! – Now you start to think: In which language could you implement a dec2bin function within a few seconds? Or just do it with pen and paper, old school?

But wait, there's poor man's dec2bin!

$ echo -n "\x53" | xxd -b
0000000: 01010011

;-)

posted 2011-01-26 tagged oneliner