Ask your own question, for FREE!
Computer Science 19 Online
OpenStudy (anonymous):

how do i convert a 128 bit binary number into a decimal number

OpenStudy (anonymous):

depends on the codification. Generally the first half of bit codify the iinter portion and the second half the decimal. Pay attetion that The number counts with a bit to determinate if it's positive or negative

OpenStudy (shadowfiend):

Yeah, it really depends. The most common form of encoding a floating point number into a binary value is IEEE754. See http://en.wikipedia.org/wiki/IEEE_754 for the details of how that works (it's not trivial hehe).

OpenStudy (anonymous):

why it should be floating point number?

OpenStudy (shadowfiend):

No reason, but when it's not specified, that's often the case.

OpenStudy (shadowfiend):

Fixed point is remarkably complicated, actually :)

OpenStudy (anonymous):

i thought it will be just 101011010100...10101 128times but yeah it didn't say that

OpenStudy (shadowfiend):

Or, rather, doing arithmetic with a fixed-point representation. I had to do that in a kernel library once upon a time. It's not extra extra hard, but it makes your brain bed in unusual ways. Then again, floating point is way crazier, it just tends to have hardware support ;)

OpenStudy (anonymous):

When it's not specified and just a homework question, assume it's a positive integer; floating point is much much harder, and it would be have been mentioned in the question. Same goes for two's complement. Let's try and help him solve the easy question, and if that's not sufficient, he'll tell us.

OpenStudy (anonymous):

well i have to use muPAD to generate the two numbers

OpenStudy (anonymous):

actually i should have asked this first, how do you get two prime binary numbers? and then convert it.

OpenStudy (anonymous):

okay, so we can assume a positive integer. please ask about how to get a primary number in a separate thread. Make sure to _always_ include the information that you're using muPad; otherwise people wilil give you a general algorithm or code in a popular language like C or Java. Of course, if you prefer getting the general algorithm, that's fine.

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!