Data Representation
Data Representation
ON/OFF
Computers only recognize 2 discrete state: ON and OFF because computers powered by
electricity which also has only 2 states: ON and OFF.
2 digits ( 1 and 0) can represent these 2 states.
0 = OFF (no electronic charge)
1 = ON (has electronic charge)
Refer figure 4-14 pg 4.14
BINARY SYSTEM
Computers use BINARY SYSTEM to represent data.
BINARY SYSTEM : Is a number system that has just 2 unique digits, 0 and 1 which is called
bits.
Refer figure 4-14 pg 4.14
BIT/BYTE/WORDS
BIT is short for binary digit and is the smallest unit of data the computer can represent. A bit
is not very informative.
8 bits form a BYTE.
A BYTE is informative because it provides enough combinations of 0s and 1s to represent
256 characters which include numbers, symbol, letters etc.
Refer figure 4-14, 4-15, 4-16 pg 4.14
CODING SCHEMES
The combinations of 0s and 1s that represent characters are defined by patterns called a
coding scheme.
2 popular coding schemes are ASCII (American Standard Code for Information Interchange)
and EBCDIC (Extended Binary Coded Decimal Interchange Code)
ASCII usually used by PC and midrange server
EBCDIC usually used by mainframe.
Each character that is represented is stored in 1 byte of memory.
Refer figure 4-16 pg 4.14
PARITY BIT
Extra bit for each byte that is used for error checking
Errors occur because of voltage fluctuation, static electricity and memory failure.
Computers are either even or odd parity machine.
Computers with odd parity, the total number of ON bits in the byte must be an odd number.
Computers with even parity, the total of ON bits must be even number.
Computer check parity each time it uses a memory location.
Exercise