0% found this document useful (0 votes)
420 views

Number Systems

A number system defines a set of values to represent quantities and allows for arithmetic operations. The four main number systems are binary, octal, decimal, and hexadecimal. Each system uses a different set of digits and has a unique base value. Numbers can be converted between systems by repeatedly dividing by the base value and recording remainders to derive the equivalent value in the target numbering system.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
420 views

Number Systems

A number system defines a set of values to represent quantities and allows for arithmetic operations. The four main number systems are binary, octal, decimal, and hexadecimal. Each system uses a different set of digits and has a unique base value. Numbers can be converted between systems by repeatedly dividing by the base value and recording remainders to derive the equivalent value in the target numbering system.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 50

Number Systems

A number is a mathematical value used for counting and measuring objects, and
for performing arithmetic calculations. Numbers have various categories like
natural numbers, whole numbers, rational and irrational numbers, and so on.
Similarly, there are various types of number systems that have different
properties, like the binary number system, the octal number system, the decimal
number system, and the hexadecimal number system.

What are Number Systems?

A number system is a system representing numbers. It is also called the system


of numeration and it defines a set of values to represent a quantity. These
numbers are used as digits and the most common ones are 0 and 1, that are used
to represent binary numbers. Digits from 0 to 9 are used to represent other types
of number systems.

Definition of Number Systems

A number system is defined as the representation of numbers by using digits or


other symbols in a consistent manner. The value of any digit in a number can be
determined by a digit, its position in the number, and the base of the number
system. The numbers are represented in a unique manner and allow us to
operate arithmetic operations like addition, subtraction, and division.

Types of Number Systems

There are different types of number systems in which the four main types are:

 Binary number system (Base - 2)


 Octal number system (Base - 8)
 Decimal number system (Base - 10)
 Hexadecimal number system (Base - 16)
Binary Number System

The binary number system uses only two digits: 0 and 1. The numbers in this
system have a base of 2. Digits 0 and 1 are called bits and 8 bits together make a
byte. The data in computers is stored in terms of bits and bytes. The binary
number system does not deal with other numbers such as 2,3,4,5 and so on. For
example: 100012, 1111012, 10101012 are some examples of numbers in the
binary number system.

Octal Number System

The octal number system uses eight digits: 0,1,2,3,4,5,6 and 7 with the base of
8. The advantage of this system is that it has lesser digits when compared to
several other systems, hence, there would be fewer computational errors. Digits
like 8 and 9 are not included in the octal number system. Just as the binary, the
octal number system is used in minicomputers but with digits from 0 to 7. For
example: 358, 238, 1418 are some examples of numbers in the octal number
system.

Decimal Number System

The decimal number system uses ten digits: 0,1,2,3,4,5,6,7,8 and 9 with the base
number as 10. The decimal number system is the system that we generally use
to represent numbers in real life. If any number is represented without a base, it
means that its base is 10. For example: 72310, 3210, 425710 are some examples of
numbers in the decimal number system.

Hexadecimal Number System

The hexadecimal number system uses sixteen digits/alphabets:


0,1,2,3,4,5,6,7,8,9 and A,B,C,D,E,F with the base number as 16. Here, A-F of
the hexadecimal system means the numbers 10-15 of the decimal number
system respectively. This system is used in computers to reduce the large-sized
strings of the binary system. For example: 7B316, 6F16, 4B2A16 are some
examples of numbers in the hexadecimal number system.

Conversion Rules of Number Systems

A number can be converted from one number system to another number system.
Like binary numbers can be converted to octal numbers and vice versa, octal
numbers can be converted to decimal numbers and vice versa and so on. Let us
see the steps required in converting number systems.

Conversion of Binary / Octal / Hexadecimal Number Systems to Decimal


Number System

To convert a number from the binary/octal/hexadecimal system to the decimal


system, we use the following steps. The steps are shown by an example of a
number in the binary system.

Example: Convert 1001112 into the decimal system.

Solution:

Step 1: Identify the base of the given number. Here, the base of 1001112 is 2.

Step 2: Multiply each digit of the given number, starting from the rightmost
digit, with the exponents of the base. The exponents should start with 0 and
increase by 1 every time as we move from right to left. Since the base is 2 here,
we multiply the digits of the given number by 20, 21, 22 , and so on from right to
left.
Step 3: We just simplify each of the above products and add them.
Here, the sum is the equivalent number in the decimal number system of the
given number. Or, we can use the following steps to make this process
simplified.

100111 = (1×25) + (0×24) + (0×23) + (1×22) + (1×21) + (1×20)

= (1×32) + (0×16) + (0×8) + (1×4) + (1×2) + (1×1)

= 32 + 0 + 0 + 4 + 2 + 1

= 39

Thus, 1001112 = 3910.

Conversion of Decimal Number System to Binary / Octal / Hexadecimal


Number System

To convert a number from the decimal number system to


binary/octal/hexadecimal number system, we use the following steps. The steps
are shown on how to convert a number from the decimal system to the octal
system.

Example: Convert 432010 into the octal system.

Solution:

Step 1: Identify the base of the required number. Since we have to convert the
given number into the octal system, the base of the required number is 8.

Step 2: Divide the given number by the base of the required number and note
down the quotient and the remainder in the quotient-remainder form. Repeat
this process (dividing the quotient again by the base) until we get the quotient
less than the base.
Step 3: The given number in the octal number system is obtained just by
reading all the remainders and the last quotient from bottom to top.

Therefore, 432010 = 103408.

Conversion from One Number System to Another Number System


To convert a number from one of the binary/octal/hexadecimal systems to one
of the other systems, we first convert it into the decimal system, and then we
convert it to the required systems by using the above-mentioned processes.

Example: Convert 10101111002 to the hexadecimal system.

Solution:

Step 1: Convert this number to the decimal number system as explained in the
above process.

Thus, 10101111002 = 70010 → (1).


Step 2: Convert the above number (which is in the decimal system), into the
required number system.

Here, we have to convert 70010 into the hexadecimal system using the above-
mentioned process. It should be noted that in the hexadecimal system, the
numbers 11 and 12 are written as B and C respectively.

