views:

265

answers:

3

What is the difference between plain binary format (.bin) and Windows Executable (.exe)?

+3  A: 

There's no such thing as plain binary format. There's no known standard for what is in ".bin" files. Expect any data.

EXE is a file with a well-defined structure for storing code. It's called "Portable Executable" format, and has a PE header starting with MZ.

http://en.wikipedia.org/wiki/Portable%5FExecutable

Pavel Radzivilovsky
+5  A: 

I'm not sure what a "bin" file is in this case. Could be a firmware, could be an object file, could be anything really (it depends on context).

When talking about executables (exe files in the case of windows) these are usually self contained packages with everything required to run them packed in. These file formats usually contain all the executable data, string and other resources, linking data and exports, offsets, and other data stuffed in them. They have everything required for the OS to setup and enviroment to run them, like the dependent libraries that need to be loaded, the architecture it needs to run, etc.

There are lots of different ones in common use:

Lots of others (COFF, COM, etc).

If the operating system supports dynamically linkable libraries (dlls on windows, .so files on linux, dylibs on mac) then they usually share this same packaging format.

Zac Bowling
A: 

BIN: The BIN file type is primarily associated with 'Binary File'. Binary files are used for a wide variety of content and can be associated with a great many different programs. In general, a .BIN file will look like garbage when viewed in a file editor for more info Click here

EXE: The EXE file type is primarily associated with 'Executable File' by Microsoft Corporation. An executable file is basically another name for a program. Virtually all programs that run under Windows or DOS are in the .EXE format for more info click here

peacmaker