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
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.