I was thinking to the fact that everything in computer is stored as a sequence of 1s and 0s. So the same thing should be true for any files and software stored in the hard drives. But is it possible to see the sequence of 1 and 0 for a specific file? For example, suppose that in a folder, there are files named "myfile.docx", "myfile.iso", "myfile.dll", "myfile.rar" ,..... how can I see what sequences of 1 and 0 each of these files are made of?
thanks in advance.
You can open the file in a hex editor, which might display something similar to this:
What you're looking at is a hexadecimal representation of the bytes in the file, which is the binary data. Some editors may have an option to display it as binary 0's and 1's. Of course there would be a lot more to look at in that case. Failing that, you can infer the binary data from the hexadecimal representations. Or even write a program where you paste in the hex values and it calculates the binary representation for you.
You could also write a program in a variety of languages which would automate this for you. For example, if you read a file as a byte[]
in something like C# then you can loop through it, byte by byte, outputting "binary" to the page for those bytes. (Some math on a helper method can convert a numeric value, which is all a byte is, to a series of 0's and 1's to print to the screen.) I imagine most, if not all, reasonable programming languages will have similar operations available.