Conversions of binary number to
hexadecimal, Conversions of
hexadecimal to binary




                      http://improvec.blogspot.in/   1
Objective

On completion of this period, you would be able
 to know

  Conversion of a binary number to hexa
   decimal

  Conversion of a hexa decimal number to
   binary



               http://improvec.blogspot.in/   2
Recap


 Conversions of binary number to decimal




               http://improvec.blogspot.in/   3
Prerequisite

 Representation of Binary system

 Representation of Hexadecimal system

 Relationship between Binary and Hexadecimal




                 http://improvec.blogspot.in/   4
BINARY TO HEXADECIMAL




      http://improvec.blogspot.in/   5
Conversion of a binary number to
           hexadecimal number
METHOD 1

As base16 = 24, to convert a binary number to
  hexadecimal
 4-bit binary groups (each group contains 4
  binary bits) are formed in the binary number

 After forming the groups, each group of 4 binary
  bits is converted to its hexadecimal number


                  http://improvec.blogspot.in/       6
1.Convert the binary number 01101110 to
       its equivalent hexadecimal
Divide the given binary number into 4-bit binary
  groups

(01101110)2 = (0110) (1110)


           = 6E (hex)
     (01101110)2=(6E)16


                   http://improvec.blogspot.in/    7
2.Convert the binary number 1101001101 to its
            equivalent hexadecimal

  Forming of groups of 4-bits from right hand side
   to left

      (1101001101)2 = (11) (0100) (1101)
  We see that the group of the most significant
   binary bits
 contains only 2 binary bits

                   http://improvec.blogspot.in/       8
Convert the binary number 1101001101 to its
      equivalent hexadecimal (contd)

 This can be extended to 4 binary bits by adding
  zeros in MSB position

 If MSBs are extended by adding zeros the
  number remains unaffected

     (1101001101)2 = (0011) (0100) (1101)
                 = 34D (hex)
                  http://improvec.blogspot.in/      9
3. Convert the binary number 1011100.1000101
        to its equivalent hexadecimal

 The formation of grouping of binary bits which are
 after the binary point, is made from left to right

     1011100.1000101 = (101)(1100).(1000)(101)
                   = (0101)(1100).(1000)(1010)
                   = 5C.8A (hex)



                   http://improvec.blogspot.in/   10
Conversion of a binary number to
           hexadecimal number

METHOD 2

 First convert a binary number to decimal number

 Then convert the decimal number so obtained to
  hexadecimal number



                  http://improvec.blogspot.in/   11
1.Convert the binary number 101101 to its
          equivalent hexadecimal



101101 = 1*25 + 0*24 + 1*23 +1*22 + 0*21 +1*20
        = 32 + 0 + 8 + 4 +0 + 1
        = (45)10




                   http://improvec.blogspot.in/   12
Convert the binary number 101101 to its
     equivalent hexadecimal (contd)

Now convert 45 into hexadecimal number.

        division           remainder
     16 45
     16 2                  13 = D
        0                  2

             (45)10 = (2D)16
        Thus (101101)2 = (45)10 = (2D)16
                   http://improvec.blogspot.in/   13

Bin to hexa.22to23

  • 1.
    Conversions of binarynumber to hexadecimal, Conversions of hexadecimal to binary http://improvec.blogspot.in/ 1
  • 2.
    Objective On completion ofthis period, you would be able to know Conversion of a binary number to hexa decimal Conversion of a hexa decimal number to binary http://improvec.blogspot.in/ 2
  • 3.
    Recap  Conversions ofbinary number to decimal http://improvec.blogspot.in/ 3
  • 4.
    Prerequisite  Representation ofBinary system  Representation of Hexadecimal system  Relationship between Binary and Hexadecimal http://improvec.blogspot.in/ 4
  • 5.
    BINARY TO HEXADECIMAL http://improvec.blogspot.in/ 5
  • 6.
    Conversion of abinary number to hexadecimal number METHOD 1 As base16 = 24, to convert a binary number to hexadecimal  4-bit binary groups (each group contains 4 binary bits) are formed in the binary number  After forming the groups, each group of 4 binary bits is converted to its hexadecimal number http://improvec.blogspot.in/ 6
  • 7.
    1.Convert the binarynumber 01101110 to its equivalent hexadecimal Divide the given binary number into 4-bit binary groups (01101110)2 = (0110) (1110) = 6E (hex) (01101110)2=(6E)16 http://improvec.blogspot.in/ 7
  • 8.
    2.Convert the binarynumber 1101001101 to its equivalent hexadecimal  Forming of groups of 4-bits from right hand side to left (1101001101)2 = (11) (0100) (1101)  We see that the group of the most significant binary bits contains only 2 binary bits http://improvec.blogspot.in/ 8
  • 9.
    Convert the binarynumber 1101001101 to its equivalent hexadecimal (contd)  This can be extended to 4 binary bits by adding zeros in MSB position  If MSBs are extended by adding zeros the number remains unaffected (1101001101)2 = (0011) (0100) (1101) = 34D (hex) http://improvec.blogspot.in/ 9
  • 10.
    3. Convert thebinary number 1011100.1000101 to its equivalent hexadecimal The formation of grouping of binary bits which are after the binary point, is made from left to right 1011100.1000101 = (101)(1100).(1000)(101) = (0101)(1100).(1000)(1010) = 5C.8A (hex) http://improvec.blogspot.in/ 10
  • 11.
    Conversion of abinary number to hexadecimal number METHOD 2  First convert a binary number to decimal number  Then convert the decimal number so obtained to hexadecimal number http://improvec.blogspot.in/ 11
  • 12.
    1.Convert the binarynumber 101101 to its equivalent hexadecimal 101101 = 1*25 + 0*24 + 1*23 +1*22 + 0*21 +1*20 = 32 + 0 + 8 + 4 +0 + 1 = (45)10 http://improvec.blogspot.in/ 12
  • 13.
    Convert the binarynumber 101101 to its equivalent hexadecimal (contd) Now convert 45 into hexadecimal number. division remainder 16 45 16 2 13 = D 0 2 (45)10 = (2D)16 Thus (101101)2 = (45)10 = (2D)16 http://improvec.blogspot.in/ 13