### Data Representation

Data Representation refers to the methods used internally to represent information stored in a computer. Computers store lots of different types of information:
• numbers
• text
• graphics of many varieties (stills, video, animation)
• sound
• At least, these all seem different to us. However, ALL types of information stored in a computer are stored internally in the same simple format: a sequence of 0's and 1's. How can a sequence of 0's and 1's represent things as diverse as your photograph, your favorite song, a recent movie, and your term paper?
It all depends on how we interpret the information. Computers use numeric codes to represent all the information they store. These codes are similar to those you may have used as a child to encrypt secret notes: let 1 stand for A, 2 stand for B, etc. With this code, any written message can be represented numerically. The codes used by computers are a bit more sophisticated, and they are based on the binary number system (base two) instead of the more familiar (for the moment, at least!) decimal system. Computers use a variety of different codes. Some are used for numbers, others for text, and still others for sound and graphics.
Memory Structure in Computer
• Memory consists of bits (0 or 1)
• a single bit can represent two pieces of information
• bytes (=8 bits)
• a single byte can represent 256 = 2x2x2x2x2x2x2x2 = 28 pieces of information
• words (=2,4, or 8 bytes)
• a 2 byte word can represent 2562 pieces of information (approximately 65 thousand).