| General > General Technical Chat |
| Why do people call an executable file (.exe) a binary file? |
| << < (8/14) > >> |
| magic:
--- Quote from: m98 on April 25, 2020, 09:16:37 pm ---kibi --- End quote --- I gather the number in your nick is your year of birth :P This made up word didn't even exist when most of us started using computers :D |
| Zero999:
--- Quote from: magic on April 26, 2020, 06:44:20 am --- --- Quote from: m98 on April 25, 2020, 09:16:37 pm ---kibi --- End quote --- I gather the number in your nick is your year of birth :P This made up word didn't even exist when most of us started using computers :D --- End quote --- Yes, I remember the controversy and I think legal action was taken against hard drive manufactures. I've just looked on Wikipedia and I was a student when this was in the process of being standardised. At the time we were just told to accept that kB was taken to mean 1024, when referring to memory, but hard drives, CDs etc. were specified in 1000s of bytes. If I remember rightly Windows at the time listed file sizes in 1024 bytes. I don't know if it still does this. The Linux ls command just lists everything in bytes with options to change from 1024 and 1000. https://en.wikipedia.org/wiki/Binary_prefix#kibi |
| Fred27:
It's hilarious that the OP doesn't know something, but starts from the position that everyone else must be "stupid and uninformed". |
| Zero999:
--- Quote from: Bicurico on April 25, 2020, 11:36:59 am ---A binary file is a file where the meaning of each byte is not human readable. A text or ASCII file is a file which is human readable in a text editor, because each byte is meant to be interpreted as an ASCII code. A binary file can contain executable code or data - the data is just not readable in an text editor, in other words it does not represent ASCII data. Regards, Vitor --- End quote --- Originally ASCII was just 7-bits so all bytes in a plain text file must range between 0 to 127 decimal, although only a few or the control codes, below 32, were accepted for plain text files, normally just tab, new line/cartridge return, depending on the system. Many systems used the 128 to 255 values for symbols, but they were never standardised and could mean a file created using one system wouldn't read properly on another. A binary file is just any file which can't be opened in a text editor. It will just produce seemingly random characters and might not completely load, since the text editor might stop reading the file, as soon as it encounters a zero byte or end of transmission control code. Saving the file will most likely corrupt it, since the text editor might substitute the cartridge return and line feed control codes, with either one or the other, or both, depending on the system. I remember the MS-DOS 7 (Windows 95 to ME) DOS text editor could safely load and edit binary files, if the option was selected. It would just display the whole file, with the new line control codes displayed as symbols, rather than new lines. If you opened a plain text file with it, the ASCII text would show, but there would be symbols, where there should be new lines and the whole would just wrap round. It wasn't as good as a proper text editor, but could be used to edit strings in some .exe files which weren't protected against it and the program would normally run, as long as the length of the strings weren't changed. |
| TomS_:
Well, on a personal level, I use the term "binary" to refer to the compiled "source code" version of an application. If you write software you would be more familiar with your application as a bunch of files containing source code in some high level language. Text files more or less. This could then be translated to a machine specific intermediate language, usually some form of assembly language. Also text files, but could also be some other intermediate binary format. That intermediate representation is then assembled to the machine code form that typically is represented by a .exe on Windows, or what ever other format for *nix. The contents of this file will be in binary format as the contents would usually quite literally be the raw instructions to be executed by the CPU, in their native format e.g. where certain bits represent the opcode of the instruction, others the source/destination registers, etc. Plus other data for constants, initialised variables etc. So as far as I'm concerned, binary is completely acceptable and appropriate. My interpretation is that Microsoft simply chose the extension .exe, short for executable, as a way to identify the contents of a file as being "code". For the user it makes it easy to identify which file they should double click to launch the application. Perhaps the OS relies on that extension to know that it should load and execute the code contained within, if it doesn't have any other metadata to describe what the file is and what to do with it (e.g. if you rename it to .txt it would open in Notepad instead). |
| Navigation |
| Message Index |
| Next page |
| Previous page |