Computers are machines that do stuff with information. They let you view, listen, create, and edit information in documents, images, videos, sound, spreadsheets, and databases. They let you play games in simulated worlds that don’t really exist except as information inside the computer’s memory and displayed on the screen. They let you compute and calculate with numerical information; they let you send and receive information over networks. Fundamental to all of this is that the computer has to represent that information in some way inside the computer’s memory, as well as storing it on disk or sending it over a network.
To make computers easier to build and keep them reliable, everything is represented using just two values. You may have seen these two values represented as 0 and 1, but on a computer, they are represented by anything that can be in two states. For example, in memory, a low or high voltage is used to store each 0 or 1. On a magnetic disk, it's stored with magnetism (whether a tiny spot on the disk is magnetized north or south).
This chapter will examine how data is stored on computers, be it text, images, colors, etc.