2
$\begingroup$

I suspect this may be more of a concept / theory question, but, I haven't been able to wrap my brain around what exactly a binary file is.

I've read links such as the below:

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

https://betterexplained.com/articles/a-little-diddy-about-binary-file-formats/

But, the piece of the puzzle that's confusing me, is that ALL files are stored as 1's and 0's on a hard-disk, or, in RAM, etc. (i.e. there's no physical engraving of the hex characters "6F" onto a disk platter for example; it's still a binary format that the data is stored in).

So, if all files are stored as binary, then, presumably it's an operating-system, (& filesystem) concept to refer to something as "binary" file?

$\endgroup$
  • $\begingroup$ A binary file is one which is not a text file. See Wikipedia for more on text files. $\endgroup$ – Yuval Filmus Jul 19 '18 at 8:53
-1
$\begingroup$

A binary file is a file that is simply not a text file. It means that a bin file has a specific format (mp3, exe, jpg...) and can not be interpreted only as a character sequence. There are many ways data can be formatted and read.

$\endgroup$
  • 2
    $\begingroup$ A binary file need not have a "specific format". $\endgroup$ – Yuval Filmus Jul 19 '18 at 11:00
  • $\begingroup$ A binary file is not just a bunch of 0's and 1's, it needs a way to be formatted. $\endgroup$ – dismantl Jul 19 '18 at 11:04
  • 1
    $\begingroup$ If you store a cryptographic key in a file, it's not formatted at all. There isn't any set of allowable formats for files, dictated by the operating system. $\endgroup$ – Yuval Filmus Jul 19 '18 at 11:07
  • $\begingroup$ Oh ok, I see what you mean. It's clearer this way $\endgroup$ – dismantl Jul 19 '18 at 11:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.