Thus, 70010 = 2BC16 → (2).

From the equations (1) and (2), 10101111002 = 2BC16.

Solved Example:

What is the binary equivalent of the number 27?

Solution:

Division by 2 Quotient Remanider Bit #

27/2 13 1 0

13/2 6 1 1

6/2 3 0 2

3/2 1 1 3

1/2 0 1 4

Therefore, the number 2710 in binary is written as 110112


Convert Decimal To Binary: Decimal To Binary Table
The Decimal to Binary table is given below. You can find the binary
equivalent of the decimal number from the following table:

Decimal Number Binary Number Decimal Number Binary Number

1 1 11 1011

2 10 12 1100

3 11 13 1101

4 100 14 1110

5 101 15 1111

6 110 16 10000

7 111 17 10001

8 1000 18 10010

9 1001 19 10011

10 1010 20 10100
It is easy to remember the table and answer the Decimal number’s
equivalent Binary number. When the given decimal number is huge
then we will have to convert it to binary number with the step-by-step
procedure explained below.

Example: Convert 13 to Binary Equivalent number.


Decimal to Binary Converter With Steps
1st Step: 13 ÷ 2. The remainder is 1 and Quotient is 6.
2nd Step: 6 ÷ 2. The remainder is 0 and Quotient is 3.
3rd Step: 3÷ 2. The remainder is 1 and Quotient is 1.
4th Step: 1 ÷ 2. The remainder is 1 and Quotient .0
So, the Binary Equivalent number for 13 1 0   =1101 2
Q1. How do you write 37 in Binary?
Answer: 37’s Binary Equivalent number is (100101) 2 .
1st Step: 37 ÷ 2 = Q(18) R(1)
2nd Step: 18 ÷ 2 = Q(9) R (0)
3rd Step: 9 ÷ 2 = Q(4) R (1)
4th Step: 4 ÷ 2 = Q(2) R (0)
5th Step: 2 ÷ 2 = Q(1) R (0)
6th Step: 1 ÷ 2 = Q(0) R (1)

Decimal No Quotient Remainder

37 ÷ 2 18 1

18 ÷ 2 9 0

9÷2 4 1

4÷2 2 0

2÷2 1 0

1÷2 0 1
Q2. What is the Binary Number of 32?
Answer: 32’s Binary Equivalent number is (100000) 2 .
1st Step: 32 ÷ 2 = Q(16) R(0)
2nd Step: 16 ÷ 2 = Q(8) R (0)
3rd Step: 8 ÷ 2 = Q(4) R (0)
4th Step: 4 ÷ 2 = Q(2) R (0)
5th Step: 2 ÷ 2 = Q(1) R (0)
6th Step: 1 ÷ 2 = Q(0) R (1)

Decimal No Quotient Remainder

32 ÷ 2 16 0

16 ÷ 2 8 0
8÷2 4 0

4÷2 2 0

2÷2 1 0

1÷2 0 1
Q2. How do you write 14 in Binary?
Answer: 14’s binary Equivalent number is (1110) 2 .
1st Step: 14 ÷ 2 = Q(7) R(0)
2nd Step: 7 ÷ 2 = Q(3) R (1)
3rd Step: 3 ÷ 2 = Q(1) R (1)
6th Step: 1 ÷ 2 = Q(0) R (1)

Decimal No Quotient Remainder

14 ÷ 2 7 0

7÷2 3 1

3÷2 1 1

1÷2 0 1
Convert Decimal Fraction to Binary
There is a simple method to find the equivalent binary representation
of a decimal fractional number. The steps to convert Decimal
Fraction to Binary Number are given number:

1. Multiply the given decimal fraction number by 2.


2. Note down the Integer Part and multiply the fraction part.
3. Repeat Step 2 until the fractional part is 0 and note down all the
integer part.
4. Now write the numbers from bottom to top.
Decimal Fraction to Binary Example
Question: Convert (0.59375) 1 0   to Binary
Answer: The Binary Representation of  (0.59375) 1 0  is (0.10011) 2
1. Multiply 0.59375 by 2. The result is 1.1875.   The integer part is
1, and the fractional part is 0.1875.  
2. Now take the fractional part 0.1875, multiply it by 2. The result
is 0.375.  The integer part is 0, and the fractional part is 0.375.
3. Now take the fractional part 0.375, multiply it by 2. The result
is 0.75.  The integer part is 0, and the fractional part is 0.75.
4. Now take the fractional part 0.75, multiply it by 2. The result is
1.5.  The integer part is 1, and the fractional part is 0.5.
5. Now take the fractional part 0.5, multiply it by 2. The result is
1.0.  The integer part is 0, and the fractional part is 0.
  Operation Result Integer Part Fractional part

0.59375 X 2 1.1875 1 0.1875

0.1875 X 2 0.375 0 0.375

0.375 X 2 0.75 0 0.75

0.75 X 2 1.5 1 0.5

0.5 X 2 1.0 1 0
Since we are just finding the fractional part, the integer part will
remain the same.

In most cases, the fractional part will never become zero; hence the
number can be represented only approximately – what results out of
the approximation is called round-off error

Binary of 0.125

Step 1

----------

We multiply 0.125 by 2 and take the integer part

0.125 x 2 = 0.250

Integer part = 0

Fractional part = 0.250

As, fractional part is not equal to 0 so we copy it to next step.


Step 2

----------

We multiply 0.250 by 2 and take the integer part

0.250 x 2 = 0.500

Integer part = 0

Fractional part = 0.500

As, fractional part is not equal to 0 so we copy it to next step.

Step 3

----------

We multiply 0.500 by 2 and take the integer part

0.500 x 2 = 1.000

Integer part = 1

Fractional part = 0

Now the fractional part is 0 so, we stop here.

Convert decimal number 10.16 into binary form


First we convert the integer part 10 into binary.

Step 1
----------------

Dividend = 10

Divisor = 2

Quotient = 5

