- #1
Arian.D
- 101
- 0
I'm thinking of expanding the numerical value of a real number in different bases. I want you guys to ensure some things for me so I know I'm not wrong.
If X is the representation of a in the base B and Y is the representation of b in the same base(radix), can we say that X+Y = a+b?
In particular I wonder if I can evalute the binary expansion of -4.125 in the following way:
First I write -4.125 = -5 + 0.875, then I find the binary expansion of -5, to do that first I see that 5 = (101)2 and then I add the minus sign to it. Right?
Now I find the binary expansion of 0.875, which is easy because I have an algorithm that gives me the binary expansion of any positive real number less than one.
All I have said is easily generalized to other bases. But the question is, how should I expand negative numbers in a bases? How do I expand -4.625 in base-10 for example?
I'm confused.
If X is the representation of a in the base B and Y is the representation of b in the same base(radix), can we say that X+Y = a+b?
In particular I wonder if I can evalute the binary expansion of -4.125 in the following way:
First I write -4.125 = -5 + 0.875, then I find the binary expansion of -5, to do that first I see that 5 = (101)2 and then I add the minus sign to it. Right?
Now I find the binary expansion of 0.875, which is easy because I have an algorithm that gives me the binary expansion of any positive real number less than one.
All I have said is easily generalized to other bases. But the question is, how should I expand negative numbers in a bases? How do I expand -4.625 in base-10 for example?
I'm confused.