Arduino IDE is the software to write & compile codes for the IoT devices like Arduino, NodeMCU etc. If you want to know how to install it, follow this post.
First Save or Save As your ino file in your computer.
Now open Arduino IDE on your pc. Then go to Sketch in the menu bar and select export compiled binary.
Now Select Show Sketch folder. This will open the folder where the bin file is created.
Now you have successfully created bin file. To know how to flash this bin file, follow the posts below.