Unit-3 IT
Unit-3 IT
NON POSITIONAL NUMBER SYSTEM In early days, human beings counted on fingers.
When counting beyond ten fingers, they used stones , pebbles, or sticks to indicate values. This
method of a counting uses an additive approach or 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 a number, and to find the value of a number, one has to
count the number of symbols present in the number. Since it is very difficult to perform arithmetic
with such a number system, positional number system was developed.
POSITIONAL NUMBER SYSTEM In a positional number system, there are only a few
symbols called digits. These symbols represent different values, depending on the position they
occupy in a 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).
In our day-to-day life, we use decimal number system. In this system, base is equal to 10
because there are altogether ten symbols or digit (0,1,2,3,4,5,6,7,8, and 9). Computer
Fundamentals/42 2 2 You know that in decimal number system. Successive positions to the left of
the decimal point represent units, tens, hundreds, thousands, etc. However, notice that each
position represents a specific power of the base (10). For example, decimal number 2586 (written as
2586) consists of digit 6 in units position, 8 in tens position, 5 in hundreds position, and 2 in
thousands position, and its value can be written as: (2 x 10 3 ) + (5 x 102 ) + (8 x 101 ) + (6 x 100 )=
2000 + 500 + 80 + 6 = 2586
Binary Number System Binary number system is like decimal number system, except that the
base is 2, instead of 10. We can use only two symbols or digits (0 and 1) in this number system. Note
that the largest single digit is 1 (one less than the base). Each position in binary number represents a
power of the base (2). Hence, in this system, the rightmost position is units (2 0 ) position, the
second position from the rights 2’s (2 1 ) position, and proceeding in this way, we have 4’s (2 2 )
position, 8’s (2 3 ) position, 16’s (2 4 ) position, and so on. Therefore, decimal equivalent of binary
number 10101 (written as 10101 ) is : (1 x 2 4 ) + (0 x 2 3 ) + (1 x 2 2 ) + (0 x 2 1 ) + (1 x 2 0 ) = 16 + 0 +
4 + 0 + 1 = 21 In order to be specific about which system we are referring to, it is a common practice
to indicate the base as a subscript. Hence, we write” 101012=2110 The sort form of “binary digit” is
bit. Hence, “bit” in computer terminology means either a 0 or1. An n-bit number is binary number
consisting of ‘n’ bits. Below table lists all 3-bits numbers along with number can have not one of the
8 values in range 0 to 7. In fact, any decimal number in the range 0 to 2 n-1 can be represented in
binary form as an n-bit number.
Octal Number System In octal number system, the base is 8. Hence, there are only eight
symbols or digits: 0,1,2,3,4,5,6, and 7 (8 and 9 do not exist in this system). The largest single digit is 7
(one less than the base 8). Each position in an octal number represents a power of the base (8).
Therefore, decimal equivalent of octal number 2057 (written as 2057) is: (2 x 8 3 ) + (0 x 8 3 ) + (5 x 8
1 ) + (7 x 8 0 ) = 1024 + 0 + 40 + 7 = 1071 Observe that since there are only 8 digits in octal number
system, 3 bits (2 3= 8) are sufficient to represent any number in binary
Hexadecimal Number System In hexadecimal number system, the base is 16. Hence,
there are 16 symbols or digits. The first 10 digits are the same digits of decimal number system – 0,
1, 2,3,4,5,6,7,8, and 9. The remaining six digits are denoted by the symbols A,B,C,D,E, and F,
representing decimal values 10,11,12,13,14 and 15, respectively. Hence, the largest single digit is F
or 15 (one less than the base 16). Each position in hexadecimal number system represents a power
of the base (16). Therefore, decimal equivalent of hexadecimal number 1 AF (written as 1AF16) is 1 x
16 2 ) + (A x 161 ) + (F x 160 ) = (1 x 256) + (10 x 16) + (15 x 1) = 256 + 160 + 15= 431 Hence,
1AF16=43110 Observe that since there are only 16 digits in hexadecimal number 4 bits (2 4 = 16) are
sufficient to represent any hexadecimal number in binary.
Complementation
INPUT OUTPUT
1 0
0 1
0 0000
1 0001
DECIMAL NUMBER BCD
2 0010
3 0011
4 0100
5 0101
6 0110
7 0111
8 1000
9 1001
In the BCD numbering system, the given decimal number is segregated into
chunks of four bits for each decimal digit within the number. Each decimal digit
is converted into its direct binary form (usually represented in 4-bits).
ASCII
ASCII (American Standard Code for Information Interchange) is a standard
character encoding used in telecommunication. The ASCII pronounced ‘ask-ee’
, is strictly a seven bit code based on English alphabet. ASCII codes are used to
represent alphanumeric data .
The ASCII value of the lowercase alphabet is from 97 to 122. And, the ASCII
value of the uppercase alphabet is from 65 to 90.
EBCDIC
EBCDIC is short for extended binary coded decimal interchange code is eight bits, or one
byte, wide. This is a coding system used to represent characters-letters, numerals,
punctuation marks, and other symbols in computerized text. A character is represented in
EBCDIC by eight bit. EBCDIC mainly used on IBM mainframe and IBM mid-
range computer operating systems. Each byte consists of two nibbles, each four bits wide.
The first four bits define the class of character, while the second nibble defines the specific
character inside that class.EBCDIC is different from, and incompatible with, the ASCII
character set used by all other computers. The EBCDIC code allows for 256 different
characters. For personal computers, however, ASCII is the standard. If you want to move text
between your computer and a mainframe, you can get a file conversion utility that will
convert between EBCDIC and ASCII.
EBCDIC was adapted from the character codes used in IBM’s per-electronic PUNCHED CARD
machines, which made it less than ideal for modern computers. Among its many
inconveniences were the use of non-contiguous codes for the alphabetic characters, and the
absence of several punctuation characters such as the square brackets [] used by much
modern software.For example, setting the first nibble to all-ones,1111, defines the character
as a number, and the second nibble defines which number is encoded. EBCDIC can code up
to 256 different characters.There have been six or more incompatible versions of EBCDIC, the
latest of which do include all the ASCII characters, but also contain characters that are not
supported in ASCII.