Don't have an account? Register now to chat, post, use our tools, and much more.
» Goto page Previous  1, 2, 3  Next
yeah, no floats as of now, all #'s are 24 bit, iirc
SM84CE wrote:
yeah, no floats as of now, all #'s are 24 bit, iirc

Yes, they are using 16 and 24 bit (according to the datasheet).
Muessigb wrote:
coolcrab123 wrote:
MateoConLechuga wrote:
coolcrab123 wrote:
That'd be why i'm asking if there's a work around...

*That would be why I'm asking if there is a workaround...

No. You can simulate fractions with integers though.

I need to get this old pc to automatically capitalize stuff.

I don't need to simulate fractions, I need to check them in an if statement when I'm trying to convert a decimal to binary code

There are no floating point variables I think. All maths is going to be integer math.
At least this was the case with Axe back on the monochrome calculators.
There is also the signed vs unsigned and 8 vs 16-bit question.
I was absent for a while and have not kept track of the new additions to Axe nor have I really looked into ICE but I guess similar restrictions apply.

But can someone maybe think of a method to use the Fpart( function without Fpart( with other Basic Commands because I don't see one due to the inability to use the Round( function either
You can simulate fractions with integers. One integer holds the fractional part, the other holds the integer part. We can help you with specific implementations of various things, but there is no "one fix" or solution.

MateoConLechuga wrote:
You can simulate fractions with integers. One integer holds the fractional part, the other holds the integer part. We can help you with specific implementations of various things, but there is no "one fix" or solution.

How did you Know???
Can someone make a Decimal-->Binary converter without the Fpart( or int( or Ipart( functions, because I don't have time to think of one, I will in turn supply them with a beta when I'm done, and Will add them as a co-author.

What an Offer... ^^
You keep ignoring our suggestions.

We are trying to help you by giving you tips, but you keep telling us to write your code for you.

Nobody is going to write your code for you.
coolcrab123 wrote:
Can someone make a Decimal-->Binary converter without the Fpart( or int( or Ipart( functions, because I don't have time to think of one, I will in turn supply them with a beta when I'm done, and Will add them as a co-author.

Code:
```Decimal to Binary:     I=1:B=0     While N         R=remainder(N,2)         N=N/2         B=B+R*I         I=I*10     End```

Wow that was so difficult
_iPhoenix_ wrote:
You keep ignoring our suggestions.

We are trying to help you by giving you tips, but you keep telling us to write your code for you.

Nobody is going to write your code for you.

I don't need code, I need a suggestion on what commands I can use together to simulate the Fpart and iPart commands, where are the suggestions that you are saying I have been given, what you are giving me is supportive commentary, but nobody has answered the question at heart. I'm asking a question and getting a different answer (no offense). The only possible answer that was suggested was to use variables to simulate fractions, but I kindly stated that this would not work for me, because the fractions aren't the important part, the If statement checking for the fractional part is.

BTW: Can someone suggest a work around for this process , if my variable that is being converted to Binary cannot contain a fractional portion and is an integer. (would I still require the Fpart command)
one up time: In ICE (if this helps )

Code:
``` Input <binary number> Disp pi<binary number> ```

Code:
``` //Input 100 as binary number Disp π100 //displays 4 ```
MateoConLechuga wrote:
coolcrab123 wrote:
Can someone make a Decimal-->Binary converter without the Fpart( or int( or Ipart( functions, because I don't have time to think of one, I will in turn supply them with a beta when I'm done, and Will add them as a co-author.

Code:
```Decimal to Binary:     I=1:B=0     While N         R=remainder(N,2)         N=N/2         B=B+R*I         I=I*10     End```

Wow that was so difficult

Wow! Wait, is this compatible to ICE, since ICE has an overly special tendency to over do things (Why did they have to make different key codes...)
coolcrab123 wrote:
_iPhoenix_ wrote:
You keep ignoring our suggestions.

We are trying to help you by giving you tips, but you keep telling us to write your code for you.

Nobody is going to write your code for you.

I don't need code, I need a suggestion on what commands I can use together to simulate the Fpart and iPart commands, where are the suggestions that you are saying I have been given, what you are giving me is supportive commentary, but nobody has answered the question at heart. I'm asking a question and getting a different answer (no offense). The only possible answer that was suggested was to use variables to simulate fractions, but I kindly stated that this would not work for me, because the fractions aren't the important part, the If statement checking for the fractional part is.

BTW: Can someone suggest a work around for this process , if my variable that is being converted to Binary cannot contain a fractional portion and is an integer. (would I still require the Fpart command)

There is no fractional part since your variables are 24 bit integers.
Muessigb wrote:
coolcrab123 wrote:
_iPhoenix_ wrote:
You keep ignoring our suggestions.

We are trying to help you by giving you tips, but you keep telling us to write your code for you.

Nobody is going to write your code for you.

I don't need code, I need a suggestion on what commands I can use together to simulate the Fpart and iPart commands, where are the suggestions that you are saying I have been given, what you are giving me is supportive commentary, but nobody has answered the question at heart. I'm asking a question and getting a different answer (no offense). The only possible answer that was suggested was to use variables to simulate fractions, but I kindly stated that this would not work for me, because the fractions aren't the important part, the If statement checking for the fractional part is. ₁

BTW: Can someone suggest a work around for this process , if my variable that is being converted to Binary cannot contain a fractional portion and is an integer. (would I still require the Fpart command)

There is no fractional part since your variables are 24 bit integers.

Exactly! But since i divide the length by 2, there may be a fractional part if it's odd.
SM84CE wrote:
one up time: In ICE (if this helps )

Code:
``` Input <binary number> Disp pi<binary number> ```

Code:
``` //Input 100 as binary number Disp π100 //displays 4 ```

that, I know, but the other way around.
coolcrab123 wrote:
Wow! Wait, is this compatible to ICE, since ICE has an overly special tendency to over do things (Why did they have to make different key codes...)

Probably not, it's just puesdo code. An ICE implementation might look like this, with the number in N and the result in B: (untested)

Code:
```Decimal to Binary:     0->B+1->I     While N         remainder(N,2->R         N/2->N         B+R*I->B         I*10->I     End```
Muessigb wrote:
coolcrab123 wrote:
_iPhoenix_ wrote:
You keep ignoring our suggestions.

We are trying to help you by giving you tips, but you keep telling us to write your code for you.

Nobody is going to write your code for you.

I don't need code, I need a suggestion on what commands I can use together to simulate the Fpart and iPart commands, where are the suggestions that you are saying I have been given, what you are giving me is supportive commentary, but nobody has answered the question at heart. I'm asking a question and getting a different answer (no offense). The only possible answer that was suggested was to use variables to simulate fractions, but I kindly stated that this would not work for me, because the fractions aren't the important part, the If statement checking for the fractional part is.

BTW: Can someone suggest a work around for this process , if my variable that is being converted to Binary cannot contain a fractional portion and is an integer. (would I still require the Fpart command)

There is no fractional part since your variables are 24 bit integers.

And because a string's length Cannot be a fraction
MateoConLechuga wrote:
coolcrab123 wrote:
Wow! Wait, is this compatible to ICE, since ICE has an overly special tendency to over do things (Why did they have to make different key codes...)

Probably not, it's just puesdo code. An ICE implementation might look like this, with the number in N and the result in B: (untested)

Code:
```Decimal to Binary:     0->B+1->I     While N         remainder(N,2->R         N/2->N         B+R*I->B         I*10->I     End```

I need to extract the result to a string, is I, the value of each character?
coolcrab123 wrote:

And because a string's length Cannot be a fraction

Yes, but all division is always rounded down to the next integer.
So there cannot be a fractional part. Use modulo to get the remainder after division.
coolcrab123 wrote:
I need to extract the result to a string.

gl;hf
MateoConLechuga wrote:
coolcrab123 wrote:
I need to extract the result to a string.

gl;hf

Thank you

Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

»
» Goto page Previous  1, 2, 3  Next
» All times are GMT - 5 Hours

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum