Hexa to Decimal Conversion, Binary to Decimal Conversion?

  • Thread starter Thread starter kloong
  • Start date Start date
  • Tags Tags
    Binary
Click For Summary
SUMMARY

This discussion focuses on converting binary and hexadecimal numbers to decimal and binary formats, specifically addressing the conversion of the binary number 101010.0101B to decimal, the hexadecimal number 17DB.C to binary, and the two's complement representation of -101 in decimal. The correct approach for the binary to decimal conversion involves using powers of two for fractional parts, while the hexadecimal to binary conversion requires translating each hex digit to its binary equivalent. The discussion also highlights the importance of using IEEE floating point format for negative decimal numbers.

PREREQUISITES
  • Understanding of binary number representation
  • Familiarity with hexadecimal number system
  • Knowledge of two's complement representation
  • Basic concepts of IEEE floating point format
NEXT STEPS
  • Learn how to convert binary fractions to decimal using powers of two
  • Study hexadecimal to binary conversion techniques
  • Research two's complement representation for negative binary numbers
  • Explore IEEE floating point format for representing decimal numbers in binary
USEFUL FOR

Students studying computer science, software engineers working with low-level data representations, and anyone interested in understanding number system conversions in programming and digital electronics.

kloong
Messages
35
Reaction score
0

Homework Statement


1) How to convert 101010.0101B to decimal?

2) and Hexa number 17DB.C to Binary.

3) and lastly, -101 (decimal) to the 2's complement form.


Homework Equations





The Attempt at a Solution


for the first one, clearly my problem lies at .0101B. I thought it's 1X10^-2 + 1X10^-4. Is it correct?

for the second one, I am not sure what the answer is because of the ".C"

third, i know how to do 2's complement for those without negative. So how should i do those with negative sign?
 
Physics news on Phys.org
There isn't really a standard for decimals in binary - you normally use IEEE floating point format.
But I would interpret the digits after the decimal point to be 1/2, 1/4, 1/8 etc as you have done.
Again for 2, I would say the decimal is 0xC/0x10 = 12/16=0.75

This is a good explanation of twos complement http://en.wikipedia.org/wiki/Two's_complement
 
kloong said:
1) How to convert 101010.0101B to decimal?

You're on the right track, but use powers of two instead: 1X2^-2 + 1X2^-4.

You can check your answer with a decimal/binary converter (one that converts fractional values as well as integers), such as the one I've written: http://www.exploringbinary.com/binary-converter/

kloong said:
2) and Hexa number 17DB.C to Binary.

Do you know how to convert the 17DB part? There's a shortcut, and it involves writing out the binary equivalent of each hexadecimal digit. Once you know that, the .C part is similar.
 

Similar threads

Replies
4
Views
2K
  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 2 ·
Replies
2
Views
5K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 18 ·
Replies
18
Views
4K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 3 ·
Replies
3
Views
2K