Information in a File
Since we are dealing with digital computers,
the information in the computer system is represented in binary form.
Remember the four advantages of binary
(from chapter 2):
- Simple; easy to build.
- Unambiguous signals (hence noise immunity).
- Flawless copies can be made.
- Anything that can be represented in symbols
can be represented with patterns of bits.
The last advantage means that a file can contain any type of information that can be
represented with symbols, such as:
- numbers (integers and floating point types of any size)
- characters (text files)
- characters with format information (word processor files)
- images
- audio
- program source files ( yourProgram.java, cprogram.c )
- bytecodes ( yourProgram.class )
- machine language ( cprogram.exe )
- many other types