At the end of this lesson-
- You will be able to explain the concept of code.
- You will be able to explain BCD code.
- You will be able to explain alphanumeric code (EBCDIC, ASCII, Unicode).
Go for Bangla Version
In the computer system, digits, numbers, letters or special symbols are represented by a specific group of binary bits. This group is also called as binary code. The binary code is represented by the number as well as alphanumeric letter.
Advantages of Binary Code
Following is the list of advantages that binary code offers.
- Binary codes are suitable for the computer applications.
- Binary codes are suitable for the digital communications.
- Binary codes make the analysis and designing of digital circuits if we use the binary codes.
- Since only 0 & 1 are being used, implementation becomes easy.
Different types of code:
- BCD code
- Alphanumeric Code
- ASCII
- EBCDIC
- Unicode
Binary Coded Decimal (BCD):
In this code each decimal digit is represented by a 4-bit binary number. BCD is a way to express each of the decimal digits with a binary code. In the BCD, with four bits we can represent sixteen numbers (0000 to 1111). But in BCD code only first ten of these are used (0000 to 1001). The remaining six code combinations i.e. 1010 to 1111 are invalid in BCD.
Advantages of BCD
- It is very similar to decimal system.
- We need to remember binary equivalent of decimal numbers 0 to 9 only.
Disadvantages of BCD
- The addition and subtraction of BCD have different rules.
- The BCD arithmetic is little more complicated.
- BCD needs more number of bits than binary to represent the decimal number. So BCD is less efficient than binary.
Different Types of BCD
- BCD 8421(NBCD– Natural Binary Coded Decimal)
- BCD 7421
- BCD 5421
- BCD 2421
- Excess-3
The following table shows different BCD code of 0-9:
Example: Convert (592)10 into BCD code.
So, (592)10 = (010110010010)BCD
- Convert (807)10 into BCD code.
Alphanumeric codes:
The alphanumeric codes are the codes that represent numbers and alphabetic characters. Mostly such codes also represent other characters such as symbol and various instructions necessary for conveying information. An alphanumeric code should at least represent 26 alphabets with capital and small letters, numbers from 0 to 9, punctuation marks and other symbols. The following three alphanumeric codes are very commonly used for the data representation.
- EBCDIC- Extended Binary Coded Decimal Interchange Code.
- ASCII- American Standard Code for Information Interchange.
- Unicode- Universal Code
EBCDIC:
Extended binary coded decimal interchange code (EBCDIC) is an 8-bit binary code for numeric and alphanumeric characters. It was developed and used by IBM. It is a coding representation in which symbols, letters and numbers are presented in binary language.
ASCII:
ASCII is the acronym for the American Standard Code for Information Interchange. Most computers use ASCII codes to represent text, which makes it possible to transfer data from one computer to another. ANSI(American National Standard Institute) invented this code. ASCII two types-
- ASCII-7
- ASCII-8
ASCII-7: It is a code for representing 128 English characters as numbers, with each letter assigned a number from 0 to 127. For example, the ASCII code for uppercase M is 77.
ASCII-8: It is a code for representing 256 English characters as numbers.
Unicode:
A standard for representing characters as integers. Unlike ASCII, which uses 7 or 8 bits for each character, Unicode uses 16 bits, which means that it can represent more than 65,000 unique characters. This is a bit of overkill for English and Western-European languages, but it is necessary for some other languages, such as Greek, Chinese and Japanese. Many analysts believe that as the software industry becomes increasingly global, Unicode will eventually supplant ASCII as the standard character coding format.
Lesson Evaluation-
Knowledge Based Questions:
a. What is code?
a. What is BCD code?
a. What is ASCII code?
a. What is EBCDIC code?
a. What is Unicode?
a. What is alphanumeric code?
Comprehension Based Questions:
b. Which one of the equivalent BCD code and binary numbers of (15)10 takes bit more? Explain.
b. “BCD code is not a number system” -Explain.
b. Explain the mostly used alphanumeric code before discovering Unicode.
b. Unicode is a blessing for all the people speaking in different languages in computer system.- Explain.
b. Explain the code which makes the computer understand all the languages.
b. Unicode is suitable for all languages in computer system.-Explain.
Creative Questions:
Multiple Choice Questions:
1. Which one is 8-bit code?
i. ASCII ii. EBCDIC iii. BCD code
Which one is correct?
a) i & ii b) i & iii c) ii & iii d) i, ii & iii
2. Which type of code is used to include Bangla language in computer?
a) BCD b) ASCII c) EBCDIC d) Unicode
3. All English letters can be included in micro computer with-
i. ASCII ii. EBCDIC iii. Unicode
Which one is correct?
a) i & ii b) i & iii c) ii & iii d) i, ii & iii
4. How many bits are in ASCII?
a) 4 b) 8 c) 12 d) 16
5. How many bits are in Unicode?
a) 4 b) 8 c) 12 d) 16
6. How many bits are in EBCDIC?
a) 4 b) 8 c) 12 d) 16
7. Full form of BCD is –
a) Binary Coded Decimal b) Bar Coded Decimal
c) Best Coded Decimal d) Binary Compact Disc
8. How many bits are in BCD?
a) 4 b) 8 c) 12 d) 16
9. Which one is the BCD code of (395)10 ?
a) (001110010101)BCD b) (001110110101)BCD
c) (011110010101)BCD d) (001110010111)BCD
10. How many characters can be codded uniquely in Unicode?
a) 65533 b) 65634 c) 65535 d) 65536
11. How many characters can be codded uniquely in ASCII-8?
a) 128 b) 256 c) 512 d) 65536
12. Which one is equivalent BCD code of (275)10?
a) 010101110101 b) 001001110101
c) 001001100101 d) 001001110011
Written by,
- Mizanur Rahman (Mizan)
- Lecturer in ICT, Shaheed Bir Uttam Lt. Anwar Girls’ College , Dhaka Cantonment
- Founder & Author at www.edupointbd.com
- Software Engineer at mands IT
- Former Lecturer in ICT, Cambrian College, Dhaka
- Contact: 01724351470
This information is very important for me