title: SQL: bitwise operation
body: <p>Admittedly, I'm a bit ignorant of bitwise and hex etc. It's just not something I've had to deal with very much. So what I'm looking at is a value of <code>0401</code> in my database. I know I can concatenate and get <code>0x0401</code> easily enough, but I need to be able to get it to binary form: <code>0000 0001 0000 0100</code> though I'm having trouble finding any examples that will do what I need.</p>