• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Is it possible to write 0.5 in binary format?

Page 2 - Seeking answers? Join the AnandTech community: where nearly half-a-million members share solutions and discuss the latest tech.
Originally posted by: Pepsi90919
Originally posted by: dighn
Originally posted by: Pepsi90919

i've always done it by inverting the number and adding 1 to get a 2's complement number, then adding the other number.

yeah but you could do it the "natural" way too...

enlighten me?




11001100 (204)
- 110110 (54)
-------------------
10010110 (150)


It's simple and straight forward.

Or an easier example

110 (6)
-10 (2)
-----
100 (4)
 
Originally posted by: Howard
Originally posted by: ndee
it's 0.1 but I don't know why, I thought wrong. Cuz according to my logic, 1/4 would also be 0.1 but that's wrong, it would be 0.01, no idea why thought.
Skipped over my post, eh?

I was typing that post already but you were right 🙂
 
Originally posted by: MercenaryForHire
Originally posted by: Howard
Originally posted by: ndee
it's 0.1 but I don't know why, I thought wrong. Cuz according to my logic, 1/4 would also be 0.1 but that's wrong, it would be 0.01, no idea why thought.
Skipped over my post, eh?

Nah, he just sucks at math. 😛

- M4H

That's true, that's why I'm asking so many Math threads lately, which I'm sure you noticed 😉
 
.5 in hex is: 3F000000
.5 in binary is: 0011 1111 0000 0000 0000 0000 0000 0000

Its called IEEE 754 Floating Point Format.

just for fun, something like -13.5625 would be:

hex: C15A0000
binary: 1100 0001 0101 0000 0000 0000 0000 0000
 
Back
Top