You are on page 1of 16

CHAPTER THREE

NUMBER SYSTEMS

1. Introduction

Inside a computer system, data is stored in a format that cannot be easily read by human
beings. This is the reason why input and output (I/O) interfaces are required. Every
computer stores numbers, letters, and other special characters in a coded form. Before
going into the details of these codes, it is essential to have a basic understanding of the
number system. So the goal of this chapter is to familiarize you with the basic
fundamentals of number system. It also introduces some of the commonly used number
systems by computer professionals and the relationship between them.

What is a Number System?

Definition:

A number system is a set of codes which are given to distinct values or quantities.
Using those assigned codes (symbols), we will 'count'. The symbols are called digits.
Generally, a number system is characterized by:

a. Its base (radix)

Base or radix of a number system is the number of digits that are included in the number
system.

b. Its digits

Example 1: A decimal number system is the system that we always use in our day-
To-day activities. As you know this number system contains0,1,2,3,4,5,6,7,8,9 and as a
result its base (number of digits) is 10. Why do we deal with number systems? The
reason is just to understand the operations of computers. Computer operations can be
divided in to two as Arithmetic and Logical. Arithmetic operations are operations
involving arithmetic calculations like addition, subtraction, multiplication and division.
Logical operations are operations that do not directly relate with numbers. They consist
of comparisons. A very simple example of logical expression can be 2>3, Yes/No'. But
whatever the type of operation is, computers understand only 0 and 1.

Non- positional number systems

In early days, human beings counted on fingers. When ten fingers were not adequate,
stones, or sticks were used to indicate values. This method of counting uses an additive
approach or the non – positional number system. In this system, we have symbols such as
I for 1, II for 2, III for 3, IIII for 4, IIIII for 5, etc. Each symbol represents the same value
regardless of its position in the number and the symbols are simply added to find out the

1
value of a particular number. Since it is very difficult to perform arithmetic with such a
number system, positional number systems were developed as the centuries passed.

Positional number systems

In a positional number system, there are only a few symbols called digits, and these
symbols represent different values depending on the position they occupy in the number.
The value of each digit in such a number is determined by three considerations:

1. The digit itself,


2. The position of the digit in the number, and
3. The base of the number system (where base is defined as the total number of
digits available in the number system).

The number system that we use in our day – to – day life is called the Decimal number
system. In this system, the base is equal to 10 because there are altogether ten symbols or
digits (0,1,2,3,4,5,6,7,8,9) used in this system. You know that in the decimal system, the
successive positions to the left of the decimal point represent units, tens, hundreds,
thousands, etc. But you may not have given much attention to the fact that each position
represents a specific power of the base (10). For example, the decimal number 2586
(written as 258610) consists of the digit 6 in the units’ position, 8 in the tens position, 5 in
the hundreds position, and 2 in the thousands position and its value can be written as:

(2 x 1000) + (5 x 100) + (8 x 10) + (6 x1)


or 2000 + 500 + 80 + 6
or 2586

It may also be observed that the same digit signifies different values depending on the
position it occupies in the number. For example,

In 258610 the digit 6 signifies 6 x 100 = 6


In 256810 the digit 6 signifies 6 x 101 = 60
In 265810 the digit 6 signifies 6 x 102 = 600
In 628510 the digit 6 signifies 6 x 103 = 6000

Thus any number can be represented by using the available digits and arranging them in
various positions. The principles that apply to the decimal system apply in any other
positional number system. It is important only to keep track of the base of the number
system in which we are working.

There are two characteristics of all number systems that are suggested by the value of the
base. In all number systems, the value of the base determines the total number of
different symbols or digits available in the number system. The first of these choices is
always zero. The second characteristic is that the maximum value of a single digit is
always equal to one less than the value of the base.

2
2. Commonly Used Number Systems

The most commonly used number systems are the following:

A. The Decimal Number System


