- Muessigb
- Advanced Member (Posts: 236)
-
- 23 Feb 2018 07:50:45 pm
- Last edited by Muessigb on 23 Feb 2018 08:22:07 pm; edited 1 time in total
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.
EDIT: Read Runer's link: https://meta.stackexchange.com/a/233676/287804
EDIT: Read Runer's link: https://meta.stackexchange.com/a/233676/287804
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.
EDIT: Read Runer's link: https://meta.stackexchange.com/a/233676/287804
EDIT: Read Runer's link: https://meta.stackexchange.com/a/233676/287804
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.
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.
Support the community by joining MyCalcs for free! Co-founder of TI-Toolkit.
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.
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:
Code:

Code:
Input <binary number>
Disp pi<binary number>
Code:
//Input 100 as binary number
Disp π100 //displays 4
- coolcrab123
- Advanced Newbie (Posts: 58)
-
- 23 Feb 2018 08:29:27 pm
- Last edited by coolcrab123 on 23 Feb 2018 08:31:48 pm; edited 1 time in total
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.
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.
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:
Code:

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.
- MateoConLechuga
- Official Cemetech Lettuce Manager (Posts: 3888)
-
- 23 Feb 2018 08:36:43 pm
- Last edited by MateoConLechuga on 23 Feb 2018 08:37:58 pm; edited 1 time in total
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.
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
- coolcrab123
- Advanced Newbie (Posts: 58)
-
- 23 Feb 2018 08:39:56 pm
- Last edited by coolcrab123 on 23 Feb 2018 08:43:07 pm; edited 1 time in total
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?
- Muessigb
- Advanced Member (Posts: 236)
-
- 23 Feb 2018 08:40:31 pm
- Last edited by Muessigb on 23 Feb 2018 08:42:13 pm; edited 1 time in total
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.
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.
» Go to Registration page
» Go to Registration page
» Goto page Previous 1, 2, 3 Next
» View previous topic :: View next topic
» View previous topic :: View next topic
Page 2 of 3
» All times are UTC - 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
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
Advertisement