If you decide to do format (to format) on your hard drive you might wonder if it will remember bad sectors after formatting.
Assuming that the disk format is NTFS, which is the most common nowadays, then the answer is yes, the disc remembers them bad sectors.
A domain is considered broken when it is not accessible. The information for the damaged sectors they are saved in a specific file ( $BadClus ) which is however 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.