It depends on the license, if it is a retail version then you can install on any PC you want as long as it isnt still installed on another PC (like you are talking about) if it is an OEM license then I don't think you can, well you can but it isn't strictly an honest thing to do.
OEM is meant to be tied to a motherboard, I've heard some folk have said the old mobo is fried and have tied their OEM license to a new mobo but I've never tried.