![]() |
|
|
||
|
|||||||||||
| Computers, Electronics, Gaming & IT Building a new recording rig, breaking your Linux distro or stuck on your XBox game? This is the forum for you. |
Max's Latest fuck this computer oriented thing rant. FUCK...
| ||
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|
#1 | ||||||||||||||
|
Slow Money
|
BINARY FLOATING POINT MATH LONGHAND!
![]() im in a computer organization class, and missed the first class and a half. Im soooo lost ![]() I have no idea how/why biasing works with shit and what is going on ![]() anyone here good with that shit? wanna explain the basics to me?
R.I.P. Guitars Etc
RHLC Chief Promotions Officer |
||||||||||||||
|
|
|
|
|
#2 | |||||||||||||
|
The Billy That Should Not Gibbons
|
hmm...
nah, i'm no help ![]() |
|||||||||||||
|
|
|
|
|
#3 | ||||||||||||||
|
Slow Money
|
neither was my teacher
![]() |
||||||||||||||
|
|
|
|
|
#4 | |||||||||||||
|
The Billy That Should Not Gibbons
|
can you explain the problem more thoroughly? i may be able to at least help you bullshit through
![]() |
|||||||||||||
|
|
|
|
|
#5 | ||||||||||
|
Bring Me His Head
|
Why the fuck do they still make people actually learn to do this bullshit by hand? We have computers to do it for a reason.
![]()
Noodles
Division: American Metal without the suck. kxksales@gmail.com So live for today, Tomorrow never comes. Die young, die young, Can't you see the writing in the air? Die young, gonna die young, Someone stopped the fair. |
||||||||||
|
|
|
|
|
#6 | ||||||||||||||
|
Slow Money
|
no problems yet. Just the whole idea of decimals in binary, and how they always start with a one, except sometimes, which is denormalized but totally normal. and at some point, you apparently add 127base10 to it to make it work, unless its backwards, in which case you subtract 127, to unbias it. in 32 bits that is, 64 bits is something like adding 1023 to bias it. Im confused
![]() |
||||||||||||||
|
|
|
|
|
#7 | |||||||||||||||
|
Slow Money
|
Quote:
![]() |
|||||||||||||||
|
|
|
|
|
#8 | ||||||||||
|
Bring Me His Head
|
Oh, you're taking processor design, right? Yeah, I try to block that class out of my memory.
![]() |
||||||||||
|
|
|
|
|
#9 | ||||||||||||||
|
Slow Money
|
well computer organization, so yeah, intro to processer design
![]() cant say i blame you ![]() |
||||||||||||||
|
|
|
|
|
#10 | |||||||||
|
Senior Member
|
Okay, here we go:
A number is represented as (+/-)1.m * 2^e. So say you have, like, 34, that's 1.0625 * 2^5 In single format (32 bits), there's 1 sign bit, 8 exponent bits, and 23 decimal bits. The sign bit is either 0 or 1, that should be simple. The exponent bits store the power of 2. We use biased representation so we can store negative exponents. So, instead of storing e, we store e + 127. For example, if the exponent bits are 00000111 (7, in decimal), then e + 127 = 7, so e = -120. (In double format [64 bits], there are 11 exponent bits, so we use 1023 instead of 127) There are two special cases: If the exponent bits are all ones, that indicates either infinity or 'not a number'. If the exponent bits are all zeroes, that indicates a subnormal number. We always normalize numbers so that they're in the form 1.XXXXXX. The reason is if every number starts with a one, we don't actually need to store that one, we can just assume every number has it. So, we only store the numbers after the decimal. Not storing the one gives us one more bit to use for the decimal. However, if the number is too small to be stored in this way, we instead store it as a subnormal number. If all the exponent bits are 0, then the number is actually 0.XXXXXX. This lets us store something like 0.0000000000001 * 2^-127, which is too small to store as a normalized number. Going back to the number 34, we have 34 = 1.0625 * 2^5. Converting to binary, 1.0625 = 1.0001. So, for the fraction part, we store 00010000000000000000000000000000. For the exponent, 5 + 127 = 132, which is 10000100 in binary, so we store that. Finally, the sign bit is 0 to indicate a positive number. So, the result is 0 10000100 00010000000000000000000000000000 Hope this helps! |
|||||||||
|
|
|