How to install yosemite on a new harddrive?
Theoretically, you could but it may or may not work. In my best opinion, I would go to an Apple Store and tell them to boot your computer on their network. They will do it for free, and it is a lot faster than sitting at home waiting for 2 hours while it downloads the OS again.