All computer data is stored and represented as binary . Binary is a number system that only uses the digits 1 and 0.
Think of it as switches - they can either be on which is shown as a 1, or off, which is shown as a 0. Look at a power switch and you may well see a 1 and a 0, or a symbol that includes both.
In a computer these "switches" are transistors rather than actual switches. A transistor can take a small current in one part and use it to create a large current in another. This can show that it is off (0) - no large current, or on (1) - large current. The amount of current is monitored so the transistors value is known. A computer chip has hundreds of millions of transistors (or billions)
There are three main reasons that a binary system is used:
1) Computers work using electrical voltage, however voltage levels fluctuate (change) so we can't say this voltage is used for the number 1, and this voltage represents the number 2 and this one - 3.
2) To use our normal number system (1,2,3,4,5,6,7,8,9,0) would need over a hundred rules to be wired into the computer, binary requires just four such rules to be able to do calculations.
3) Binary is the best system for storing information on optical and magnetic media.
One of the main problems with binary is it is hard for humans to work with quickly. To help with that Hexadecimal is also used - click here to learn more on hex.
Transistors - stand alone component
The transistor picture above would have been used on some of the earlier large scale computers. In Modern computers the transistors are part of the integrated ciruit that we call a microchip. Their size is measured in Nanometers. 1 nanometer is 1millionth of 1millimeter, or to put that another way, there are 10 million Nanometers in 1 centimeter. A modern transistor is around 20 to 32 nanometers. It is extremely small.