The decimal number system is a system containing 10 digits 0, 1, 2..., 9. That is our
familiar number system. The base or radix of the decimal number system is 10. The value
of each digit depends on its position in the number as describe below: The value of the
first digit of the number from the right side is first digit * 10 0 The value of the second
digit of the number from the right side is second digit * 10 1 The value of the third digit of
the number from the right side is third digit * 102 etc
Example: 2
The above example of the decimal number system (12) contains two digits 1 and 2. If
the digits are written separately, then the value of 1 is just one (single) and the value of 2
is two (pair). But as you can see when they are written together, the value of 1 is to mean
10 and the value of 2 is 2.
12= 10+2
This shows you every digit of a decimal number system has its own value (weight).
And the weight of a digit will depend on its position. To understand this, observe
the following example.
Example3: Compare the value of 4 in the following two numbers: 435 and 248.
435 = 400 + 30 + 5 = 4 X 102 + 3 x 101 + 5 x 100
248 = 200 + 40 + 8 = 2 X 102 + 4 x 101 + 8 x 100
The weight of 4 in 435 is 400 and in 248 is 40.
Generally, the weight of each digit in a decimal number is given by:

Weight (nth digit) = n th digit x (10) n-l


Where n=position of the digit
Base = given base of the number system
Actually 'n' should be counted starting from left and starting with 1 and continuing
with 2,3 etc to use the above formula.
But the best (shortest) way is to start with 0 instead of 1 when counting even if the
assigned numbers will not represent the real position of the digits since there is no
a 0 position.
Example: Find the weight of each digit in the following decimal number, 356789.
Solution: According to the formula given, the position of the digits will be assigned
as: 6 5 4 3 2 .l ------- Position
3 5 6 7 8 9 ----- Decimal number
Weight (1lst digit) = 1st digit X (10)1-1 =9xl0o =9xl=9
Weight (2nddigit) = 2nd digit x (10)2-1 = 8x 101 = 8 x 10 = 80
Weight (3rddigit) = 3rd digit (10)3-1 =7xl02 =7xl00=700
If the number is a fraction decimal number, then the weight of the digits after the
decimal point will be calculated as:
Where n: position
th
of the
th
digit after the decimal
-n
point when it is counted to
Weight (n digit) = n digit x (Base)
the right starting from the immediate digit after the decimal point
and With the value one(1).

3
Base: the given base of the number system
Example4: Find the weight of the digits after the decimal point of the following
Number: “0.125”
Solution:
-1 -2 -3 --- Position
0.12 5 -------- Decimal fraction
Weight (l st digit) = 1st digit X 10-1 = 1 x 1o-1 = 1o -1= 0.1
Weight (2nd digit) = 2nd digit X 10-2 = 2 x 1o-2 = 0.02
Number systems are basically of two types: non – positional and positional.

B. Binary number system

The binary number system is exactly like the decimal system except that the base is 2
instead of 10. We have only two symbols or digits (0 and 1) that can be used in this
number system. Note that the largest single digit is 1 (one less than the base). Again, each
position in a binary number represents a power of the base (2). As such, in this system,
the rightmost position in the units (20) position, the second position from the right is the
2’s (21) position and proceeding in this way we have 4’s (2 2) position, 8’s (23)
position,16’s (24) position, and so on. Thus, the decimal equivalent of the binary number
10101 (written as 101012) is

(1x24) + (0x23) + (1x22) + (0x21) + (1x20)


or 16 + 0 + 4 + 0 + 1
or 21
In order to be specific about which system we are referring to, it is common practice to
indicate the base as a subscript.
Thus we write:
101012 = 2110
“Binary digit” is often referred to by the common abbreviation bit. Thus, a “bit” in
computer terminology means either a 0 or a 1. A binary number consisting of n bits is
called an n-bit number. The following table lists all the 3-bit numbers along with their
decimal equivalent.

Binary Decimal Equivalent


000 0
001 1
010 2
011 3
100 4
101 5
110 6
111 7
Table 3-bit Numbers With Their Decimal Values.

Remember that we have only two digits, 0 and 1, in the binary system, and hence the
binary equivalent of the decimal number 2 has to be stated as 10 (read as one, zero).

4
Another important point to note is that with 3 bits (positions), only 8 (2 3) different
patterns of 0’s and 1’s are possible and from the table above it may be seen that a 3-bit
number can have one of the 8 values in the range 0 to 7. In fact, it can be shown that
decimal number in the range 0 to 2 n-1 can be represented in the binary form as an n-bit
number.

Every computers stored numbers, letters, and other special characters in binary form.
There are several occasions when computer professionals have to know the raw data
contained in a computer’s memory. A common way of looking at the contents of a
computer’s memory is to print out the memory contents on the line printer. This print out
is called a Memory dump. If memory dumps were to be printed using binary numbers, the
computer professionals would be confronted with many pages of 0s and 1s. Working with
these numbers would be very difficult and error prone.

