Sunday, March 31, 2013

Lesson 25: Data Representation

( http://www.willamette.edu/~gorr/classes/cs130/lectures/data_rep.htm)

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.

THE RELATIONSHIP BETWEEN BITS,BYTES & CHARACTER
  • 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).
  • Byte addressable - each byte has its own address.
Text can be represented easily by assigning a unique numeric value for each symbol used in the text. For example, the widely used ASCII code (American Standard Code for Information Interchange) defines 128 different symbols (all the characters found on a standard keyboard, plus a few extra), and assigns to each a unique numeric code between 0 and 127.

In ASCII, an "A" is 65," B" is 66, "a" is 97, "b" is 98, and so forth. When you save a file as "plain text", it is stored using ASCII. ASCII format uses 1 byte per character 1 byte gives only 256 (128 standard and 128 non-standard) possible characters The code value for any character can be converted to base 2, so any written message made up of ASCII characters can be converted to a string of 0's and 1's.

Forum :

x86 = 32bit
x64 = 64bit

"As the x86 term became common after the introduction of the 80386, it usually implies a binary compatibility with the 32-bit instruction set of the 80386. This may sometimes be emphasized as x86-32 to distinguish it either from the original 16-bit x86-16 or from the newer 64-bit x86-64 (also called x64). Although most x86-processors used in new personal computers and servers have 64-bit capabilities, to avoid compatibility problems with older computers or systems, the term x86-64 is often used to denote 64-bit software, with the term x86 implying only 32-bit.


Go with the 32bit... It has more compatible drivers and support. Unless you are going to be doing 3D Rendering, Video Editing, or RAW Files in Photoshop, 64bit OSs aren't worth the trouble."


Summary:

Smallest data representation is called BIT.
8 BITS is equal to 1 BYTES
ASCII uses 7 BITS to represent each character.

No comments:

Post a Comment