What processor are you using?
With most processors, the data direction register will set a bit as output with the corresponding bit the DDR low (say) and as an input with the bit high (say).
So if the DDR has 8 bits and you wanted bit 2 as an output and the rest as inputs you would write 11111011 to the DDR.
If you wanted bit 1 and bit 6 as outputs then you'd write 10111101 to the DDR and so on.
In other words, it all depends on the bit pattern that you write to the DDR.