NUMBER SYSTEM
A number system is a mathematical topic under discrete mathematics that deals with representing the numbers using specific symbols and the rules used to represent the numbers. The main ways to classify numbers are divided into two ways that include; positional and non-positional. For our case, I shall discuss the positional numbers that involve the following; a decimal number which includes representing the numbers using base- 10, a binary number that involves using base- 2, octal number that involves using base- 8, and hexadecimal number that involve using base- 16. In counting numbers, we count from 0,1,2,3,4,5,6,7,8,and stop at 9. This is because ten is made of two number “one” and “zero,” where the one represents a group of items, and the zero represents a place holder. The items are represented in the power of ten, starting from zero going up from the left. In this article, I shall review how the different number systems operate, work with them, and convert from one number system to another, and its application to information technology.
Firstly, I shall begin discussing the binary number system. This number system is expressed using a base- 2, and it only uses two digits of binary that is 0’s and 1’s. The binary system uses a positional representation of a radix of 2, and each position has a value that is two times greater than the number to the right place. The binary numeral system is the primary number system used in computers. Each digit is referred to as a bit. In the early years of computing, the switches represented the binary values through punched holes and paper tapes. This was improved in today’s computers to represent two voltages, which is “on” representing an equivalent of one and “off,” which is a representation of a zero. When speaking, the binary is read digit by digit to differentiate it from the decimal numeral.
In a binary number system, the digits increase with a power of 2. The rightmost digit is represented as 20, and the next is represented using 21 and so on. The binary value is calculated as the sum of the powers of 2, represented by each “1” and “0” digit in the number. In binary numbers, left most number is called the most significant bit, and the rightmost number is the least significant bit. The binary numbers system also undergoes arithmetic operations, and the operations include; addition, subtraction, multiplication, and division. Besides, the addition operation is done by adding two single-digit binary numbers. The operation is as follows:
0 + 0 =0
0 + 1 =1
1 + 0 =1
1 + 1 =0, carry 1. This is because when adding 1 and 1, then the sum is 0., one is added to the other column on the left. This is known as carrying.
Subtraction is the same as the addition arithmetic, but with some small difference. The subtraction operations include the following;
0 – 0 = 0
1 – 1 = 0
1 – 0 = 1
0 – 1 = 1, borrow 1. This is because when subtracting “1” from “0” it produces a result of “1”, while 1 is subtracted from the column on the left. This process of taking a “1” from the next column and subtracting it from the next positional value, is known as borrowing. Computers used a signed number representations to handle the negative numbers, and it uses the Two’s complement method.
Multiplication is the other arithmetic operation done on binary numbers. The operation includes;
0 * 0 = 0
0 * 1 = 0
1 * 0 = 0
1 * 1 = 1
The division arithmetic operation on binary numbers include either the long division operation or the binary division.
For converting binary numbers to other number systems, the same procedure is followed for each of the conversion. To convert from a binary number to decimal number, multiply the digits by decreasing powers of two. An example of this is;
100 = 1 • 22 + 0 • 21 + 0 • 20
= 1 • 4 + 0 • 2 + 0 • 1 = 4
For a binary number to an octal number conversion, there are two ways of doing it. One is using the grouping method, and two is first converting the binary number to a decimal number then to an octal number. The first method, the grouping method, is always the simplest. It involves taking the binary number, divide the number in a group of three starting from the left, and for the fraction part, you start from the right, and then convert the three binary digit to an octal digit. An octal number system is made of digits from 0 – 7. The octal number can be represented in binary using 3 bit, as shown below;
OCTAL DIGIT VALUE
BINARY EQUIVALENT
0
000
1
001
2
010
3
011
4
100
5
101
6
110
7
111
To convert a binary number to a hexadecimal number, we can use both indirect and direct methods. The indirect process involves converting the binary to other bases system and then to Hexadecimal. The direct way requires grouping the binary number into groups of four, starting from the right for the integer part and left for the fraction part. For the hexadecimal numbers, the digits are only 16 ranging from 0 – 9, then from alphabet A – F. They are represented as shown below;
Binary
0
1
2
3
4
5
6
7
Hexadecimal
0000
0001
0010
0011
0100
0101
0110
0111
Binary
8
9
A
B
C
D
E
F
Hexadecimal
1000
1001
1010
1011
1100
1101
1110
1111
The other type of number system is the decimal number system, and the number has a base of 10. The digits in this number system range from 0 – 9, with each digit, is being determined by its position in the number. The decimal numerical value is found by multiplying each digit of the number by the value of the position in which the digit appears and then adding the products. In addition, when you reach 9, make the rightmost number 0 and add 1 to the left number, which makes it ten and so on.
Converting the decimal number to binary, octal, and Hexadecimal requires a repeated division and remainder algorithm. To convert a decimal to binary, you divide the number by two until the remainder is an outstanding digit. The conversation of decimal to an octal number is done through the division of the number by 8. The decimal to hexadecimal conversion is done by dividing the decimal number by 16, and if the remainder is greater than nine, then an alphabet is used to represent the digit. This is obtained using the table below;
Decimal:
0
1
2
3
4
5
6
7
Hexadecimal:
0
1
2
3
4
5
6
7
Decimal:
8
9
10
11
12
13
14
15
Hexadecimal:
8
9
A
B
C
D
E
F
Octal is the other type of number system. This number system is represented using base 8, and its digits range from 0,1,2,3,4,5,6, and 7. The octal number system was used in minicomputers and came to replace the binary number system. Conversion of octal to decimal is done by multiplying each digit raised to the power of eight. An example includes; consider the following octal number 354 into its decimal equivalent 3(82) + 5(81) + 4(80) = 236.
For the vice versa process to convert the decimal to octal, the decimal number is divided by 8 to get the octal number. Fraction part of the octal number is found by multiplying the number by 8 with a carry that is read downwards. An example is as shown below;
Find the octal equivalent of the decimal (3229)10
8 | 3229
8 | 403 remainder 5
8 | 50
remainder 3
8 | 6 remainder 2
0 remainder 6
Solution = (6235)8
Octal to binary conversion is done by finding the binary equivalent of the octal number grouped in three. The vice versa is the reverse procedure of octal to binary conversion. The other method is the octal dabble method that involves dividing the decimal number by eight and finding the octal number’s binary equivalent.
Hexadecimal is the last type of number system, and it is normally shortened as “hex.” It is written to the base of 16, and the digits in this number system range from 0,1,2,3,4,5,6,7,8,9 and six extra symbols. These symbols make up for the digits between 10, 11, 12, 13, 14, and 15. They are represented with alphabets A, B, C, D, E, and F. Hexadecimal is preferred due to its compactness, and it is easy to understand compared to binary numbers. Each digit in the hexadecimal number weights 16, starting from the least significant bit. To convert the Hexadecimal to binary is done by first converting the Hexadecimal into the four-bit binary code. Example includes; 3FA7 written as 0011 1111 1010 0111.
Hexadecimal to decimal conversion includes the sum of the multiplied numbers by the corresponding weights. The example of the conversion is shown below;
Find the decimal equivalent of the Hexadecimal (4A80)16
= (4×163) + (10×162) + (8×161) + (0×160)
= 16384 + 2560 + 128 + 0
= (19072)10
The conversion of a decimal number back to Hexadecimal involves dividing the decimal number by 16 until the quotient is zero. The hexadecimal equivalent is read from the remainder column, starting from bottom to top. An example of such conversion includes;
Find the hexadecimal equivalent of the decimal number
(1234)Ten decimal hexadecimal
= 16 | 1234 2 2
= 16 | 77 13 D
= 16 | 44 4 4
= (4D2)16
For the fraction part, we multiply the fraction with 16 to find the hexadecimal equivalent. An example of such is;
Convert (0.65)10
= 0.675 × 16 = 10.8 10 A
0.800 × 16 = 12.8 12 C
0.800 × 16 = 12.8 12 C
0.800 × 16 = 12.8 12 C
= (0.ACCC) 16
The most common IT application of a number system is Digital Electronics and is used for information representation. All computer languages and programming are based on the binary number system. Digital electronics uses the binary number system, due to its two states of “1’s” and “0’s”. The digital circuits process the signals that have two voltage states, logic “1” and logic “0”, with the high voltage being represented by logic “1” and the low voltage is represented by logic “0”. This is what makes binary number to be ideal for digital electronic use.
From the above review, it is evident that the binary number system is the simplest number system among the four of them. The binary number system only contains two digits, 0 and 1. The binary number system is mostly used to represent information for digital and most computer systems. The octal number system is referred to as a base of 8. The decimal number system is a base- 10 system and Hexadecimal is a base- 16 system, and is used mostly with microprocessor-based systems. The conversion from one number system to another involves multiplying the number with its position weight to the equivalent number. And the vice versa happens when you want to reverse the conversion.