What are computer codes, Types of computer codes, BCD, EBCDIC, ASCII, Gray code, Excess-3 code, Unicode. Conversion of a given decimal digit in to its equivalent BCD code, ASCII Conversions, Gray code conversions, Types of Unicode, EBCDIC code.
1. DEPARTMENT OF COMPUTER SCIENCE &
ENGG.
Presented By: Praveen Tabbannavar
Lecturer/CSE
B.L.D.E.A’S S.S.M. POLYTECHNIC
VIJAYAPUR
B.L.D.E.A’S S.S.M
POLYTECHNIC VIJAYAPUR
Introduction to Number System
2. Computer Codes
Digital computers make use of specialized computer codes or
digital codes in order to represent binary numbers, decimal
numbers, English alphabet, special symbols and
instructions.
There are various types of computer codes:
1. BCD
2. EBCDIC
3. ASCII code
4. Gray code
5. Excess-3 code
6. Unicode
3. BCD
• BCD stands for Binary Coded Decimal. This code allows
us to represent decimal digits up to 0 to 9 using a 4-bit
binary code. It can also be referred to as 8421 code. BCD
is simple to represent. It is a special code which represents
single decimal digit.
• This code provides an interface to binary/digital computer
systems. It is also used in digital devices like 7-segment
display, digital clocks, thermometers etc.
• There can be only 10 BCD codes.
5. EBCDIC
• EBCDIC stands for Extended Binary Coded Decimal
Interchange Code.
• IBM invented this code to extend the binary coded
decimal. This code makes use of 8 bits and represents 28=
256 characters. It is an 8 bit code.
• It is used in IBM mainframe computers and mid range
computer systems.
6. ASCII Code
• ASCII Stands for American Standard Code for Information
Interchange. As the computer understands only numerical
values, So all characters must have numerical equivalent
called alphanumeric code.
• ASCII is the international standard for representing
characters, numbers and symbols. The idea is to represent
numbers as text.
• ASCII is the most common character encoding format for
text data in computers. This standard is used to represent
27 = 128 characters. It is an 7 bit code.
7. ASCII Code
• A-Z is represented from 65-90, a-z is represented from 97-
122.
• Ex- ‘Cs’ is represented as
Letter Decimal Binary
C 67 1000011
s 115 1110011
8. Gray Code
• Gray code is invented by a scientist named Frank Gray. It
is a non weighted code which means that weights are not
assigned to bits.
• It is also called as unit distance code because it exhibits a
single bit change from one gray code bit pattern to the next
code bit.
• It is not an arithmetic code. It is also called as cyclic code
or reflective code.
• Gray code is usually helpful in shaft position encoders. It
reduces the power of switching.
• Gray code is usually helpful in shaft position encoders. It
reduces the power of switching.
• This code reduces the number of errors.
10. Excess-3 code
• This is also called as XS-3 code. It is unweighted 4 bit
code used to express decimal numbers.
• Excess-3 code can be obtained by adding 3 to each decimal
digit in a decimal number and converting the sum to a 4 bit
binary number.
• This code exhibit self-complementing property which is
useful in arithmetic operations.
• Ex- 5 0101
+ 3 0011
= 8 1000
12. Unicode
• The different computer coding schemes don’t have enough
number of bits to represent all characters and language
specific symbols of multiple languages. Therefore,
Unicode standard as designed to overcome this problem.
• Unicode is a universal character encoding standard that
defines binary codes in bytes, words and double words for
characters used in different languages.
• It provides an efficient way to encode Multilanguage plain
text.
13. Unicode
• Unicode standard assigns a distinct number for each and
every character. It also assigns codes for special characters,
mathematical & technical symbols.
• Special feature of Unicode is that it encodes up to 1 million
characters (106) with unique codes.
• Unicode has 3 types of encoding formats.
UTF-8
UTF-16
UTF-32