Yes but you will probably want to format your old HDD (wipe it completely). Just remember to back up any Data you wish to keep before doing this. Then make sure the boot order is correct in the BIOS so the PC boots from your new HDD with the OS on it, rather than trying to boot from the old one.