HI! what is binary file?
binary files
Collapse
X
-
-
Having followed the link I am not sure I agree with it because it suggests that there is a difference in how a binary and text file is stored. There is not difference in the way a binary and a text file is stored the difference is in what is stored in them and how it is interpreted.
Any file, binary or text, is a series of (normally 8 bit) bytes stored sequencially. Each of these bytes can therefore hold a value between 0 and 255 or -128 and 127 if treated as a signed value.
However for a text file the contents is constrained only to contain values that correspond to printable and whitespace characters when treated as values from the execution character set (often ASCII). For a binary file no such constraint exists the bytes can have any value.
A binary file is strictly any file, a text file is a binary file whose contents follows the constraint of only containing printable or whitespace characters. However in normal usage a binary file is any file that is not a text file.Comment
-
This is true,but if u didn't knowed all of that and u saw same data outputed in diferent format,what would be ur first guess?Originally posted by BanfaHaving followed the link I am not sure I agree with it because it suggests that there is a difference in how a binary and text file is stored. There is not difference in the way a binary and a text file is stored the difference is in what is stored in them and how it is interpreted.
Any file, binary or text, is a series of (normally 8 bit) bytes stored sequencially. Each of these bytes can therefore hold a value between 0 and 255 or -128 and 127 if treated as a signed value.
However for a text file the contents is constrained only to contain values that correspond to printable and whitespace characters when treated as values from the execution character set (often ASCII). For a binary file no such constraint exists the bytes can have any value.
A binary file is strictly any file, a text file is a binary file whose contents follows the constraint of only containing printable or whitespace characters. However in normal usage a binary file is any file that is not a text file.
SavageComment
Comment