I suggest you read this IRS Publication.
Publication 559 (2016), Survivors, Executors, and Administrators
https://www.irs.gov/pub/irs-pdf/p559.pdf
**Disclaimer: This post is for discussion purposes only and is NOT tax advice. The author takes no responsibility for the accuracy of any information in this post.**