Jump:
Ordnance Survey – Great Britain's national mapping agency
In its most elemental form digital data is composed of bits: indicators that have a state of either 0 or 1. Information can be encoded in these binary characters. The way in which this code works varies between systems.
One of the most universal conventions is the organisation into sets of eight bits, called words or bytes. A byte therefore has a sequence of 0s and 1s in any of 256 combinations – be it 00000000, 11111111 or 01101000. These are essentially the same as the set of numbers in base 2 equating to the decimals 0 to 255. Streams of bytes can be used to encode all kinds of information – the power of the computer comes from the volume in which these streams can be stored, and the speed with which they can be transmitted and manipulated.

The file is a collection of bytes that make up a logical unit of information. In describing types of file, the terms ASCII and binary are commonly encountered. ASCII (American Standard Code for Information Interchange) files adopt a convention in which each eight-bit sequence corresponds to one of a set of common characters. ASCII files are very simple and can be created using basic text editing tools like Notepad. A binary file encodes information in the bit sequence. You can only interpret the information contained in it by knowing the code for that particular file. If a file is described as binary it means that information is encoded in the bit sequence in some way or another – only by knowing the code for that particular file can you interpret the information, be it text, graphics, mathematical formulæ, video or whatever. This is how different software products use different types of file, identified with their different file extensions (for example, .doc, .tiff, .java and so on). In a sense, all files are binary, but in common usage the term refers to a file that does not conform to the ASCII convention. Try this useful link for more information about ASCII codes.
More information about ASCII codes
The data used in GIS is no different. It is also organised into files with different software products using their own particular file types, binary coding and file extensions. The earlier chapters of The GIS files described how geographical data comes in many different forms. This fact is reflected in the files that are used to store this data. The range of different file types used in GIS can be very confusing! Word processing packages have a simple use of file types. With Microsoft® Word you store each document in a single .doc file. GIS can be much more complex. With geometry, attributes, indexes, topology, image and history information to store, most systems use more than one single file (with multiple file types) to encode a particular data layer. Chapter 6.1 attempts to put these file formats into perspective.