2 ) 10 ( 5

10

----

Dividing 10 by 2 we will get 0 as remainder.

So, 1st remainder = 0

Dividend for step 2 = quotient of step 1

So, dividend for step 2 = 5

Step 2

----------------

Dividend = 5

Divisor = 2

Quotient = 2

2)5(2
4

----

Dividing 5 by 2 we will get 1 as remainder.

So, 2nd remainder = 1

Dividend for step 3 = quotient of step 2

So, dividend for step 3 = 2

Step 3

----------------

Dividend = 2

Divisor = 2

Quotient = 1

2)2(1

----

Dividing 2 by 2 we will get 0 as remainder.

So, 3rd remainder = 0


Dividend for step 4 = quotient of step 3

So, dividend for step 4 = 1

Step 4

-----------------

Dividend = 1

As, dividend is less than 2 so, we will stop here and copy the dividend as the
last remainder.

So, 4th remaider = 1

The calculated remainder are as followed.


1st remainder = 0
2nd remainder = 1
3rd remainder = 0
4th remainder = 1
To find the binary we have to scan the remainder from bottom.
So, 10(base 10) = 1010(base 2)
Alternatively, (10)10 = (1010)2
Where, (base 10) means the number is in decimal number system and (base 2)
means the number is in binary number system.
Now, we will convert the fractional part 0.16 into binary.

Binary of 0.16

Step 1

----------

We multiply 0.16 by 2 and take the integer part


0.16 x 2 = 0.32

Integer part = 0

Fractional part = 0.32

As, fractional part is not equal to 0 so we copy it to next step.

Step 2

----------

We multiply 0.32 by 2 and take the integer part

0.32 x 2 = 0.64

Integer part = 0

Fractional part = 0.64

As, fractional part is not equal to 0 so we copy it to next step.

Step 3

----------

We multiply 0.64 by 2 and take the integer part

0.64 x 2 = 1.28

Integer part = 1

Fractional part = 0.28


As, fractional part is not equal to 0 so we copy it to next step.

Step 4

----------

We multiply 0.28 by 2 and take the integer part

0.28 x 2 = 0.56

Integer part = 0

Fractional part = 0.56

As, fractional part is not equal to 0 so we copy it to next step.

Step 5

----------

We multiply 0.56 by 2 and take the integer part

0.56 x 2 = 1.12

Integer part = 1

Fractional part = 0.12

As, fractional part is not equal to 0 so we copy it to next step.

Step 6

----------
We multiply 0.12 by 2 and take the integer part

0.12 x 2 ...

in this case, we have 5 digits as answer and the fractional part is still not 0 so,
we stop here.

The calculated integer part are as followed.


Step 1: 0
Step 2: 0
Step 3: 1
Step 4: 0
Step 5: 1
...
To find the binary we have to scan the integer part from top
So, 0.16(base 10) = 0.00101...(base 2)
Alternatively, (0.16)10 = (0.00101...)2
Or, (0.16)10 = (0.00101)2 (approx. value)
Where, (base 10) means the number is in decimal number system and (base 2)
means the number is in binary number system.
Now, to get the binary of the decimal number 10.16 we have to merge the two
binary results. (10)10 = (1010)2
(0.16)10 = (0.00101...)2
So, (10.16)10 = (1010.00101...)2
or, (10.16)10 = (1010.00101)2 (approx. value)

Binary to Decimal Conversion Chart

The binary to decimal conversion of the first 20 decimal numbers is displayed


in the chart given below.

Binary Decimal

0 0

1 1
10 2

11 3

100 4

101 5

110 6

111 7

1000 8

1001 9

1010 10

1011 11

1100 12

1101 13

1110 14

1111 15

10000 16

10001 17

10010 18

10011 19

10100 20

Binary to Decimal Converter


In the above sections, we have learned different methods to convert binary to
decimal. Check out this binary to decimal converter to verify the results for the
manual calculations done to convert a number given in binary number system to
its equivalent in decimal number system- Binary to Decimal Converter

Binary to Decimal Solved Examples

 Example 1: Find the decimal value of the binary


number (11001011)2(11001011)2 using the positional notation method of
binary to decimal conversion.

Solution:

By the positional notation of binary to decimal conversion, we multiply


every digit in the binary number with its base raised to the power based on
its position. This is done by starting from the rightmost digit and moving on
to the left and summing up all the values.

In the binary to decimal conversion shown below, we start from the right and
move towards the left.

(11001011)2(11001011)2 = (1 × 20)+ (1 × 21)+ (0 × 22)+ (1 × 23) + (0 × 24) +


(0 × 25) + (1 × 26) + (1 × 27)
= (1 × 1) + (1 × 2) + (0 × 4) + (1 × 8) + (0 × 16) + (0 × 32) + (1 × 64) + (1 ×
128)
= 1 + 2 + 0 + 8 + 0 + 0 + 64 +128
= 203

Therefore, (11001011)2(11001011)2 = (203)10(203)10

 Example 2: Using the doubling method of binary to decimal


conversion, find the decimal value of (10101101)2(10101101)2.

Solution:

For the binary to decimal conversion of a number using the doubling


method, we use the following steps:

 Step 1: Write the binary number and start from the left-most digit.
Take the doubled value of the previous digit and add it with the current
digit. Since in the binary number 101011012101011012, '1' is the left-
most digit and there is no previous number, the doubled value is 0. Now,
adding it with the current value which is 1, we get (0 × 2) + 1, which is 1.
 Step 2: Follow the same step as described in step 1 for all the
numbers as you move on to the right.
 Step 3: Finally, the sum that is achieved in the last step is the
decimal equivalent of the binary value.

The steps that were discussed above for the binary to decimal conversion are
shown below:

 Example 3: Using the binary to decimal conversion method, find out


if (159)10 is the decimal equivalent of (10011111)2(10011111)2.

Solution:

To find if (159)10 is the decimal equivalent of (10011111)2(10011111)2, let us


do the conversion from binary to decimal.
In the conversion from binary to decimal shown below, we start from the
right most digit and move to the left.

(10011111)2(10011111)2 = (1 × 20) + (1 × 21) + (1 × 22)+ (1 × 23)+ (1 × 24) +


(0 × 25) + (0 × 26) + (1 × 27)
= (1 × 1) + (1 × 2) + (1 × 4) + (1 × 8) + (1 × 16) + (0 × 32) + (0 × 64) + (1 ×
128)
= 1 + 2 + 4 + 8 + 16 + 0 + 0 + 128
= 159.

Therefore, the binary to decimal conversion


of (10011111)2(10011111)2 results in (159)10(159)10.

Convert Decimal to Octal

To convert decimal to octal number, there are two methods of conversions. The
first method is to convert the decimal number to another number system i.e.
binary or hexadecimal and finally convert it to octal. The second method is the
direct method where we convert decimal to octal directly. Let see both the
methods:

Method 1: Convert Decimal to Binary to Octal

In this method, a decimal number can be converted to a binary number by


dividing the given number by 2 until we obtain a quotient as 1. The numbers are
written from downwards to upwards. Once the binary number is obtained, we
convert that into an octal number. Let us understand this using an example.
Convert the decimal number (45)10(45)10 to an octal number.

Step 1: First, we convert the decimal number (45)10(45)10 to a binary number.


We divide 45 by the binary base number i.e. 2 until we obtain the quotient as 1.
Therefore, the decimal number (45)10(45)10 = (101101)2(101101)2.

Step 2: Once we have obtained the binary number, we can convert this number
to an octal number by using the binary to the octal conversion table.

With the help of the above table, we first write the number into its 3-bit binary
number as a zero needs to be added before digits to form the 3-bit binary
number. Hence, the 3-bit binary number is 101 and 101. Looking at the same
table above we can convert these binary numbers to their octal numbers to
derive the final number. Hence, the numbers are 5 and 5.
Therefore, (101101)2(101101)2 = (55)8(55)8.

Step 3: Once we have obtained the octal number, the conversion from decimal
to octal can be written as: (45)10(45)10 = (55)8(55)8.

Method 2: Convert Decimal to Octal

In this method, the decimal number is divided by 8, each time a reminder is


obtained from the previous digit. The first remainder obtained is the least
significant digit(LSD) and the last remainder is the most significant digit(MSD).
Once the quotient is less than 8, we obtain the octal number by writing the
remainder in reverse order. Let us understand the conversion with the help of an
example. Convert the decimal number (350)10(350)10 to an octal number.

Step 1: Check if the decimal number is less than 8. If yes, the octal number is
the same. If no, then proceed forward. In this case, 350 is more than 8 so let's go
to step 2.

Step 2: Divide 350 by 8 (octal base number). Note down the quotient and the
remainder in the quotient-remainder form. Repeat this process (dividing the
quotient again by 8) until we get the quotient to be less than 8.

Step 3: Once we obtain the quotient to be less than 8 we stop dividing to derive
at the octal number. The octal number is considered by reading all the
remainders and the last quotient from bottom to top.
Therefore, (350)10(350)10 = (536)8(536)8.

Convert Decimal to Octal With Decimal Point

To convert decimal to octal with a decimal point, we calculate the decimal


number in two parts. First, we calculate the integer part of the decimal point by
dividing the octal base number i.e. 8 until the quotient is less than 8. The second
part is calculated on the fraction part of the decimal number where the number
is multiplied with the base number 8 until the fractional part is equal to zero.
Here, once multiplied we keep the integer part separate and the fractional part
separate. The final octal number is calculated by adding both the integer and the
fractional number. Let us look at an example step-wise to understand this better.
Convert the decimal number (29.45)10(29.45)10 to an octal number.

Step 1: Separate the decimal number into two parts - the integer and the
fractional. So, 29.45 = 29 + 0.45.

Step 2: Convert the integer part of the number first. So, we begin with 29 first
by dividing it by the base number 8 until the quotient is less than 8.

Division by 8 Quotient Remainder

29/8 3 5

3/8 0 3

Hence, 29 is 35 in an octal number.

Step 3: Once the integer octal number is obtained, we proceed to the fractional
part. So, 0.45 is multiplied by 8 (octal base number) where the result is again
divided into its integer part and fractional part. The number is multiplied by 8
until the fractional part is equal to zero.

Multiplied by 8 Result Integer part Fractional part

0.45 × 8 3.6 3+ 0.6

0.6 × 8 4.8 4+ 0.8

0.8 × 8 6.4 6+ 0.4

0.4 × 8 3.2 3+ 0.20

0.20 × 8 1.60 1+ 0.60

0.60 × 8 4.80 4+ 0.80

0.80 × 8 6.40 6+ 0.40

Write all the integer part from top to bottom that derives the octal number of the
fractional number. Hence, 0.45 = 0.3463146.

Step 4: Add both the integer and the fractional part together to obtain the octal
number. Hence, 35 + 0.3463146 = 35.3463146.

Therefore, (29.45)10(29.45)10 = (35.3463146)8(35.3463146)8.

Octal to Decimal
Steps to Convert Octal to Decimal

As with any other conversion in the number system, octal to decimal conversion
is also done by using its base number. To convert octal to decimal, we need to
multiply the octal digits with the power of 8 starting from the right-hand side
and gradually decreasing to zero to sum up, all the products. Here are the steps
to convert a number from octal to decimal:

 Step 1: Since an octal number only uses digits from 0 to 7, we first


arrange the octal number with the power of 8.
 Step 2: We evaluate all the power of 8 values such as 80 is 1, 81 is 8, etc.,
and write down the value of each octal number.
 Step 3: Once the value is obtained, we multiply each number.
 Step 4: Final step is to add the product of all the numbers to obtain the
decimal number.

Let us look at an example, convert (140)8(140)8 into a decimal number.

Step 1: Write 140 with the power of 8. Start from the right-hand side.

1 × 82 + 4 × 81 + 0 × 80

Step 2: Evaluate the power of 8 values for each octal number.

82 = 64, 81 = 8, 80 = 1

Step 3: Multiply each of the power of 8 numbers with the respective numbers.

1 × 64 + 4 × 8 + 0 × 1 = 64 + 32 + 0

Step 4: Add the values to obtain the decimal number.

64 + 32 + 0 = 96.

Therefore, (140)8(140)8 = (96)10(96)10.
Convert Octal to Decimal With Decimal Point
To convert octal to decimal number with a decimal point, we need to follow the same
procedure as did in the previous section. However, the power or the exponents of 8 will vary
after the decimal point. Since we are moving towards the right-hand side with
the exponents increasing, the exponents after the decimal point will decrease or be negative.
Let us look at an example.

Convert (246.28)8(246.28)8 into a decimal number. We will follow the same steps as before.

Step 1: Write 140 with the power of 8. Start from the right-hand side. Here, the power of 8
will be negative after the decimal point.

2 × 82 + 4 × 81 + 6 × 80 + 2 × 8-1 + 8 × 8-2

Step 2: Evaluate the power of 8 values for each octal number.

82 = 64, 81 = 8, 80 = 1, 8-1 = 1/8, 8-2 = 1/82 or 1/64

Step 3: Multiply each of the power of 8 numbers with the respective numbers.

2 × 64 + 4 × 8 + 6 × 1 + 2 × 1/8 + 8 × 1/64 = 128 + 32 + 6 + 0.25 + 0.125

Step 4: Add the values to obtain the decimal number.

128 + 32 + 6 + 0.25 + 0.125 = 166.375.

Therefore, (246.28)8(246.28)8 = (166.375)10(166.375)10.
Conversion from Binary to Octal number system
Octal number system provides convenient way of converting large binary
numbers into more compact and smaller groups. There are various ways to
convert a binary number into octal number. You can convert using direct
methods or indirect methods. First, you need to convert a binary into other base
system (e.g., into decimal, or into hexadecimal). Then you need to convert it
octal number.

Most Significant Bit (MSB) Octal Point Least Significant Bit (LSB)

82 81 80 8-1 8-2 8-3

64 8 1 1/8 1/64 1/512

Since number numbers are type of positional number system. That means
weight of the positions from right to left are as 8 0, 81, 82, 83 and so onfor the
integer part and weight of the positions from left to right are as 8 -1, 8-2, 8-3and so
on.for the fractional part.
Example − Convert binary number 10010110 into octal number.
First convert this into decimal number
= (10010110)2
= 1x27+0x26+0x25+1x24+0x23+1x22+1x21+0x20
= 128+0+0+16+0+4+2+0
= (150)10
Then, convert it into octal number
= (150)10
= 2x82+2x81+6x80
= (226)8 which is answer.
However, there is also a direct method to convert a binary number into octal
number − grouping which is explained as following below.
Using Grouping
Since, there are only 8 digits (from 0 to 7) in octal number system, so we can
represent any digit of octal number system using only 3 bit as following below.

Octal Digit Value Binary Equivalent

0 000

1 001

2 010

3 011

4 100

5 101

6 110

7 111

So, if you make each group of 3 bit of binary input number, then replace each
group of binary number from its equivalent octal digits. That will be octal
number of given number number. Note that you can add any number of 0’s in
leftmost bit (or in most significant bit) for integer part and add any number of
0’s in rightmost bit (or in least significant bit) for fraction part for completing
the group of 3 bit, this does not change value of input binary number.
So, these are following steps to convert a binary number into octal number.
 Take binary number
 Divide the binary digits into groups of three (starting from right) for
integer part and start from left for fraction part.
 Convert each group of three binary digits to one octal digit.
This is simple algorithm where you have to grouped binary number and replace
their equivalent octal digit.
Example-1 − Convert binary number 1010111100 into octal number. Since
there is no binary point here and no fractional part. So,

Therefore, Binary to octal is.


= (1010111100)2
= (001 010 111 100)2
= (1 2 7 4)8
= (1274)8
Example-2 Convert binary number 0110 011.1011 into octal number. Since
there is binary point here and fractional part. So,
Therefore, Binary to octal is.
= (0110 011.1011)2
= (0 110 011 . 101 1)2
= (110 011 . 101 100)2
= (6 3 . 5 4)8
= (63.54)8
These are above simple conversions binary number to octal number.
Conversion from Octal to Binary number system
There are various direct or indirect methods to convert a octal number into
binary number. In an indirect method, you need to convert an octal number into
other number system (e.g., decimal or hexadecimal), then you can convert into
binary number by converting each digit into binary number from hexadecimal
system and using conversion system from decimal to binary number.
Example − Convert octal number 205 into binary number.
First convert it into decimal or hexadecimal number,
= (205)8
= (2x82+0x81+5x80)8
or (010 000 101)2
Because base of octal and hexadecimal are 8 and 16 respectively.
= (133)10
or (0 1000 0101)2
= (133)10 or (85)16
Then convert it into binary number by converting each digit.
= (1x27+0x26+0x25+0x24+0x23+1x22+0x21+1x20)2
or (1000 0101)2
= (10000101)2
However, there is a simple direct method to convert an octal number to binary
number. Since there are only 8 symbols (i.e., 0, 1, 2, 3, 4, 5, 6, and 7) in octal
representation system and its base (i.e., 8) is equivalent of 23=8. So, you can
represent each digit of octal in group of 3 bits in binary number.

Octal Symbol Binary equivalent

0 000

1 001

2 010

3 011

4 100

5 101

6 110

7 111

This method is simple and also works as reverse of Binary to Octal Conversion.
The algorithm is explained as following below.

 Take Octal number as input


 Convert each digit of octal into binary.
 That will be output as binary number.
Example-1 Convert octal number 540 into binary number.
According to above algorithm, equivalent binary number will be,
= (540)8
= (101 100 000)2
= (101100000)2
This is very simple conversion, you can use for mixed (integer with fractional)
octal number as well.
Example-2 − Convert octal number 352.563 into binary number.
According to above algorithm, equivalent binary number will be,
= (352.563)8
= (011 101 010 . 101 110 011)2
= (011101010.101110011)2
Conversion from Decimal to Hexadecimal number system
There are various direct or indirect methods to convert a decimal number into
hexadecimal number. In an indirect method, you need to convert a decimal
number into other number system (e.g., binary or octal), then you can convert
into hexadecimal number by using grouping from binary number system and
converting each octal digit into binary then grouping and convert these into
hexadecimal number.
Example − Convert decimal number 105 into hexadecimal number.
First convert it into binary or octal number,
= (100)10
= (1x26+1x25+0x24+0x23+1x22+0x21+0x20)10 or (1x82+4x81+4x80)10
Because base of binary and octal are 2 and 8 respectively.
= (1100100)2 or (144)8
Then convert each digit of octal number into 3 bit of binary number, then use
grouping of 4 bit of binary number.
= (1100100)2 or (001 100 100)2
= (110 0100)2
= (0110 0100)2
= (6 4)16
= (64)16
However, there are two direct methods are available for converting a decimal
number into Hexadecimal number − Converting with Remainders and
Converting with Division. These are explained as following below.
(a) Converting with Remainders (For integer part)
This is a straightforward method which involve dividing the number to be
converted. Let decimal number is N then divide this number from 16 because
base of hexadecimal number system is 16. Note down the value of remainder,
which will be: 0 to 15 (replace 10, 11, 12, 13, 14, 15 by A, B, C, D, E, F
respectively). Again divide remaining decimal number till it became 0 and note
every remainder of every step. Then write remainders from bottom to up (or in
reverse order), which will be equivalent hexadecimal number of given decimal
number. This is procedure for converting an integer decimal number, algorithm
is given below.
 Take decimal number as dividend.
 Divide this number by 16 (16 is base of hexadecimal so divisor here).
 Store the remainder in an array (it will be: 0 to 15 because of divisor 16,
replace 10, 11, 12, 13, 14, 15 by A, B, C, D, E, F respectively).
 Repeat the above two steps until the number is greater than zero.
 Print the array in reverse order (which will be equivalent hexadecimal
number of given decimal number).
Note that dividend (here given decimal number) is the number being divided,
the divisor (here base of hexadecimal, i.e., 16) in the number by which the
dividend is divided, and quotient (remaining divided decimal number) is the
result of the division.
Example − Convert decimal number 540 into hexadecimal number.
Since given number is decimal integer number, so by using above algorithm
performing short division by 16 with remainder.

Division Remainder (R)

540 / 16 = 33 12 = C

33 / 16 = 2 1

2 / 16 = 0 2

0 / 16 = 0 0
Now, write remainder from bottom to up (in reverse order), this will be 021C
(or only 21C) which is equivalent hexadecimal number of decimal integer 540.
But above method can not convert fraction part of a mixed (a number with
integer and fraction part) hexadecimal number. For decimal fractional part, the
method is explained as following below.
(b) Converting with Remainders (For fractional part)
Let decimal fractional part is M then multiply this number from 16 because base
of hexadecimal number system is 16. Note down the value of integer part,
which will be − 0 to 15 (replace 10, 11, 12, 13, 14, 15 by A, B, C, D, E, F
respectively). Again multiply remaining decimal fractional number till it
became 0 and note every integer part of result of every step. Then write noted
results of integer part, which will be equivalent fraction hexadecimal number of
given decimal number. This is procedure for converting an fractional
decimal number, algorithm is given below.
 Take decimal number as multiplicand.
 Multiple this number by 16 (16 is base of hexadecimal so multiplier
here).
 Store the value of integer part of result in an array (it will be: 0 to 15,
because of multiplier 16, replace 10, 11, 12, 13, 14, 15 by A, B, C, D, E,
F respectively).
 Repeat the above two steps until the number became zero.
 Print the array (which will be equivalent fractional hexadecimal number
of given decimal fractional number).
Note that a multiplicand (here decimal fractional number) is that to be
multiplied by multiplier (here base of hexadecimal, i.e., 16)
Example − Convert decimal fractional number 0.06640625 into hexadecimal
number.
Since given number is decimal fractional number, so by using above algorithm
performing short multiplication by 16 with integer part.

Multiplication Resultant integer part

0.06640625 x 16=1.0625 1

0.0625 x 16 =1.0 1
Multiplication Resultant integer part

0 x 16=0.0 0

Now, write these resultant integer part, this will be approximate 0.110 which is
equivalent hexadecimal fractional number of decimal fractional 0.06640625.
Converting with Division
This method is guessing hexadecimal number of a decimal number. You need to
draw a table of power of 16, For integer part, The algorithm is explained as
following below.
 Start with any decimal number.
 List the powers of 16.
 Divide the decimal number by the largest power of 16.
 Find the remainder.
 Divide the remainder by the next power of 16.
 Repeat until you've found the full answer.
Example − Convert decimal number 380 into hexadecimal number.
According to above algorithm, table of power of 16,

Decimal 163=4096 162=256 161=16 160=1

Hexadecimal Digit 0 1 7 C

Divide the decimal number by the largest power of 16.


= 380 / 256 = 1.484375
So 1 will be first digit or most significant bit (MSB) of hexadecimal number.
Now, remainder will be,
= 380 - 1256 =124
Now, divide this

remainder by the next power of 16.


= 124 / 16 = 7.75
So 7 will be next digit or second most significant bit (MSB) of hexadecimal
number.
Now, remainder will be,
= 124 - 716 = 12
Because remainder 12(= C) is less than base 16, so C(=12) will be ast (least
significant) bit of required hexadecimal number.
Therefore, 17C will be equivalent hexadecimal number of given decimal
number 380

Conversion from Hexadecimal to Decimal number system


There are various indirect or direct methods to convert a hexadecimal number
into decimal number. In an indirect method, you need to convert a hexadecimal
number into binary or octal number, then you can convert it into decimal
number.
Example − Convert hexadecimal number F1 into decimal number.
First convert it into binary or octal number,
= (F1)16
= (1111 0001)2 or (011 110 001)2
Because in binary, value of F and 1 are 1111 and 0001 respectively. Then
convert it into decimal number multiplying power of its position of base.
= (1x27+1x26+1x25+1x24+0x23+0x22+0x21+1x20)10
or (3 6 1)8

= (1x27+1x26+1x25+1x24+0x23+0x22+0x21+1x20)10 or (3x82+6x81+1x80)10
= (241)10
However, there is a simple direct method to convert a hexadecimal number to
decimal number. Since, there are only 16 digits (from 0 to 7 and A to F) in
hexadecimal number system, so we can represent any digit of hexadecimal
number system using only 4 bit as following below.

Hexa 0 1 2 3 4 5 6 7
Binary 0000 0001 0010 0011 0100 0101 0110 0111

Hexa 8 9 A=10 B=11 C=12 D=13 E=14 F=15

Binary 1000 1001 1010 1011 1100 1101 1110 1111

Hexadecimal number system provides convenient way of converting large


binary numbers into more compact and smaller groups. These are weights of
hexadecimal of respective position of hexadecimal (value of base is 16).

Most Significant Bit (MSB) Hexa Point Least Significant Bit (LSB)

162 161 160 16-1 16-2 16-3

256 16 1 1/16 1/256 1/4096

Since number numbers are type of positional number system. That means
weight of the positions from right to left are as 16 0, 161, 162, 163and so on. for
the integer part and weight of the positions from left to right are as 16 -1, 16-2, 16-
3
and so on. for the fractional part.
You can directly convert a hexadecimal number into decimal number using
reverse method of decimal to hexadecimal number.
Assume any unsigned hexadecimal number is hnh(n-1) ... h1h0.h-1h-2 ... h(m-1)hm.
Then the decimal number is equal to the sum of hexadecimal digits (hn) times
their power of 16 (16n), i.e.,
= hnh(n-1) ... h1h0.h-1h-2 ... h(m-1)hm
= hnx16n+h(n-1)x16(n-1)+ ... +h1x161+h0x160+h-1x16-1+h-2x16-2+ ... +h(m-1)x16-(m-1)+h-
-m
mx16

This is simple algorithm where you have to multiply positional value of binary
with their digit and get the sum of these steps.
Example-1 − Convert hexadecimal number ABCDEF into decimal number.
Since value of Symbols − A, B, C, D, E, F are 10, 11, 12, 13, 14, 15
respectively. Therefore equivalent decimal number is,
= (ABCDEF)16
= (10x165+11x164+12x163+13x162+14x161+15x160)10

= (10485760+720896+49152+3328+224+15)10
= (11259375)10 which is answer.
Example-2 − Convert hexadecimal number 1F.01B into decimal number.
Since value of Symbols: B and F are 11 and 15 respectively. Therefore
equivalent decimal number is,
= (1F.01B)16
= (1x161+15x160 +0x16-1+1x16-2+11x16-3)10
= (31.0065918)10 which is answer.
Conversion from Binary to Hexadecimal number system
Hexadecimal number system provides convenient way of converting large
binary numbers into more compact and smaller groups. There are various ways
to convert a binary number into hexadecimal number. You can convert using
direct methods or indirect methods. First, you need to convert a binary into
other base system (e.g., into decimal, or into octal). Then you need to convert it
hexadecimal number.

Most Significant Bit (MSB) Hexa Point Least Significant Bit (LSB)

162 161 160 16-1 16-2 16-3

256 16 1 1/16 1/256 1/4096

Since number numbers are type of positional number system. That means
weight of the positions from right to left are as 16 0, 161, 162, 163and so on. for
the integer part and weight of the positions from left to right are as 16 -1, 16-2, 16-
3
and so on. for the fractional part.
Example − Convert binary number 1101010 into hexadecimal number.
First convert this into decimal number:
= (1101010)2
= 1x26+1x25+0x24+1x23+0x22+1x21+0x20
= 64+32+0+8+0+2+0
= (106)10
Then, convert it into hexadecimal number
= (106)10
= 6x161+10x160
= (6A)16 which is answer.
However, there is also a direct method to convert a binary number into
hexadecimal number − grouping which is explained as following below.
Using Grouping
Since, there are only 16 digits (from 0 to 7 and A to F) in hexadecimal number
system, so we can represent any digit of hexadecimal number system using only
4 bit as following below.

Hexa 0 1 2 3 4 5 6 7

Binary 0000 0001 0010 0011 0100 0101 0110 0111

Hexa 8 9 A B C D E F

Binary 1000 1001 1010 1011 1100 1101 1110 1111

So, if you make each group of 4 bit of binary input number, then replace each
group of binary number from its equivalent hexadecimal digits. That will be
hexadecimal number of given number. Note that you can add any number of 0’s
in leftmost bit (or in most significant bit) for integer part and add any number of
0’s in rightmost bit (or in least significant bit) for fraction part for completing
the group of 4 bit, this does not change value of input binary number.
So, these are following steps to convert a binary number into hexadecimal
number.
 Take binary number
 Divide the binary digits into groups of four (starting from right) for
integer part and start from left for fraction part.
 Convert each group of four binary digits to one hexadecimal digit.
This is simple algorithm where you have to grouped binary number and replace
their equivalent hexadecimal digit.
Example-1 − Convert binary number 1010101101001 into hexadecimal
number. Since there is no binary point here and no fractional part. So,

Therefore, Binary to hexadecimal is,


= (1010101101001)2
= (1 0101 0110 1001)2
= (0001 0101 0110 1001)2
= (1 5 6 9)16
= (1569)16
Example-2 − Convert binary number 001100101.110111 into hexadecimal
number. Since there is binary point here and fractional part. So,

Therefore, Binary to hexadecimal is,


= (001100101.110111)2
= (0 0110 0101 . 1101 1100)2
= (0110 0101 . 1101 1100)2
= (6 5 . D C)16
= (65.DC)16
These are above simple conversions binary number to hexadecimal number.

How to Convert Hex to Binary


Converting from hex to binary is straightforward since hexadecimal numbers
are simplified versions of binary strings. You just need to remember that each
hex value will produce four binary digits.
 Step 1: Write down the hex number. If there are any, change the hex
values represented by letters to their decimal equivalents.
 Step 2: Each hex digit represents four binary digits and therefore is equal
to a power of 2. The rightmost digit equals to 20 (1), the next one equals to
21 (2), the next one equals to 22 (4) and the leftmost one equals to 23 (8). Write
these numbers (8, 4, 2 and 1) below the hex values.
 Step 3: Determine which powers of two (8, 4, 2 or 1) sum up to your hex
digits. For example, if one of your hex values is 10, this means 8 and 2 sum
up to 10 (4 and 1 are not used). If your hex number is 2, only 2 is used; 8, 4
and 1 are not.
 Step 4: Write down 1 below those 8, 4, 2 and 1’s that are used. Write
down 0 below those that are not used.
 Step 5: Read the 1’s and 0’s from left to right to get the binary
equivalent of the given hex number.
Let's apply these steps to the hex number (4FA)16

Step 1:
4 F A
4 15 10

Step 2:
4 F A
4 15 10
8421 8421 8421

Step 3:
4 F A
4 5 10
8421 8421 8421
(Notice the bold digits sum up to the hex value above. So the bold digits are 1
and the others are 0.)

Step 4:
4 F A
4 15 10
8421 8421 8421
0100 1111 1010

Step 5: (4FA)16 = (10011111010)2

Hex to binary conversion examples

Example 1: (2C1)16 = (1011000001)2


2 C 1
2 12 1
8421 8421 8421
0010 1100 0001

Example 2: (9DB2)16 = (1001110110110010)2


9 D B 2
9 13 11 2
8421 8421 8421 8421
1001 1101 1011 0010

OCTAL to HEXADECIMAL conversion


Before understanding the concept of octal to hexadecimal conversion we must
have some idea about octal and hexadecimal number system…
Octal number system
An octal system or it is called the base eight system .The digits in octal maths
are 0,1,2,3,4,5,6,7.The value of “!” is written as eight and 0 as ones or 108 .
Hexadecimal number system
In the hexadecimal,we need to have the digits from 0 through 15.for this single
solitary digits are required that stands for the values of 11,12,13,14,15 i.e.in
counting the hexadecimal the sixteen hexadecimal numerals are-
0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F
In other words A is 10 in regular basis,B is 11,c is 12 and so on…
OCTAL TO HEXADECIMAL conversion

octal to hexadecimal conversion


While converting from  octal to  hexadecimal unit, it is a usual practice to
convert the octal to hexadecimal by converting the octal number into binary
digit and then further to from binary to hexadecimal.For example to convert the
number 536 from octal to hexadecimal.
Example:

Convert 536 from octal to  hexadecimal number


Convert 536(octal) into its binary equivalent we get
(536)8 = (101) (011) (110)
=(101011110)2
Now forming the group of 4 binary bits to obtain its hexadecimal equivalent,
(101011110)2= (0001) (0101) (1110)
= (15E)16
So the hexadecimal number of 536 is 15E.
Hexadecimal to Octal Conversion
There are two hex to octal conversion methods. They are:
Method 1
You cannot convert a hexadecimal number to octal decimal number directly.
First, you will have to convert the hexadecimal number to its decimal equivalent
and then convert the decimal equivalent to octal decimal number. To understand
better, follow the steps given below.
 Note down the given hexadecimal number
 Count the number of digits and note down the number of digits in the
number
 Multiply each digit with 16x-1, if x is the position of the digit from the
right end.
 Find the sum of the terms after multiplication
 The result what is obtained is in the equivalent decimal form
 Divide the obtained decimal number with 8
 Write down the value of the remainder
 Repeat step 6 and step 7 with the quotient, until the value of the quotient
is zero
 Note the remainders in reverse order
 The number that is obtained is the required result.
Method 2
That was method 1. In case you find that difficult, you can also follow the other
method to find the octal decimal value of a hexadecimal number. We know that
the hexadecimal number comprises of binary digits. In this method, you can
combine these binary digits in the pairs of three and you can relate them to the
octal numbers. The steps involved in this method are given below.
 For every given hexadecimal number’s digit, note down the number
equivalent to the binary number.  Add 0’s to the left side, if any of the
binary equivalents are less than 4 digits.
 Next, combine the numbers and make the groups of binary digits from
right to left, each containing 3 digits. In case there are less than 3 digits in
the last group, add 0’s to the group.
 Find the value equivalent to the octal numbers of each binary group.
Below are the Hexadecimal to Octal Conversion Examples
Question 1: Convert the following hexadecimal number to octal number 2CD16.
Answer:  Given, 
2CD16 is a hexadecimal number.
2 → 0010, C →1100, D → 1101, 
Now you will be grouping them from right to left, each having 3 digits.
001, 011, 001, 101
001→1,  011 →3, 001→1, 101→5
Hence, 2CD16 = 13158

Question 2: Convert the following hexadecimal number to octal number 3EC16.


Answer:  Given, 
3EC16 is a hexadecimal number.
3 → 0010, E → 1110, C →1100, 
Now you will be grouping them from right to left, each having 3 digits.
001, 011, 101, 100
001→1,  011 →3, 101→5, 100→4
Hence, 3EC16 = 13548
Now that you’ve understood the hexadecimal to octal example problems, look
at the table given below for easier conversions. 

Hex to Octal Conversion Table

Hexadecima
Octal Equivalent Decimal Equivalent BInary
l

0 0 0 0

1 1 1 1

2 2 2 10

3 3 3 11

4 4 4 100

5 5 5 101

6 6 6 110

7 7 7 111

8 10 8 1000

9 11 9 1001

A 12 10 1010

B 13 11 1011

C 14 12 1100

D 15 13 1101
E 16 14 1110

F 17 15 1111

Let’s deep-dive into hexadecimal to octal questions.

Solved Examples
Question 1: What is the equivalent form of F216?
Solution 
F216 = ( F × 161 ) + ( 2 × 160 )
= F × 16 + 2 × 1
= 17 × 16 + 2
= 272 + 2
F216 = 272 (Decimal form)

         
272
8
         
34        ---- 0       
8
         
4          ---- 2       
8
4          ---- 4       

The octal number is 4208.

Therefore, F216 = 4208.

You might also like