Author Topic: Why do people call an executable file (.exe) a binary file?  (Read 7954 times)

0 Members and 1 Guest are viewing this topic.

Offline IanB

  • Super Contributor
  • ***
  • Posts: 11790
  • Country: us
Re: Why do people call an executable file (.exe) a binary file?
« Reply #50 on: April 26, 2020, 09:26:47 pm »
I think T3sl4co1l had the best answer, which is that a binary file is one where the exact order and value of the bytes is critical and must not be changed. If you copy a binary file, the copy must have exactly the same bytes in exactly the same order with no additions, removals, or replacements, or the file will be corrupted. With a text file this is not necessarily the case, for example a line end marker of LF on one system may be replaced by CR+LF on another system without changing the meaning of the file.

This was important in the old days with file transfer programs like Kermit, where copying a binary file in text mode might damage the file. It is less important these days in the era of networking, where all files tend to be copied byte for byte and the application tools are more tolerant of different line ending conventions.

We then have what magic said, which is that "a binary" tends to be a colloquialism for a binary file containing executable code in one form or another, e.g. *.obj, *.lib, lib*.a, *.dll, *.exe, etc.

A .jpg may be a binary file, but it is not commonly referred to as  "a binary".

In an earlier post I nearly said that opening a binary file in a text editor may produce a display that looks like line noise, but then I thought that many readers may not have even seen line noise and may not know where the term comes from. Lucky are those that never had to connect over a dial up line with an acoustic modem  :phew:
« Last Edit: April 26, 2020, 09:28:31 pm by IanB »
 

Offline rsjsouza

  • Super Contributor
  • ***
  • Posts: 5980
  • Country: us
  • Eternally curious
    • Vbe - vídeo blog eletrônico
Re: Why do people call an executable file (.exe) a binary file?
« Reply #51 on: April 27, 2020, 01:17:52 am »
I think T3sl4co1l had the best answer, which is that a binary file is one where the exact order and value of the bytes is critical and must not be changed. If you copy a binary file, the copy must have exactly the same bytes in exactly the same order with no additions, removals, or replacements, or the file will be corrupted. With a text file this is not necessarily the case, for example a line end marker of LF on one system may be replaced by CR+LF on another system without changing the meaning of the file.
If only the world was so simple... :)

A XML file is not a binary file, but it can't also have the order of text changed or removed. A batch or shell script falls into the same category and, to top it off, is an executable. These have more lax restrictions than a binary, but not as much as a composed text.

The definition has to be related to the human readability.
Vbe - vídeo blog eletrônico http://videos.vbeletronico.com

Oh, the "whys" of the datasheets... The information is there not to be an axiomatic truth, but instead each speck of data must be slowly inhaled while carefully performing a deep search inside oneself to find the true metaphysical sense...
 

Offline amyk

  • Super Contributor
  • ***
  • Posts: 8240
Re: Why do people call an executable file (.exe) a binary file?
« Reply #52 on: April 27, 2020, 01:31:39 am »
Here's something to ponder...

Here are a few lines from a .hex file:
[plain]
:100000002F0000EA24F0A0E340F0A0E32CF0A0E3EE
:1000100034F0A0E30000A0E1F0FF1FE5BA00A0E388
:10002000070000EAA800A0E3050000EAAE00A0E394
:10003000030000EAB400A0E304E04EE2000000EA9E
:10004000BF00A0E304E04EE280119FE50120D0E470
:10005000143091E5200013E3FCFFFF0A000052E397
:1000600000208115F8FFFF1A0850A0E39840A0E394
:100070002E0EA0E1002094E7143091E5200013E358
[/plain]

But what you are actually seeing on your monitor is ascii.  Does that make it "stupid" to call it a "hex" file?
What I'm actually seeing on my monitor is pixels. Or rather, the photons emitted by said pixels.
 

Offline IanB

  • Super Contributor
  • ***
  • Posts: 11790
  • Country: us
Re: Why do people call an executable file (.exe) a binary file?
« Reply #53 on: April 27, 2020, 01:53:13 am »
A XML file is not a binary file, but it can't also have the order of text changed or removed.

I agree with you. An XML file is not a binary file, it is a text file.
 

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21606
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: Why do people call an executable file (.exe) a binary file?
« Reply #54 on: April 27, 2020, 02:02:18 am »
He did say "not necessarily the case"...

XML, batch, script -- none should care about the order of whitespace, AFAIK.  Whitespace is text, therefore they can be reordered to some extent.

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline Brumby

  • Supporter
  • ****
  • Posts: 12288
  • Country: au
Re: Why do people call an executable file (.exe) a binary file?
« Reply #55 on: April 27, 2020, 02:24:36 am »
Hey, slow down.  I've run out of popcorn.   ;D
 

Offline rsjsouza

  • Super Contributor
  • ***
  • Posts: 5980
  • Country: us
  • Eternally curious
    • Vbe - vídeo blog eletrônico