Because of the quantity of printout that would be required in a memory dump of binary
digits and the lack of digit variety (0s and 1s only), two number systems, octal and
hexadecimal, are used as shortcut notation for binary.

C. Octal number system

In the octal number system the base is 8. So in this system there are only 8 symbols or
digits: 0,1,2,3,4,5,6, and 7 (8 and 9 do not exist in this system). Here also the largest
single digit is 7 (one less than the base). Again, each position in an octal number
represents a power of the base (8). Thus the decimal equivalent of the octal number 2057
(written as 20578) is:

(2x83) + (0x82) + (5x81) + (7x80)


or 1024 + 0 + 40 + 7
or 1071
So we have 20578 = 107110
Observe that since there are only 8 digits in the octal number system, so 3 bits (2 3 = 8) are
sufficient to represent any octal number in binary as shown in the above table.

D. Hexadecimal number system

The hexadecimal number system is one with a base of 16. The base of 16 suggests
choices of 16 single character digits or symbols. The first 10 digits are the digits of a
decimal system 0,1,2,3,4,5,6,7,8,9. The remaining six digits are denoted by A,B,C,D,E,F
representing the decimal values 10,11,12,13,14,15 respectively. In the hexadecimal
number system, therefore, the letters A through F are number digits. The number A has a
decimal equivalent value of 10 and the hexadecimal F has a decimal equivalent value of
15. Thus, largest single digit is F or 15 (one less than the base). Again, each position in a
hexadecimal system represents a power of the base (16). Thus, the decimal equivalent of
the hexadecimal number 1AF (written as 1AF16) is:

(1x162) + (Ax161) + (Fx160)

5
or (1x256) + (10x16) + (15x1)
or 256 + 160 +15
or 431
Thus 1AF16 = 43110

Observe that since there are only 16 digits in the hexadecimal number system, so 4 bits
(24 = 16) are sufficient to represent any hexadecimal number in binary.

Conversion of decimal numbers into any other number systems

A decimal number might have two parts: integral and fractional parts. So, for converting
a number from the decimal number system into any other number system, separate it into
integer part (left side of the decimal point) and fraction part (right side of the decimal
point). For the integer part, the following procedure is followed:

1. Divide the integral part of the decimal number by the base of the target number
system and note the remainder.
2. Divide the quotient of the previous division by the base of the target number
system and note the remainder.
3. Repeat step 2 till the quotient becomes 0.
4. Arrange the remainders in an order starting with the last division.
5. The number obtained in step 4 is the integer part of the desired number.

For the fraction part, the following procedures are followed:

1. Multiply the fraction part by the base of the system and note the integer part of the
result.
2. Multiply the fraction part of the previous result by the base of the system and note
the integer part of the result.
3. Repeat step 2 till the fraction part of the result is zero or till the required accuracy
(number of digits after the decimal point) is achieved.
4. Arrange the integer parts in the order starting with first multiplication.
5. The number obtained in step 4 is the fraction part of the desired number.

Example 1
Convert the decimal number 93 into:

a) binary numbers
b) octal numbers
c) hexadecimal number

6
Solution
a) Conversion into a binary number:-

93 / 2, Q = 46, R = 1
46 / 2, Q = 23, R = 0
23 / 2, Q = 11, R = 1
11 / 2, Q = 5, R = 1
5 / 2, Q = 2, R = 1
2 / 2, Q = 1, R = 0
1 / 2, Q = 0, R = 1

Therefore, an equivalent binary number becomes 1011101

b) Conversion into an octal number:

93 / 8, Q = 11, R = 5
11 / 8, Q = 1, R = 3
1 / 8, Q = 0, R = 1

Therefore, an equivalent octal number = 135

c) Conversion into a hexadecimal number:


93/16, Q=5, R=13=D+
5/16, Q=0, R=5
Therefore, an equivalent hexadecimal number is 5D

Example 2+
Convert 0.125 from decimal to binary

Solution: - 0.125 x 2 = 0.250 here the integer part is 0


0.250 x 2 = 0.50 here the integer part is 0
0.50 x 2 = 1.0 here the integer part is 1
Since the fraction part is 0, no further multiplication is required. So, an equivalent binary
number becomes 0.001
That is, (0.125)10 = (0.001)2

Conversion of other systems into decimal number system

A number in the non- decimal number system is converted into a decimal number by
multiplying each digit in the number by its place value and adding all the products.

7
Example 1

Convert the hexadecimal number FA2E into a decimal number


