Prime Minister David Cameron says he hopes Scotland votes to stay as part of the United Kingdom when the referendum on independence takes place.