
The computer stores data (numbers, letters, special characters, etc) in unique form. It means binary form or number one, and zero is used to store entire data. In this section, we will look into the fundamentals of the number system.
HOW MANY NUMBER SYSTEMS ARE THERE?
Number systems are of two types.
- Non-Positional system
- Positional system
WHAT IS NON-POSITIONAL NUMBER SYSTEM?
In the early days, humans started to count with fingers, and beyond ten, they employed stones, shells, etc.This method of counting is called a non-positional number system.
The non-positional number system is the oldest number system.
This system uses symbols, each of which has a distinct value. For example: * for one, *** for three.
Each symbol represents the same value regardless of its position. To find the value, we have to count the number of symbols.
The difficulty of performing arithmetic calculations with a non-positional number system led to the development of a positional system.
POSITIONAL NUMBER SYSTEM
In this system, digits are used. Each digit represents different values, and values depend on the position they occupy in a number.
Three rules determine the value of each digit in a number.
- The digit itself
- The position of the digit
- The base or total number of digits available in the number
The value of the base in all positional number systems suggests the following characteristics.
- The base values determine the total number of different digits available in the number system. The first of these choices is always zero.
- The maximum value of a single digit is always equal to one less than the value of the base.
BINARY NUMBER SYSTEM
The binary system has a base or radix of 2. So it has only two digits, ie 1 & 0. Each position in a binary number represents a power of the base (i.e. 2).
The right-most position is the units (20) position, and the second position from the right is the (21) position. This will proceed, and so on. Example: the decimal equivalent of a binary number 1010
(1×24) + (0×23) + (1×22) + (0×21) + (1×20) = 16 + 0 + 4 + 0 + 1 = 21
It is a common practice to write the base as a subscript.
10102 = 2110
Any decimal number in the range 0 to 2n-1 can be represented as an n-bit number in binary form.
Bit is the short form of binary digit, and in I.T terminology, it means either 1 & 0.
Bits 0,1,2,3 have corresponding weighting values of 1,2,4,8. Because a binary number only contains ones and zeroes, adding the weighting values of only the bits of the binary number containing 1’s will provide its decimal value.
OCTAL SYSTEM
In the octal system, the base or radix is 8. So there are only eight digits 0 to 7. In the octal number system, 8 and 9 do not exist.
Example: what is the decimal equivalent of octal number 2057
(2×83) + (0×82) + (5×81) + (7×80) = 1024 + 0 + 40 + 7 = 1071
so 20578 = 107110
In this system, we need only 3 bits to represent any octal number in binary.
HEXADECIMAL SYSTEM
In the hexadecimal system, the base or radix is 16. So, the base 16 number system has 16 individual digits.
The digits in the hexadecimal system are 0,1,2,3,4,5,6,7,8, & 9, and the letters are A, B, C, D, E, & F.
Letters are chosen to represent the hexadecimal digits greater than nine because a single symbol is required for each digit. In other words, A to F represents decimal values 10, 11, 12, 13, 14, and 15, respectively.
In this system, the largest single digit is F or 15.Each position in the hexadecimal number system represents a power of the base (16).
Example: the hexadecimal equivalent of hexadecimal number 1AF is
(1 × 162) + (A × 161) + (F × 160) = (1 × 256) + (10 × 16) + (15 × 1) = 256 +160+ 15 = 431
So 1AF16 = 43110
Due to the sixteen digits, 4 bits are sufficient to designate any hexadecimal number in binary.