Carbon Under Extreme Conditions, A First Principles Theoretical Study