If you decide to format your hard drive, you might wonder if he will remember the bad sectors after the configuration.
Assuming that the configuration of the disk is NTFS, that is, the most common in our time, then the answer is yes, the disk remembers the bad sectors.
A domain is considered damaged when it is not accessible. Information about the damaged domains is stored in a specific file ($ BadClus) but is deleted after the format.
From then on, it depends on the hard drive model, but the most modern ones automatically detect and mark the damaged domains, so the operating system does not even know there are disk problems. In this case, the operating system can not affect the internal counting of the disk.
In fact, a format might "clear" whether a problematic sector is corrupted or not, and give you back sectors that seemed corrupted but were not, but you will not be able to recover the really corrupted sectors by formatting the disk.
Remember, however, that damaged hard disk partitions are usually a good warning for replacing them so you do not lose your data, since the format will not stop your drive's slider.