Sunteți pe pagina 1din 6

INTRODUCTION TO COMPUTER

LECTURE 07

TRANSFORMING DATA INTO INFORMATION

Although the words data and information are often used interchangeably,
there is strict sense consists, data consists of the raw numbers that computer
organize to produce information. Data is meaningless until it is not converted
into information after some processing.
HOW COMPUTER REPRESENT DATA

For computer, every thing like numbers, letters, punctuation marks,


sounds, pictures and even computer’s own instruction are numbers. It is
wonderful for us when we see some word or sentence on screen but actually
computer is using some numeric code behind this. For example consider a word
“Here”
Then computer uses numeric codes for this word are
H 01001000
e 01100101
r 01110010
e 01100101
In a computer, however all data must be reduced to electrical switches. A switch
has only two possible states ‘ON’ and ‘OFF’ so it has only two numeric symbols 0
stands for ‘OFF’ and 1 stand for ‘ON’. Because there are only two symbols
therefore computer is said to function in base 2which is also known as binary
system. (bi means two in Latin)
BITS AND BYTES

Each switch in computer terminology whether ON or OFF, is called bit.


The term bit is castration of binary digit. A bit is smallest possible unit of data to
represent any meaningful information. Computer needs group of bits.
After bit the next larger unit of data is the byte, which is group of 8 bits.
With one byte computer can represent up to 256 different values because it is
possible to count from 0 to 255 with 8 binary digits.

COMPUTER CODES
Numeric data is not the only form of data that is to be handled by a computer.
We often require to process alphanumeric data also. An alphanumeric data is
string of symbols. Where a symbol may be one of the letters A,B,C,……., Z or one
of the digits 0,1,2,3,4,….,9 or a special character such as +,-,*,/,(),=,space etc. An
alphabetic data consists of the only letters A,B,C,…..,Z and the blank character.
Similarly numeric data consists of only numbers 0,1,2,3,………, 9. However, any
data must be represented internally by the bits 0 & 1.

1
INTRODUCTION TO COMPUTER
LECTURE 07

BCD CODE

The binary coded Decimal (BCD) code is one of the early memory codes. It is
based on the idea of converting each digit of decimal number into its binary
equaling rather than converting the entire decimal value into a pure binary form. Since
8 and 9 require 4 bits all decimal digits are represented in BCD by 4 bits.
For example 4210 is equal to (101010)2 in a pure binary form.
Converting 4210 into BCD, however produces the following result.
4210=0100 0010
4 2
Or 01000010 in BCD
Decimal Digit BCD Equivalent
0 0000
1 0001
2 0010
3 0011
4 0100
5 0101
6 0110
7 0111
8 1000
9 1001
BCD Equivalent of Decimal Digit

(1011,1100,1101,1110,1111) have decimal values from 10 to 15. These


arrangements are not used in BCD coding that is 1010 does not represent 1010 in
BCD instead.
1010 = 0001 0000
Or 00010000 in BCD
Similarly 1510= 0001 0101
Or 00010101 in BCD

EBCDIC(EXTENDED BINARY CODE DECIMAL INTERCHANGE


CODE)

The major problem with BCD code is that only 64(26) different characters can be
represented in it. This is not sufficient for providing decimal numbers (10) lower
case letters (26) capital letters (26) and fairly large numbers of others special
characters.
Hence the BCD code was extended from a 6-bit code to 8-bit code. The added 2
bits are used as additional zone bits expending the zone to 4 bits. The resulting
code is called the extended binary code decimal interchange code (EBCDIC). In
this code it is possible to represent 256 (28) different characters instead of 64(26).

2
INTRODUCTION TO COMPUTER
LECTURE 07

Because ECBDIC is an 8 bits code, it can be easily divided into two 4-bit
groups. Each of these 4 bits group can be represented by 1 hexadecimal number.

Character EBCDIC Code Hexadecimal Equivalent


