How to create * .exe file with Notepad

How to use Notepad to save data as a * .exe file.
How to use Notepad to save data as a * .exe file.
When downloading documents or games from the internet, we often encounter cases where the downloaded file is in a self-extracting format (* .exe) or has a password protected? So how are they made? What software to use to do it?