Viewing a single comment thread. View all comments

aqhgfhsypytnpaiazh t1_je3081x wrote

Modern computers, in terms of data storage and processing, basically only operate on bytes (groups of 8 binary digits [bits]). So at least in most cases you can assume that 00001001 should be treated as a single value.

Beyond that, it's really up to the software interacting with that data to determine how to process it. This is where file formats come into play. The file format is a specification that clearly defines how to interpret the data in a file. So it will tell you what each byte in a file means.

Sometimes the rules are very strict, like a format will say "Every byte of the file represents a character of the alphabet, here's an ANSI table that maps binary numbers to characters". Or it might be less rigid, like "The first section of the audio file is free text ANSI metadata, which ends when the null byte (00000000) is encountered. The next section..."

Without some context as to what the data represents, it's meaningless. Often this can be conveyed by following the conventions for file extensions - the part of the file name after the last dot (eg .txt is universally recognised as text data encoded with the ANSI or Unicode standards). Often there is also a specific pattern of data at the very beginning of the file (a magic number) that indicates what type of file it is. The file is stored in a file system, which is a particular arrangement of data on a storage device following file system standards. Programs are stored using standard data formats built into the operating system, which in turn send a series of electrical signals to the CPU and other processors following a standard instruction set. It's standards all the way down.

Binary data is ultimately just a series of binary digits - an abstract representation of on/off electrical signals - that the program (by way of the programmer and/or user) has to figure out what to do with. If your friend came to you and blurted out "Eleven! Seventy four! Two! Five thousand, nine hundred and sixty six!" it's not going to mean anything without context.

1