Number System in Computer
Number System in Computer
2.1
Introduction
INTRODUCTION
Number system is a crucial parts of human and machine. Same as computer uses Binary Number system. The measure of computer is bit, like 0 & 1. To storing the data in particular device is considering this way to calculate the capacity of device. This are number of number system available.
2.2
A number system defines how a number can be represented using distinct symbols. A number can be represented differently in different systems. For example, the two numbers (2A)16 and (52)8 both refer to the same quantity, (42)10, but their representations are different.
2.3
2.4
Each digit appearing to left of decimal point represent a value between 0 and 9 times power of ten represented by its position in number.
Digit appearing to the right of decimal point represent a value between 0 to 9 an increasing negative power of ten.
2.5
Example 2.1 The following shows the place values for the integer +224 in the decimal system.
2.6
Example 2.2 The following shows the place values for the decimal number 7508. We have used 1, 10, 100, and 1000 instead of powers of 10.
) Values
2.7
Example 2.3
The following shows the place values for the real number +24.13.
2.8
The symbols in this system are often referred to as binary digits or bits (binary digit).
27 128 26 64 25 32 24 16 23 8 22 4 21 2 20 1 2-1 .5 2-2 .25
2.9
Integers
Most modern computer system do not represent numeric values using the decimal system. Instead, they typically use a binary or twos complement numbering system. Most modern computer system operate using binary logic. The computer represent values using two voltage level. With two level we can represent exactly two different values.
2.11
These could be any two different values, but by conversion we used the values 0 and 1. These two value, coincidentally, correspond to the two digits used by binary number system. Since there is a correspondence between the logic level used by computer and the two digit used in binary numbering system. It should come as no surprise that computer employ the binary system. The binary system works like the decimal number system except the binary system use base 2 includes the digit 0 and 1.
2.12
Example 2.4 The following shows that the number (11001)2 in binary is the same as 25 in decimal. The subscript 2 shows that the base is 2.
2.13
Reals
Example 2.5 The following shows that the number (101.11)2 in binary is equal to the number 5.75 in decimal.
2.14
S = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F}
Note that the symbols A, B, C, D, E, F are equivalent to 10, 11, 12, 13, 14, and 15 respectively. The symbols in this system are often referred to as hexadecimal digits.
2.15
Integers
Example 2.6 The following shows that the number (2AE)16 in hexadecimal is equivalent to 686 in decimal.
2.17
S = {0, 1, 2, 3, 4, 5, 6, 7}
2.18
Integers
Example 2.7
The following shows that the number (1256)8 in octal is the same as 686 in decimal.
2.20
2.21
2.22
Conversion
We need to know how to convert a number in one system to the equivalent number in another system. Since the decimal system is more familiar than the other systems, we first show how to covert from any base to decimal. Then we show how to convert from decimal to any base. Finally, we show how we can easily convert from binary to hexadecimal or octal and vice versa.
2.23
Example 2.8
The following shows how to convert the binary number (110.11)2 to decimal: (110.11)2 = 6.75.
2.25
This means that (23.17)8 19.234 in decimal. Again, we have rounded up 7 82 = 0.109375.
2.26
2.27
Figure 2.7 Converting the integral part of a number in decimal to other bases
2.28
Example 2.11 The following shows how to convert 35 in decimal to binary. We start with the number in decimal, we move to the left while continuously finding the quotients and the remainder of division by 2. The result is 35 = (100011)2.
2.29
Example 2.12 The following shows how to convert 126 in decimal to its equivalent in the octal system. We move to the right while continuously finding the quotients and the remainder of division by 8. The result is 126 = (176)8.
2.30
Example 2.14
Since the number 0.625 = (0.101)2 has no integral part, the example shows how the fractional part is calculated.
2.31