Solution:
FA2E = (F x 163) + (A x 162) + (2 x 161) + (E x 160)
= (15 x 4096) + (10 x 256) + (2 x 16) + (14 x 1)
= 61440 + 2560 + 32 + 14
= 64046
Therefore, FA2E16 = 6404610

Example 2

Convert the octal number 765 into a decimal number


Solution:
765 = (7 x 82) + (6 x 81) + (5 x 80)
= (7 x 64) + (6 x 8) + (5 x 1)
= 448 + 48 + 5
= 501
Therefore, 7658 = 50110

Example 3
Convert the binary number 101.01 into a decimal number
Solution:
101.01 = (1 x 22) + (0 x 21) + (1 x 20) + (0 x 2-1) + (1 x 2-2)
= 4 + 0 + 1 + 0 + 0.25
= 5.25
Therefore, (101.01)2 = 5.2510
Converting from a base other than 10 to a base other than 10

The following two steps are used to convert a number from a base other than 10 to a base
other than 10.

Step 1: Convert the original number to a decimal number (base 10).


Step 2: Convert the decimal number so obtained to the new base.

Example 1. 5456 = ?4

Solution:
Step 1: Convert from base 6 to base 10
545 = (5 x 62) + (4 x 61) + (5 x 60)
= (5 x 36) + (4 x 6) + (5 x 1)
= 180 + 24 + 5
= 209
Therefore, 5456 = 20910
Step 2: Convert 20910 to base 4

8
209 / 4, Q = 52, R = 1
52 / 4, Q = 13, R = 0
13 / 4, Q = 3, R = 1
3 / 4, Q = 0, R = 3

Hence, 20910 = 31014


So, 5456 = 20910 = 31014
Thus, 5456 = 31014
Shortcut method for binary to octal conversion

The following steps are used in this method:


Step 1: Divide the binary digits into groups of three (starting from the right).

Step 2: Convert each group of three binary digits into one octal digit. (Refer to Table 3.1
and try to remember that since there are only 8 digits (0 to 7) in the octal number system,
so 3 bits (23 = 8) are sufficient to represent any octal number in binary). Since decimal
digits 0 to 7 are equal to octal digits 0 to 7 so binary to decimal conversion can be used in
this step.

Example 1. 1011102 = ?8

Solution:
Step 1: Divide the binary digits into groups of 3 starting from right

101 110

Step 2: Convert each group into one digit of octal (use binary-to-decimal
conversion)

1012 = 1 x 22 + 0 x 21 + 1 x 20
=4+0+1
= 58

1102 = 1 x 22 + 1 x 21 + 0 x 20
=4+2+0
= 68
Hence, 1011102 = 568

Example 2. 11010102 = ?8
Solution:
11010102 = 001 101 010
(Group 3 digits from right)
1528

9
(Convert each group to an octal digit)
Hence, 11010102 = 1528
Shortcut method for octal to binary conversion

The following steps are used in this method:

Step 1: Convert each octal digit to a 3 digit binary number. (The octal digits may
be treated as decimal for this conversion).

Step 2: Combine all the resulting binary groups (of 3 digits each) into a single binary
number.

Example 1. 5628 = ?2

Solution:
Step 1: Convert each octal digit to 3 binary digits
58 = 1012
68 = 1102
28 = 0102
Step 2: Combine the binary groups
5628 = 101 110 010
5 6 2

Hence, 5628 = 1011100102


Example 2. 67518 = ?2

Solution:
67518 = 110 111 101 001
6 7 5 1

= 1101111010012

Hence, 67518 = 1101111010012

Shortcut method for binary to hexadecimal conversion


The following steps are used in this method:
Step 1: Divide the binary digits into groups of four (starting from the right).
Step 2: Convert each group of four binary digits to one hexadecimal digit. Remember that
hexadecimal digits 0 to 9 are equal to decimal digits 0 to 9, and hexadecimal
digits A to F are equal to decimal digits 10 to 15. Hence for this step, the binary
to decimal conversion procedure can be used, but the decimal values 10 to 15
must be represented as hexadecimal A to F.

10
Example 1. 110100112 = ?16

Solution:
Step 1: Divide the binary digits into groups of 4.

1101 0011

Step 2: Convert each group of 4 binary digits to 1 hexadecimal digit.


11012 = 1 x 23 + 1 x 22 + 0 x 21 + 1 x 20
=8+4+0+1
= 1310
= D16

