Can directory be on a sub domain

Can a directory be run on a sub domain – if so i will have a separate domain mapped to this directory in the future. I need to mention this is a buddypress install which I know is yet not officially supported. But I’m trying to make it work. We are thinking about modifying the code a bit