Number System Conversion Examples
Number System Conversion Examples
The terms that you learned in the decimal and binary sections are also used with the octal system.
The unit remains a single object, and the number is still a symbol used to represent one or more
units.
Base (Radix)
As with the other systems, the radix, or base, is the number of symbols used in the system. The
octal system uses eight symbols—0 through 7. The base, or radix, is indicated by the subscript 8.
Positional Notation
The octal number system is a positional notation number system. Just as the decimal system
uses powers of 10 and the binary system uses powers of 2, the octal system uses power of 8 to
determine the value of a number’s position. The following bar graph shows the positions and
the power of the base:
Remember that the power, or exponent, indicates the number of times the base is multiplied by
itself. The value of this multiplication is expressed in base 10 as shown below:
83 = 8 × 8 × 8, or 51210
82 = 8 × 8, or 6410
81 = 810
80 = 110
1
8–1 = , or .12510
8
1 1
8–2 = , or , or .01562510
8´8 64
1 1
8–3 = , or , or .001953110
8´8´8 512
All numbers to the left of the radix point are whole numbers, and those to the right are fractional
numbers.
About 1672, Gottfried Wilhelm von Leibniz (German) perfected a machine
that could perform all the basic operations (add, subtract, multiply, divide),
as well as extract the square root. Modern electronic digital computers still
use von Leibniz’s principles.
Numbers expressed in decimal number system are much more meaningful to us than are numbers
expressed in any other number system. This is because we have been using decimal numbers in
our day-to-day life, right from childhood; however, we can represent any number in one number
system in any other number system. Because the input and final output values are to be in decimal,
computer professionals are often required to convert number in other systems to decimal and
vice versa. Many methods can be used to convert numbers from one base to another. A method
of converting from another base to decimal, and a method of converting from decimal to another
base are described here:
Step 1: Determine the column (positional) value of each digit (this depends on the position of the
digit and the base of the number system).
Step 2: Multiply the obtained column values (in Step 1) by the digits in the corresponding columns. Notes
Step 3: Sum up the products calculated in Step 2. The total is the equivalent value in decimal.
110012 = ?10
Solution:
16 8 4 2 1
*1 *1 *0 *0 *1
16 8 0 0 1
16+8+0+0+1=25
Hence, 110012=2510
47068=? 10
Solution:
512 64 8 1
*4 *7 *0 *6
2048 448 0 6
Notes
1AC16 = ? 10
Solution:
= 256 + 160 + 12
= 42810
40527=?10
Solution:
= 1372 + 0 + 35 + 2
140910
40526 = ?10
Solution:
= 864 + 0 + 30 + 2
= 89610
Solution:
= 256 + 64 + 0 + 0 + 1
= 32110
1AC13 = ?10
Solution:
= 31110
Notes
1.5.2 Converting from Decimal to Another Base (Division-Remainder
Technique)
The following steps are used to convert a base 10 (decimal) number to a number in another base
Step 1: Divide the decimal number by the value of the new base.
Step 2: Record the remainder from Step 1 as the rightmost digit (least significant digit) of the
new base number.
Step 3: Divide the quotient of the previous division by the new base.
Step 4: Record the remainder from Step 3 as the next digit (to the left) of the new base number.
Repeat Steps 3 and 4, recording remainders from right to left, until the quotient becomes
zero in Step 3.
Note that the last remainder, thus obtained, will be the most significant digit of the new base
number.
2510
Solution:
The remainders are now arranged in the reverse order, making the first remainder the least
significant digit (LSD) and the last remainder the most significant digit (MSD).
1.5.3 Converting from a Base Other Than 10 to Another Base Other Than 10
The following steps are used to convert a number in a base other than 10, to number base other
than 10:
Step 2: Convert the decimal number obtained in step 1 to the new base number.
5456 = ? 4
Solution:
= 180 + 24 + 5
= 20910
Remainder
4 209 1
52
0
13
3 1
0 3
20910 = 31014
Above example illustrates the method of converting a binary number to an octal number.
Step 1: Divide the binary digits into groups of three (starting from the right)
Step 2: Convert each group of three binary digit to one octal digit. Since there are only 8 digits
(0 to 7) in octal number system, 3 bits (23 = 8) are sufficient to represent any octal number
in binary to decimal conversion method in this step.
1011102 = ? 8
Solution:
Step 1: Divide the binary digits into groups of 3, starting the right (LSD).
101 110
Step 2: Convert each group into one digit of octal (use binary-to-decimal conversion
method).
= 4 + 0 + 1 4 + 2 + 0
= 58 68
Always check that analogs method is used to convert fractions while conversion
of number representations.
Step 1: Convert each octal digit to a 3 digit binary number (the octal digits may be treated as
decimal numbers for this conversion).
Step 2: Combine all the resulting binary groups (of 3 digits each) into a single binary number.
Notes
5628 = ? 2
Solution:
Binary digits
58 = 1012
68 = 1102
28-0102
Step 1: Divide the binary digits into groups of four (starting from the right).
Step 2: Convert each group of four binary digits to one hexadecimal digit. Remember that
hexadecimal digits 0 to 9 are equal to decimal digits 0 to 9 and hexadecimal digits A to F are
equal to decimal values 10 to 15. Hence, for this step, we use binary to decimal conversion
procedure and represent decimal values 10 to 15 as hexadecimal A to F.
110100112 = ? 16
Solution:
Step 1: Divide the binary digit into groups of 4, starting from the right (LSD)
1101 0011
Step 2: Convert each group of 4 binary digits to 1 hexadecimal digit.
11012 = 1*23 + 1*22 + 0*21 + 1*20 00112 = 0*23 + 0*22 + 1*21 + 1*20
= 8 + 4 + 0 + 1 = 0 + 0 + 2 + 1
= 1310 = 316
= D16
Hence, 110100112 = D316
Step 2: Combine all resulting binary groups (4 digits each) into a single binary number.
Notes
2AB16=? 2
Solution:
Table 1.4 summarizes the relationship among decimal, hexadecimal, binary, and octal number
systems. Note that the maximum value for a single digit of octal (7) is equal to the maximum
value of three digits of binary. The value range of one digit of octal duplicates the value range of
three digits of binary. If we substitute octal digits for binary digits, the substitution is on a one-
to-three basis. Hence, computers that print octal numbers instead binary, while taking memory
dump, save one-third of printing space and time.
Similarly, note that the maximum value of one digit in hexadecimal is equal to the maximum
value of four digits in binary. Hence, the value range of one digit of hexadecimal is equivalent to
the value range of four digits of binary. Therefore, hexadecimal shortcut notation is a one-to-four
reduction in space and time required for memory dump.
Table 1.4: Relationship among Decimal, Hexadecimal, Binary, and Octal Number Systems