Ask your own question, for FREE!
Computer Science 8 Online
OpenStudy (df001):

Are text file executable? Are binary file executable? What are the difference between a binary file and a text file in simple English??

OpenStudy (df001):

I have a test tomorrow and I need to know one difference..

OpenStudy (df001):

Perhaps one of them can be opened??

OpenStudy (df001):

Help plz... i beg!!!

OpenStudy (anonymous):

Hey, may I have a question?

OpenStudy (df001):

sure

OpenStudy (df001):

Sorry I was showering.. I didn't think anyone would reply to me

OpenStudy (anonymous):

Ok, is it a personal question of understanding or is it from a textbook? I mean, as the questions stand I'd say that the answer to both is "not necessarily" and they seem deceiving really..

OpenStudy (df001):

Oh, I'm just studying for my exam tomorrow and I am stuck on what the difference is..

OpenStudy (anonymous):

ok, so i'll try my best to explain =) The difference textural and binary files is in what they are meant to store. Binary files are meant to store data. this data can be anything and still be considered 'binary data'. Textual files are meant to hold text, which means data that is 'visible'. That means that if you go to the ASCII table ( http://www.asciitable.com/ ), you'll see that the upper half of the values (128+) are not even assigned (in regular, non-extended, ASCII) and some of those who are assigned have non-visible symbol. When I'm saying non-visible I do not mean whitespace (like spaces.. tabs.. new line..). I mean really non-visible, like the 'null' or 'bell' (which is meant for making a bell sound) and so on. The idea is that if you open a 'text file' in a 'text editor' you'll have all its content easily readable in front of you. The thing here to understand is that binary files are simply not restricted to a subset of only visible symbols while textual files are. that means that you can treat a text file as a binary file, but not necessarily the other way around. The reason a special type of 'text files' exists in the first place is because their purpose is to be more about the meaning of the content than the actual bytes they hold. This comes to play with new lines for example. Unix based operating system use a single byte Line Feed (LF = 10 ASCII) to denote a new line. Windows prepends another one called Carriage Return (CR = 13 ASCII) before it. So the operating system gives you a way to treat the file as Text file and tell it to read a line for you without really paying attention what way it uses to denote new lines.. it will just read the file and figure out on its own by the way it is built where the line ends and give it back to you. Now.. as it comes to executables... both textual files and binary files may or may not be executables. Also, the exact thing people mean saying 'executable' varies. The simple meaning is a file that can be executed as a program. That includes a variety of files, from binary .exe files to textual .bat (batch) or .py (python) files. However, not all binary files are executables, for example a .jpg image file is not meant to be executed, and the same holds with a textual .txt file.. Sometimes by saying executable people mean a binary files like .exe that holds processor instructions that the processor can execute, but even here the file contains additional data (meta data) to tell the operating system how it is meant to be executed. In this case however, script files which require an interpreter to execute them such the .bat or .py files are not considered executables.

OpenStudy (anonymous):

|dw:1447955270109:dw|

OpenStudy (anonymous):

the difference is the application says its a txt file.

OpenStudy (anonymous):

I don't understand what you mean with the wrapper. could you explain? In general I think this summarizes it pretty well: http://www.cs.umd.edu/class/sum2003/cmsc311/Notes/BitOp/asciiBin.html But notice that there is a difference when using `open()` like functions to work with files with `b` flag (binary) and `t` flag (text) which from what I know practically relies on what line ending they use.

OpenStudy (anonymous):

its a wrapper in the since that one set of bit string's describes another set. Everything breaks down into binary. The reason you see text is because the binary text editor says to interpret the next binary string as text.

OpenStudy (anonymous):

|dw:1447962893516:dw|

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!