00112 = 0 x 23 + 0 x 22 + 1 x 21 + 1 x 20
=0+0+2+1
= 316
Hence, 110100112 = D316

Example 2. 101101011002 = ?16

Solution:
101101011002 = 0101 1010 1100
(Group 4 digits from right)
=5AC
(Convert each group to hexadecimal digit)
Hence, 101101011002 = 5AC16

Shortcut method for hexadecimal to binary conversion


The following steps are used in this method:
Step 1: Convert the decimal equivalent of each hexadecimal digit to 4 binary digits.
Step 2: Combine all the resulting binary groups (of 4 digits each) into a single number.

Example 1. 2AB16 = ?2

Solution:
Step 1: Convert the decimal equivalent of each hexadecimal digit to 4 binary digits
216 = 210 = 00102
A16 = 1010 = 10102
B16 = 1110 = 0102
Step 2: Combine the binary groups
2AB16 = 0010 1010 1011
2 A B

Hence, 2AB16 = 0010101010112


Example 2. ABC16 = ?2

11
Solution:
ABC16 = 1010 1011 1100
A B C

= 1010101111002

Hence, ABC16 = 1010101111002


Finally, Table 3.2 summarizes the relationship between the decimal, binary, hexadecimal,
and octal number systems. Note that the maximum value for a single digit of octal (7) is
equal to the maximum value of three digits of binary. The value range of one digit of
octal duplicates the value range of three digits of binary. If octal digits are substituted for
binary digits, the substitution is on a one-to-three basis. Thus, computers that print octal
numbers instead of binary, while taking memory dump, save one-third of the printing
space and time.

Similarly, note that the maximum value of one digit in hexadecimal is equal to the
maximum value of four digits in binary. Thus the value range of one digit of hexadecimal
is equivalent to the value range of four digits of binary. Therefore, hexadecimal shortcut
notation is a one-to-four reduction in the space and time required for memory dump.

Table 3.2. Relationship between Decimal, Binary, Hexadecimal and Octal Number
Systems

HexaDecimal Binary(for Octal Corresponding


hexadecimal) binary(for octal)
0 0000 0 000
1 0001 1 001
2 0010 2 010
3 0011 3 011
4 0100 4 100
5 0101 5 101
6 0110 6 110
7 0111 7 111
8 1000 10 001000/1000
9 1001 b/c canceling zero
A 1010 to the left doesn’t
B 1011 change the number
C 1100
D 1101
E 1110
F 1111
10 00010000/10000
b/c canceling zero
to the left doesn’t
change the number

12
3. Data representation

As all of you know a computer is a data processing machine, so we have to


understand the nature of data. Data can be found in different forms like as a number,
text, images audio & video.
Data inside the computer:

How computers handle all these data types?


To handle & represent different data types, a computer uses universal uniform
representations of data is known as Bit Patterns. Bit pattern is a sequence or strings of
bits that is used to represent different data types.

Bit (Binary Digit):

Bit is the smallest unit of data that can be stored in a computer. It is a single bit that
can be stored in a computer. In other words, it is a single bit that can represent two
values; either 0 or 1.

Byte:

Without question, the most important data structure used by the most microprocessor
is the byte. A byte consists of eight bits and is the smallest addressable datum (data
item) in the microprocessor. It is the most important data structure & is used by most
microcomputer. The bits in a byte are numbered from bit zero (b0) through seven (b7)
as follows:
b7 b6 b5 b4 b3 b2 b1 b0
Since a byte contains eight bits, it can represent 2 8, or 256, different values. Generally,
we'll use a byte to represent:
1. unsigned numeric values in the range 0 to 255
2. signed numbers in the range -128 to +127
3. ASCII character codes
4. Other special data types requiring no more than 256 different values. Many data
types have fewer than 256 items so eight bits is usually sufficient.

The Word: a word is a group of bits greater than or equal to 8 bits. There is no fixed
size for a word length. It depends on from computer to computer. Most micro

13
processors & minicomputers are normally byte oriented with word length 8 bits, 16
bits 32 bits & 64 bits.

4. Encoding System:- A piece of text in any language is a sequence of symbols use to


represent an idea in that language. For example, the English language uses 26 symbols
(A, B, C... Z) to represent uppercase letters, 26 symbols (a, b, c, ..., z) to represent
lowercase letters, 9 symbols (0, 1, 2, ..., 9) to represent numeric characters and symbols
like (., ?, :, ; ..., !) and other symbols such as the blank, the new line, and the tab used for
text alignment and readability. You can represent each symbol with bit pattern Different
sets of bit patterns are designed to represent text symbols. In a character representation, a
single character should be represented the given number of bits of that coding scheme.
The most commonly used coding to represent characters are:

