Skip to main content

Octal and Hexadecimal Number

Complement of a Number   Types of Number system   Convert Decimal to Binary

If you are new to this article, I strongly recommend to read our previous article before preceding this. In our previous article, we had already seen that binary number has a base of 2. It means that binary number contains 21 = 2 combinations which are 0 and 1. Similarly, Octal and Hexadecimal number has a fixed number of combinations. As we earlier know that octal has a base 8, then it contains 8 digits through 0 to 7 which means 23 =8 combinations and Hexadecimal has a base 16 which means it has 24=16 combinations.

                If you are focusing on a sequence i.e. octal, hexadecimal. They are the combinations of increasing power of 2.

Octal – 23 , Hexadecimal - 24

This power indicates how many bits are in a number for a particular number system

Octal has 3 bits

Hexadecimal has 4 bits

This can be clear understand by following diagram-

 

Explain – In this diagram, first we consider decimal number up to 7

You can clearly seen in this diagram that binary numbers has 0 at its first position, so you can write or remove this 0. Now if you remove this 0 than it has remaining only 3 binary bits which are [ 000, 001, 010, 011, 100, 101,110,111 ] these are the binary representation of octal Numbers [ 0, 1, 2, 3, 4, 5, 6, 7]

Now consider after 7 Number, binary number contains 1 at its first position, so we cannot remove this at its position, if we do not remove 1 at its position it contains 4 binary bits which are [ 0000, 0001, 0010, 0011, 0100, 0101, 0110, 0111, 1000, 1001, 1010, 1011, 1100, 1101, 1110, 1111] and these are the binary representation of Hexadecimal Number [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F]

Now we are ready to convert binary to octal, octal to binary, binary to hexadecimal, hexadecimal to binary. The following example illustrates the procedure :

( 10 110 001 101 011 . 111 100 000 110)= (26153.7406)8

   2    6     1     5     3   .   7     4    0      6

Conversion from binary to hexadecimal is similar, except that the binary number is divided into groups of four digits :

(10 1100 0110 1011 . 1111 0010)2 = (2C6B.F2)16

  2     C      6       B   .    F       2

Conversion from octal or hexadecimal to binary is done by a procedure reverse to the above.Each octal digit is converted to its 3-digit binary equivalent. Similarly, each hexadecimal digit is converted to its 4-digit binary equivalent. This is illustrated in the following examples:

(673.124)= (110 111 011 . 001 010 100)2

(306.D)16 = (0011 0000 0110 . 1101)2


  


Comments

Popular posts from this blog

Complement of a Number

Subtraction of Binary Numbers  ;  Octal and Hexadecimal Number  ;  Convert Decimal to Binary Complements Complements are used in digital computers for simplifying the subtraction operation and for logical manipulations. There are two types of complements for each base-r system: (1) the r’s complement and (2) the (r-1)’s complement. When the value of the base is substituted, the two types receive the names 2’s and 1’s complement for binary numbers,  10’s and 9’s complement for decimal numbers. The r’s Complement Given a positive number N in base r with an integer part of n digits, the r’s complement of N is defined as r n   - N for N is not equal to 0 and 0 for N = 0. The following numerical example will help clarify the definition. The 10’s complement of (52520) 10 is 10 5 – 52520 = 47480 The number of digits in the number is n= 5 The 10’s complement of (0.3267) 10 is 1 – 0.3267 = 0.6733 No integer part, so 10 n = 10 0 = 1 The 10’s...

Rules of divisibility part -1

Rules of divisibility In Vedic mathematics, it can be determined whether any part of any other number can be given completely without dividing it by several methods. These methods are based on the law of divisibility. By using these rules, calculations related to factors, parts etc. are simplified. Law of divisibility by number 2 :- If unit digit of given number is divisible by 2 then the given number is divisible by 2 also.                                                                 or  If unit digit of given number is 0,2,4,6 or 8 , then given number is divisible by 2. Example :- 10 ,32 ,74 ,108 ,2058 etc. Law of divisibility by number 3 :- If the sum of digits of given number is divisible by 3, then the number is divisible by 3 also. Illustration 1:-  In 546532 sum of digits=5+4+6+5+3+2=25 25 is not divisible...