I'm working on a MIPS assembler and I need to write out opt codes (ints) as raw binary that is a set bit length (6 bits)... so.... How do I write it out... I know about the write() that takes a char* and a size, but even casting the int to a char array doesn't seem to work... Ideas?