I'm trying to run an 11-bit R2R DAC from an arduino, being controlled by processing. In order to do so, I need 11 different binary values that I can pass through firmata to set 11 separate digital pins. The binary function built into Processing gives me a string of digits, but there's no way for me to split it up. As far as I can tell, the split command is not of any help, because it needs some delimiting character sandwiched in between useful values, which is not what the binary output produces.
Is there an efficient way to convert a decimal value to binary in 11 separate int variables without resorting to writing three pages of nested if-then statements? I'm not a very good programmer, but I imagine that would be the least efficient way to do it.