Linggo, Marso 1, 2015

The Final Quarter: Confusing Conversions

              Really, converting is really confusing. It's easy once you are used to it. But the only way to master it is to practice and be careful. Always check the base. The most common case of mistakes is converting it wrongly. For example, you must convert a binary into a hexadecimal but you didn't notice that you turned it into a decimal. Here are the ways on how you can convert:
  • Binary - Decimal
          example: 11100111=_____  
                128 64 32 16 8 4 2 1
                   1   1   1    0   0 1 1 1
          The numbers above the binary are the powers of two. The numbers that point to 1 must be added together to get the decimal form.
           128+64+32+4+2+1=231
          Therefore, 11100111 is equal to 231.
  • Decimal - Binary
          example: 239=_____
          Subtract the highest power of two that is less than the binary from the binary. Continue on subtracting the powers of two from the binary, making sure that the difference is not negative. Whenever the power of two can be subtracted, put 1 under it, but if it can't be, put 0.
          128 64 32 16 8 4 2 1
            1     1   1    0  1  1 1 1
           In this case, 16 got a 0 under it because the difference of 32 and 47 (which you get from subtracting 239 to 64 and 128) is 15. And if you subtract 15 to 16, you'll get a negative one.
           So, 239=11101111
  • Binary - Hexadecimal
          example: 111001111101=_____
           Divide the binary every 4 bits starting from the right. For every set of bits, put the four lowest power of two from right to left. Add the ones which are pointed to 1.
           1110  0111  1101
           8421 8421 8421
        =   14      7      13
           Because the sum could only be up to 15, here are the corresponding values in hexadecimal:
         
          Therefore, 111001111101 is equal to E7D in hexadecimal.
   

0010 be continued...


Walang komento:

Mag-post ng isang Komento