NUMBER SYSTEM IN COMPUTER - ProLearner

Number System in Computer

Binary Number System

Unfortunately, the decimal number system does not lend itself to convenien implementation in digital systems. For example, it is very difficult to design electronic equipment so that it can work with 10 different voltage levels (each one representing one decimal character, 0 through 9). On the other hand, it is very easy to design simple, accurate electronic circuits that operate with only two voltage levels. For this reason, almost every digital system uses the binary number system (base 2) as the Basic number system of its operations, although other systems are often used in conjunction with binary.
In the binary system there are only two symbols or possible digit values, 0 and 1 Even so, this base-2 system can be used to represent any quantity that can be represented in decimal or other number systems.
The binary system is also a positional-value system, wherein each binary digit has its own value or weight expressed as a power of 2. This is illustrated in Fig. 3.2.
Here, places to the left of the binary point (counterpart of the decimal point) are positive powers of 2 and places to the right are negative powers of 2. The number 1010.0101 is shown represented in the figure.
 
To find the decimal equivalent of above shown binary number, we simply take the sum of the products of each digit value (0 or 1) and its positional value
101001012  =(1-2)+(0-2)+(1-2)+(0-2)+(0-2)+(1-2)+(0-2)+(12)
=8 0+2+0+0+0.25 +0+ 0.0625
=10.312510

Notice in the preceding operation that subscripts (2 and 10) were used to indicate the  base in which the particular number is expressed. This convention is used to avoid confusion whenever more than one number system is being employed. In the binary system, the term Binary digit is often abbreviated to the term bit. which we'll use henceforth. As you see in Fig. 3.2, there are 4 bits to the left of the binary point, representing the integer part of the number, and 4 bits to the right of the binary point, representing the fractional part. The leftmost bit carries the largest weight and hence, is called the most significant bit (MSB). The rightmost bit carries the smallest weight, and hence called least significant bit (LSB).
The sequence of binary numbers goes as 00, 01, 10, 11, 100, 101, 110, 111, 1000,- ----The binary counting sequence has an important characteristic. The units bit (LSB) changes either from 0 to 1 or 1 to 0 with each count. The second bit (two's (2) position) stays at 0 for two counts, then at 1 for two counts, then at 0 for two counts, and so on. The third bit (four's (22) position) stays at 0 for four counts, then at 1 for four counts, and so on. The fourth bit (eight's (2) position) stays at 0 for eight counts, then at I for eight counts. If we wanted to count further we would add more places, and this pattern would continue with Os and is alternating in groups of 2N-1

Octal Number System

The octal number system is very important in digital computer work. The octal number system has a base of eight, meaning that it has eight unique symbols: 0, 1, 2, 3, 4, 5, 6, and 7. Thus, each digit of an octal number can have any value from 0 to 7.

The octal system is also a positional value system, wherein each octal digit has its own value or weight expressed as a power of 8 (See Fig. 3.3). The places to the left of the octal point (counter-part of decimal point and binary point) are positive powers of 8 and places to the right are negative powers of 8. The number 3721.2406 is shown represented in the figure.
To find the decimal equivalent of above shown octal number, simply take the sum of products of each digit value and its positional value:
3721.2406, =(3x8³)+(7x82)+(2x8')+(1x8°)+(2x8¹)+(4x82)+(0x8³)+(6x84) =3x 512 +7x64+2x8+1x1+2×0.125+4 x 0.015625+0+6x0.000244 = 1536 +448 +16+1+0.25 +0.0625+0+0.001464
=2001.31396410

The sequence of octal numbers goes as 0, 1, 2, 3, 4, 5, 6, 7, 10, 11, 12, 13, 14, 15, 16, 17, 20, 21, 22. See each successive number after 7 is a combination of 2 or more unique symbols of octal system.

Hexadecimal Number System

The hexadecimal system uses base 16. Thus, it has 16 possible digit symbols. It uses the digits 0 through 9 plus the letters A, B, C, D, E, and F as the 16 digit symbols.

Just like above discussed systems, hexadecimal system is also a posi- tional-value system, wherein each hexadecimal digit has its own value or weight expressed as a power of 16. (See Fig. 3.4). The digit positions in a hexadecimal number have weights as shown in Fig. 3.4. Following table 3.1 shows the relationships between hexadecimal, octal, decimal and binary numbers.



Comments

Popular posts from this blog

Become Healthy Goal - Python Program

Interpretation vs Compilation

Calculator in C++