A. BCD (Binary Coded Decimal)

This is the simplest coding scheme. Originally BCD coding is used four bits to represent
each digit of the decimal number into its binary equivalent rather than converting the
entire decimal value into a pure binary form.
Example: The code of the digit 1 is 0001
The code of the digit 4 is 0100.
The code of the digit 43 is 01000011
Note that each decimal digit is independently converted to a 4 bit binary number.
However 4 bits are insufficient to represent the various characters used by a
computer system. Instead of using 4 bits with only 16 possible characters, computer
designers commonly 6 bits to represent characters in BCD. In the 6 bit BCD code the 4
BCD numeric place positions are retained but additional zone positions are added. With 6
bit, it is possible to represent 64 (2 6) different characters. This is a sufficient number to
code the decimal digits (10), alphabetic letters(26), and other special characters (28).
Note In addition to the four bits that represent the actual data, additional two bits are
used as zone bits. These bits are used to distinguish the actual data represented.
Observe the following example:
Example :
In 6 Bit BCD representation, 0001 is used to represent three characters, letter A, letter J
Or digit 1. How can you distinguish the character represented by 0001? By the zone bits.
The zone bits of the three characters are different. According to the above zone bits,
The digit 1 is represented as 000001. The letter A is represented as 110001. The letter J
is represented as 100001.

Example: Represent F in BCD.


Solution: To represent F you have to ask question like where is F(position 6 for
instance)? In which range is it found? It is in the range A -I.

14
So the zone bits are determined as11. F is the sixth letter if you count starting from A. So,
it will be represented by the decimal form of the digit which is 110 (or 0110 using 4
digits). Finally, the representation of F in BCD is 110110.
Example: show the binary digits used to record the word BASE in 6 bit BCD code.

Solution:
B = 110010 in BCD binary notation
A = 110001 in BCD binary notation
S = 010010 in BCD binary notation
E = 110101in BCD binary notation
So the binary digits
110010 110001 010010 110101
B A S E
Will record the word BASE in 6 bit BCD.

B. EBCDIC (Extended Binary Coded Decimal Interchange Code)

To make the number of characters represented by BCD more, 2 bits are added to the 6
bits (totally 8 bits). This makes the improved BCD capable of representing 28 (256)
characters. And this coding scheme is called Extended Binary Decimal
Interchange Code (EBCDIC). EBCDIC is developed by IMB; it is an 8 bits pattern. The
only difference between BCD and EBCDIC is their zone bits. Unlike BCD, EBCDIC
uses 4 zone bits and the following table shows you the equivalent zone bits of EBCDIC
to the BCD zone bits.
BCD EBCDIC(zone Letters/Digits
(zone bits of each Represented
bits of group)
each
group)
11 1100 A_I
10 1101 J_R
01 1110 S_Z
00 1111 0_9
In EBCDIC, upper case letters, lower case letters, digits and other printable or non -
Printable characters are included. The limitation of EBCDIC is that, it is not used in any
computer other than IBM machines.

C. ASCII -7 and ASCII-8 (American Standard Code for Information


Interchange)

The other popular schemes are ASCII -7 and ASCII-8. ASCII -8 is an extended version
of ASCII-7. Generally, ASCII-7 code was designed as a standard code for ISO

15
(International Organization for Standardization). It is a 7-bit code and as a result
representing 27(128) characters. From the 7-bits, 3-bits are used as zone bits and the other
four bits represent the actual data. ASCII is a little bit different from the BCD and
EBCDIC because in ASCII alphabetical letters are divided into two sections, not three.

Zone bits ASCII-7 representation of


Letters/ Digits

100 A_O
101 P_Z
011 0_9

Example 26: Represent the letter A in ASCII.


Solution: Since A is in the range A_O and therefore the zone bits used must be 0100. So,
the representation of letter A in ASCII will be 1000001.

ASCII-8:
ASCII -8 is an extended version of ASCII, which uses 8 bits rather than 7 bits.
ASCII-8 can represent 28(256) possible characters. The difference between ASCII &
ASCII _ 8 is that only on their zone bits. ASCII _ uses 4 bits as a zone bit.

16

You might also like