Is it possible to write 0.5 in binary format?

Howard

Lifer
Oct 14, 1999
47,982
11
81
Yes. I think it's just 0.1, seeing as it goes from 1 -> 2 -> 4.. on the left, so it should be 1/2 -> 1/4 -> 1/8 on the right.
 

BigJ

Lifer
Nov 18, 2001
21,330
1
81
Hell I'd like to know the answer too and why.

Understanding binary to the left of the decimal place never seemed like much of a challenge, but I've never seen it to the right
 

ndee

Lifer
Jul 18, 2000
12,680
1
0
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.
 

Rallispec

Lifer
Jul 26, 2001
12,375
10
81
windows calculator won't let me do decimals or fractions in binary, hex, or oct. it cuts off eveyrthing after decimal point.

i suppose, given the proper coding envirnment - some languages may support numbers less than zero. I dont know how to do it though.
 

dighn

Lifer
Aug 12, 2001
22,820
4
81
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.

the place of 0.1 is 1/10 in base ten, so it's 1/2 in base 2
 

dighn

Lifer
Aug 12, 2001
22,820
4
81
Originally posted by: Pepsi90919
no, it's not. you technically can't even subtract in binary without jumping through hoops.

umm sure you can. you can subtract just like in base 10
 

BigJ

Lifer
Nov 18, 2001
21,330
1
81
Originally posted by: dighn
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.

the place of 0.1 is 1/10 in base ten, so it's 1/2 in base 2

Makes sense now, thanks!
 

Pepsi90919

Lifer
Oct 9, 1999
25,162
1
81
Originally posted by: dighn
Originally posted by: Pepsi90919
no, it's not. you technically can't even subtract in binary without jumping through hoops.

umm sure you can. you can subtract just like in base 10

you missed the last four words.
 

dighn

Lifer
Aug 12, 2001
22,820
4
81
Originally posted by: Pepsi90919
Originally posted by: dighn
Originally posted by: Pepsi90919
no, it's not. you technically can't even subtract in binary without jumping through hoops.

umm sure you can. you can subtract just like in base 10

you missed the last four words.

i dont see how adjusting to a different base is "jumping through hoops" . the rules & procedures are exactly the same
 

Howard

Lifer
Oct 14, 1999
47,982
11
81
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?
 

Pepsi90919

Lifer
Oct 9, 1999
25,162
1
81
Originally posted by: dighn
Originally posted by: Pepsi90919
Originally posted by: dighn
Originally posted by: Pepsi90919
no, it's not. you technically can't even subtract in binary without jumping through hoops.

umm sure you can. you can subtract just like in base 10

you missed the last four words.

i dont see how adjusting to a different base is "jumping through hoops" . the rules & procedures are exactly the same

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

dighn

Lifer
Aug 12, 2001
22,820
4
81
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...
 

Pepsi90919

Lifer
Oct 9, 1999
25,162
1
81
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?
 

gwlam12

Diamond Member
Apr 4, 2001
6,946
1
71
i like how the OP responds with "got it" less than a minute after the post is made. how many times do we ask a question only to answer it ourselves right after it is asked? its funny.
 

amoeba

Diamond Member
Aug 7, 2003
3,162
1
0
its 0.1 in regular binary.

typically numbers in decimals are expressed in IEEE floating point though.