Re: Why do people call an executable file (.exe) a binary file?
« Reply #56 on: April 27, 2020, 02:50:35 am »
All files are binary and text files are a subset; if the order of the bits of the ASCII characters of a text file is changed, it becomes unreadable.

Thinking a bit more about that, I think a possible "definition" (or just one more element to try and define it) is that text files can be created and interpreted by a human without aids other than a text input device (e.g. keyboard, optical pointer) and a display device (printer, character display, graphical display, etc.).

Or maybe not. It is getting late here... Good evening y'all!
Vbe - vídeo blog eletrônico http://videos.vbeletronico.com

Oh, the "whys" of the datasheets... The information is there not to be an axiomatic truth, but instead each speck of data must be slowly inhaled while carefully performing a deep search inside oneself to find the true metaphysical sense...
 

Offline Back2Volts

  • Supporter
  • ****
  • Posts: 495
  • Country: us
Re: Why do people call an executable file (.exe) a binary file?
« Reply #57 on: April 27, 2020, 03:22:33 am »
As great as the internet is, this is just a stupid mistake that somebody once made and now everybody keeps repeating that.

Leo

 :-DD Not sure how old you are, but we called files binary and non-binary long before the internet (as we know it today) conquered  the world  ^-^
Calling a file "binary" is as common now as it were 40 years ago from where I'm from.

Yes, this question goes right along with "Did phones really have a round disk with holes?"    ;D
 

Offline Nerull

  • Frequent Contributor
  • **
  • Posts: 694
Re: Why do people call an executable file (.exe) a binary file?
« Reply #58 on: April 27, 2020, 05:05:02 am »
I think T3sl4co1l had the best answer, which is that a binary file is one where the exact order and value of the bytes is critical and must not be changed. If you copy a binary file, the copy must have exactly the same bytes in exactly the same order with no additions, removals, or replacements, or the file will be corrupted. With a text file this is not necessarily the case, for example a line end marker of LF on one system may be replaced by CR+LF on another system without changing the meaning of the file.
If only the world was so simple... :)

A XML file is not a binary file, but it can't also have the order of text changed or removed. A batch or shell script falls into the same category and, to top it off, is an executable. These have more lax restrictions than a binary, but not as much as a composed text.

The definition has to be related to the human readability.

Sure it can. Changing the line endings will not break an XML file, generally.

That's why FTP has 'ASCII' and 'BINARY' transmission modes. Binary mode preserves a file byte for byte, precisely. ASCII does translations between different operating system text encoding standards. The sending host is responsible for transforming the text file into a standard NVT-ASCII format from whatever its native format is, and the receiving host is responsible for doing the reverse.
« Last Edit: April 27, 2020, 05:11:07 am by Nerull »
 

Offline james_s

  • Super Contributor
  • ***
  • Posts: 21611
  • Country: us
Re: Why do people call an executable file (.exe) a binary file?
« Reply #59 on: April 27, 2020, 05:11:46 am »
The key to all of this is that language is an imprecise art form, certainly English is notorious, I can't comment on the nature of other languages.

I think it's pretty clear that the origin of the term comes from the fact that human readable source code goes into a compiler/linker/assembler and a non-human-readable binary file comes out. The term "binary" differentiates the compiled code from human-readable source.

Beyond that we're back to the fact that language is imprecise and has many nuances. There are binary files that are neither human readable nor are they compiled from source or executable, deciding what to call a given file is not always clear cut and there are multiple correct answers in many cases. It's not sufficient in many cases to simply read the words and interpret them literally, I could go on all day listing examples of common phrases that are nonsensical if interpreted absolutely literally.
 

Offline NivagSwerdna

  • Super Contributor
  • ***
  • Posts: 2495
  • Country: gb
Re: Why do people call an executable file (.exe) a binary file?
« Reply #60 on: April 27, 2020, 08:53:53 am »
The key to all of this is that language is an imprecise art form, certainly English is notorious, I can't comment on the nature of other languages.
Which leads to the great cryptic crosswords.   :)
 

Online tooki

  • Super Contributor
  • ***
  • Posts: 11332
  • Country: ch
Re: Why do people call an executable file (.exe) a binary file?
« Reply #61 on: April 27, 2020, 04:00:31 pm »
Hello everybody,

This has been very confusing to me at times, and to be honest I do not get it.

Almost everywhere you go to download something - especially in the open source community - the .exe file is often referred to as a binary file.
This makes zero sense to me, every file on a computer is binary based, and solely calling a .exe file for binary is just stupid and uninformed.

