2Lecture.DataRep

advertisement
Lecture Notes – CGS1570 - KBrown, Sum03
DATA REPRESENTATION
Computers are electronic – need to be able to discern discrete signals of a predefined type (size,
intensity, nature)
Computers are digital – have discrete elements that can be counted/divided into subsets of
discrete sizes
All commands, data, flags, interrupts must be discernable in an electronic environment.
Best method is the simplest – ON / OFF - discrete and unambiguous
Two-state system = binary-state system
– two conditions can be implemented in many ways:
electronic impulse (high/low), magnetic charge (positive/negative), presence or
absence of something (on/off)
BIT = binary digit = smallest discernable unit of representation (data)
BYTE = grouping of 8 binary digits = to form the basic unit of encoding in microcomputers
- can represent a number or part of a number, character, or instruction
 Numbers: binary number system, base 2, for calculations
 Codes: characters, digits, symbols, special characters
o ASCII – American Standard Code for Information Interchange
 each is an 8-bit representation of 1 & 0 (uses 128 patterns: 52 alpha,
10 digits, +special characters/punctuation/symbols/codes)
 max - 256 unique ordered patterns of 8 bits
o Unicode – 16-bit (double byte) character set; based on ASCII code
 256 * 256 = 65,536 patterns possible
 international standard for multi-lingual computing
 Instructions: commands, flags, interrupts
BINARY NUMBER SYSTEM – (see p 54-58, Computer Confluence)
1024 512 256 128 64 32 16 8 4 2 1
210
29
28
27
26 25 24 23 22 21 20
0
1
0
0
0 1 0 0 0 0 1
example: 01000100001 base2 = 29 + 25 + 20 = (512 + 32 + 1) = 545 base 10
1 binary digit = 1 bit
= 1b
8 bits
= 1 byte
= 1B
1,024 bits
= 1 Kilobit = 1Kb
1,024 bytes = 1 Kilobyte = 1KB
1,024 KB
= 1 Megabyte = 1MB
1,024 MB
= 1 Gigabyte = 1GB
1,024 GB
= 1 Terabyte = 1TB
Important distinction:
Data = raw data, has no value by itself
Information = data organized in a meaningful way
533569962
Download