You should take a look at the shipping example called Write Dig Port. This example sends a U32 number to DAQmx Write. The data to write in the example is displayed as hex but that doesn't make a difference. You don't have to do any conversion. Port0/line0 is the least significant bit, port0/line1 is the next, etc.