Zone Digit
A 1100 0001 C1
B 1100 0010 C2
C 1100 0011 C3
D 1100 0100 C4
E 1100 0101 C5
F 1100 0110 C6
G 1100 0111 C7
H 1100 1000 C8
I 1100 1001 C9

J 1101 0001 D1
K 1101 0010 D2
L 1101 0011 D3
M 1101 0100 D4
N 1101 0101 D5
O 1101 0110 D6
P 1101 0111 D7
Q 1101 1000 D8
R 1101 1001 D9

S 1110 0010 E2
T 1110 0011 E3
U 1110 0100 E4
V 1110 0101 E5
W 1110 0110 E6
X 1110 0111 E7
Y 1110 1000 E8
Z 1110 1001 E9

0 1111 0000 F0
1 1111 0001 F1
2 1111 0010 F2
3 1111 0011 F3
4 1111 0100 F4
5 1111 0101 F5
6 1111 0110 F6
7 1111 0111 F7
8 1111 1000 F8
9 1111 1001 F9

3
INTRODUCTION TO COMPUTER
LECTURE 07

ASCII (AMERICAN STANDARD CODE FOR INFORMATION


INTERCHANGE)

Another Computer Code that is very widely used is the American Standard
Code for Information Interchange (ASCII). ASCII has been adopted by several
American Computer manufactures as their computers internal code.
ASCII is of two types. ASCII-7 and ASCII-8. ASCII-7 is a 7 bits code that allows
128(27) different characters, The first 3 bits are used as Zone bits and the least 4
bits indicate the digit. Microcomputer using 8-bits or byte use the 7 bit ASCII by
leaving the left most first bit of each byte as a zero.
ASCII-8 is an extended version of ASCII-7. It is an 8 bits code that allows 256(28)
different characters rather than 128. The additional bit is added to the zone bits.
Other than the zone bits ASCII-7 and ASCII-8 are identical.

Character ASCII-7 Code Hexadecimal Equivalent


Zone Digit
0 011 0000 30
1 011 0001 31
2 011 0010 32
3 011 0011 33
4 011 0100 34
5 011 0101 35
6 011 0110 36
7 011 0111 37
8 011 1000 38
9 011 1001 39

A 100 0001 41
B 100 0010 42
C 100 0011 43
D 100 0100 44
E 100 1001 45
F 100 0110 46
G 100 0111 47
H 100 1000 48
I 100 1001 49
J 100 1010 4A
K 100 1011 4B
L 100 1100 4C
M 100 1101 4D
N 100 1110 4E
O 100 1111 4F

P 101 0000 50
Q 101 0001 51

4
INTRODUCTION TO COMPUTER
LECTURE 07

R 101 0010 52
S 101 0011 53
T 101 0100 54
U 101 0101 55
V 101 0110 56
W 101 0111 57
X 101 1000 58
Y 101 1001 59
Z 101 1010 5A

Table for ASCII-7

Character ASCII-8 Code Hexadecimal Equivalent


Zone Digit
0 0101 0000 50
1 0101 0001 51
2 0101 0010 52
3 0101 0011 53
4 0101 0100 54
5 0101 0101 55
6 0101 0110 56
7 0101 0111 57
8 0101 1000 58
9 0101 1001 59

A 1010 0001 A1
B 1010 0010 A2
C 1010 0011 A3
D 1010 0100 A4
E 1010 0101 A5
F 1010 0110 A6
G 1010 0111 A7
H 1010 1000 A8
I 1010 1001 A9
J 1010 1010 AA
K 1010 1011 AB
L 1010 1100 AC
M 1010 1101 AD
N 1010 1110 AE
O 1010 1111 AF

P 1011 0000 B0
Q 1011 0001 B1
R 1011 0010 B2
S 1011 0011 B3

5
INTRODUCTION TO COMPUTER
LECTURE 07

T 1011 0100 B4
U 1011 0101 B5
V 1011 0110 B6
W 1011 0111 B7
X 1011 1000 B8
Y 1011 1001 B9
Z 1011 1010 BA

Table for ASCII-8

S-ar putea să vă placă și