You are on page 1of 24

DEPARTMENT OF TECHNICAL EDUCATION

ANDHRA PRADESH
Name : Swathi K.N
Designation : Lecturer
Branch : Computer Engineering
Institute : Kamala Nehru Polytechnic For Woman
Year : I year
Subject : Computer Fundamentals and Office
Automation
Subject Code : CM-105/1
Topic : Fundamentals Of Computers
Duration : 100 minutes
Sub. Topic : Computer codes
ASCII Codes, EBCDIC Codes.
Teaching Aids : PPT, Images, Animations

CM105.24TO25 1
Objective

On completion of this period, you would be able


to know:

 ASCII Codes

 EBCDIC Codes

CM105.24TO25 2
Recap

 Conversion of binary number to hexa decimal.

 Conversion of hexa decimal number to binary

CM105.24TO25 3
Prerequisite

 ASCII Codes

 EBCDIC Codes

CM105.24TO25 4
COMPUTER CODES

CM105.24TO25 5
Why codes are used?

• Codes are used to represent the letters and


special characters (such as +,-,*,$,&) in terms of
0’s and 1’s.

CM105.24TO25 6
Character Sets

BCD - Binary Coded Decimal

ASCII - American Standard Code for


Information Interchange

EBCDIC - Extended Binary Coded Decimal


Interchange Code

CM105.24TO25 7
BCD CODE

CM105.24TO25 8
BCD (Binary Coded Decimal)

 BCD code is the simplest code to represent


decimal numbers.

 In BCD code a decimal number is represented


by four binary bits.

 For example, 3 is represented as 0011.

CM105.24TO25 9
BCD Code (Binary Coded Decimal) contd:
 If a decimal number consists of two or more than
two digits, each digit is individually represented
by its four bit binary equivalent.

 For example, 56 is represented by 0101 0110.

CM105.24TO25 10
Standard BCD codes
Decimal number Standard BCD codes
0 0000
1 0001
2 0010
3 0011
4 0100
5 0101
6 0110
7 0111
8 1000
9 1001
10 00010000
11 00010001
12 00010010
13 00010011
56 01010110
CM105.24TO25 11
ASCII CODE

CM105.24TO25 12
ASCII

 ASCII is pronounced as “ask-ee”.

 It stands for American Standard Code For


Information Interchange

 It is widely used in micro computers.

CM105.24TO25 13
ASCII (contd)

Micro computers using 8-bit word length use

7-bit to represent the basic code.

The 8th bit is used for parity or it may be


permanently 0 or 1.

CM105.24TO25 14
ASCII CODE (contd) :
 In this code a character is represented by two
parts.

 They are a zone portion and numeric portion

 Each digit has 0101 as the zone portion and its


binary representation as the numeric portion.

 Alphabetical characters are divided into two


groups having 1010 or 1011 as the zone portion.
CM105.24TO25 15
ASCII Codes for characters
Alphabetic ASCII-8 HEX Numeric ASCII-8 HEX
A 10100011 A1 0 01010000 50
B 10100010 A2 1 01010001 51
C 10100011 A3 2 01010010 52
D 10100100 A4 3 01010011 53
E 10100101 A5 4 01010100 54
F 10100110 A6 5 01010101 55
G
10100111 A7 6 01010110 56
H
10101000 A8 7 01010111 57
I
10101001 A9 8 01011000 58
J
10101010 AA 9 01011001 59
K
L 10101011 AB
M 10101100 AC
N 10101101 AD
O 10101110 AE
P 10101111 AF
Q 10100000 B0
10110001 B1CM105.24TO25 16
EBCDIC CODE

CM105.24TO25 17
EBCDIC CODE:

 It is pronounced as “ebb-see-dick”.

 It is Extended Binary Coded decimal


Interchange Code.

 It is standard code in large computers.

 It is an 8-bit code without parity.

CM105.24TO25 18
EBCDIC CODE (contd):

 With 8-bits 256 characters can be coded

 Each digit has 1111 as the zone and its binary


representation as numeric portion.

 The alphabetic characters are divided into three


groups having 1100,1101,1110 as the zone
portion.

CM105.24TO25 19
Special Contd..
EBCDIC
characters Alphabetic EBCDIC
< 01001011 A 11000001
( 01001100 B 11000010
+ 01001101 C 11000011
/ 01001110 D 11000100
& 01010000 E 11000101
: 01111011 F 11000110
# 01111011 G 11000111
@ 01111100 H 11001000
‘ 01111101 I 11001001
= 01111110 J 11010001
“ 01111111 K 11010010
, 01101011 L 11010011
% 01101100 M 11010100
- 01101101 N 11010101
> 01101110 O 11010110
P 11010111
CM105.24TO25 20
Summary

In this class, we have learnt about

 BCD Code

 ASCII Code

 EBCDIC Code

CM105.24TO25 21
Frequently Asked Questions

1. Give the full forms to the following


1. BCD 2. ASCII 3. EBCDIC

2. What is the purpose of ASCII code ?

CM105.24TO25 22
Quiz

1. What is the position of character ‘A’ in ASCII?


a. 48
b. 65
c. 97
d. 32
ANSWER : b

CM105.24TO25 23
Quiz (Contd...)

1. What is the position of character ‘0’ in ASCII?


a. 48
b. 65
c. 97
d. 32
ANSWER : a

CM105.24TO25 24

You might also like