Even wikipedia has the following to say about binary files: "A binary file is a computer file that is not a text file." (https://en.wikipedia.org/wiki/Binary_file)
AFAIK, a text file is as binary as the browser in which I am typing right now.

As great as the internet is, this is just a stupid mistake that somebody once made and now everybody keeps repeating that.
Do any of you guys know a compelling argument for refering to these files as binary? Because if not, let's try to stop that misconception. And just call the exectables, which in my mind is a far more correct and usefull name.

Leo
As others have said, not every executable is a binary, and not every binary is an executable. Your confusion/anger is coming from a place where you’re assuming they’re equivalents, but they’re not!

I mean, I get what your thought process is, but it’s just not a sensible approach in practice.

Yes, all text on a computer is ultimately encoded as binary. So think of it like this: if all files are binaries, then we can still give more specific names to particular subtypes. In that case, “binary” becomes the catch-all for everything, especially for everything that doesn’t neatly fall into a named subtype. This approach can be nested.

For example, an HTML file is just a text file. And a text file is just a bunch of binary. But awareness of the  content gives us a special name for it, because by knowing this, we can interpret it in a certain way. It’s not just binary, it’s not just text, it’s HTML.

Computing is all about abstraction: wrapping one thing in another layer that shields you from the nitty-gritty details of the layers within. Without this onion of layer after layer after layer, modern computing plain and simply would not be distantly possible. As such, a lot of the terminology deals with naming the layer that’s most useful for a particular context.

We call binary files “binaries” because there’s no human-readable form. With a text file, there’s an abstraction layer that is human-readable, so we refer to that when we can.

Or like Masa said in the excellent example of digital actually being a subset of analog (ALL signals are analog at some level), yet nonetheless the analog/digital terms make a beautiful contrasting pair for almost all situations.

I completely agree with everyone telling you to lose the arrogance and simply learn and accept the terminology as it exists. You will NOT gain anything from your approach.
 

Offline ogden

  • Super Contributor
  • ***
  • Posts: 3731
  • Country: lv
Re: Why do people call an executable file (.exe) a binary file?
« Reply #62 on: April 27, 2020, 05:51:10 pm »
We call binary files “binaries” because there’s no human-readable form.
Why do you add to confusion by introducing "human readability"? HEX files are not that much "human readable", many word processor files that are binary, can contain human-readable information.

Wikipedia says "A binary file is a computer file that is not a text file.". That's it. All you want to know. Well, besides knowing what text file is :)

https://en.wikipedia.org/wiki/Binary_file
https://en.wikipedia.org/wiki/Text_file
 

Online Alex Eisenhut

  • Super Contributor
  • ***
  • Posts: 3330
  • Country: ca
  • Place text here.
Re: Why do people call an executable file (.exe) a binary file?
« Reply #63 on: April 27, 2020, 06:51:13 pm »
all text on a computer is ultimately encoded as binary.

Even if stored on a https://en.wikipedia.org/wiki/Multi-level_cell ?? ;D
Hoarder of 8-bit Commodore relics and 1960s Tektronix 500-series stuff. Unconventional interior decorator.
 

Online tooki

  • Super Contributor
  • ***
  • Posts: 11332
  • Country: ch
Re: Why do people call an executable file (.exe) a binary file?
« Reply #64 on: April 28, 2020, 08:12:36 am »
We call binary files “binaries” because there’s no human-readable form.
Why do you add to confusion by introducing "human readability"? HEX files are not that much "human readable", many word processor files that are binary, can contain human-readable information.
Actually, that phrasing had already been introduced by others in this thread.

But your point is well taken. We meant “human readable” in that you can read the characters, even if they aren’t immediately understandable.

Hex, FWIW, is simply a convenient way to display binary data, instead of displaying long strings of 1s and 0s. They’re definitely not text files.


Wikipedia says "A binary file is a computer file that is not a text file.". That's it. All you want to know. Well, besides knowing what text file is :)
Well, it’s all you need to know unless you’re a cocky teenager who thinks he’s outsmarted the entirety of the computer industry!  ;D
 

Offline ogden

  • Super Contributor
  • ***
  • Posts: 3731
  • Country: lv
Re: Why do people call an executable file (.exe) a binary file?
« Reply #65 on: April 28, 2020, 04:24:13 pm »
We meant “human readable” in that you can read the characters, even if they aren’t immediately understandable.
Yes, I got it that saying so people did mean plain text files. I just wanted to point out problem with term "human readable" because there are machine-readable text files, like (surprise surprise) HEX files.

Quote
Hex, FWIW, is simply a convenient way to display binary data, instead of displaying long strings of 1s and 0s. They’re definitely not text files.
Please do not confuse display with file ;)  HEX files, other name Intel HEX files are definitely text files:

https://en.wikipedia.org/wiki/Intel_HEX

Quote
Well, it’s all you need to know unless you’re a cocky teenager who thinks he’s outsmarted the entirety of the computer industry!  ;D
:) It is fine to be young and "think different". Hopefully OP will take file format lesson for good and proceed further.
 
The following users thanked this post: tooki


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf