Omnimaga
Calculator Community => TI Calculators => Axe => Topic started by: danny90444 on July 02, 2012, 06:43:14 pm
-
I just wanted a further explanation of this:
Data(NUM,...)
Key: Ξ”List()
Adds the bytes to program memory. Numbers ending with r are added as 2 byte numbers.
-
You have to point your liste of data. Eg :
:Data(2,5,100,40,3)->Str1
You can read those data in this way :
:{Str1}
:.Return 2
:{Str1+1}
:.Return 5
...
:{Str1+X}
If you want add a 2-bytes number, you can use ^r (2nd angle 3) :
:Data(12,500^r,200,30000^r)->Pic1
:{Pic1}
:.Return 12
:{Pic1+1}^r
:.Return 500
:{Pic1+3}
:.Return 200
:{Pic1+4}^r
:.Return 30000
-
Which numbers are two bye and which are single bye , etc ?
-
Endeed a byte is 8 bits. Then a byte can take 2^8 (=256) values, that to say a number beetwen 0 and 255. A 2 byte number can take 2^16 (=65356) values, it means a number beetwen 0 and 65355.
Axe variables are 2 bytes number.
-
Endeed a byte is 8 bits. Then a byte can take 2^8 (=256) values, that to say a number beetwen 0 and 255. A 2 byte number can take 2^16 (=65356) values, it means a number beetwen 0 and 65355.
Axe variables are 2 bytes number.
Thanx this really helps.
-
Do you know about anything about numbers bigger than 65355? Are they 3 bytes or 4 or something like that?
-
You can combine 2 real variables or use the OP registers...
-
Combine how ? and what are OP registers?
-
You can combine 2 real variables or use the OP registers...
Or use this (http://ourl.ca/4129/155369) ;)
-
Do you know about anything about numbers bigger than 65355? Are they 3 bytes or 4 or something like that?
Depends on how much bigger than 65355.
-
Do you know about anything about numbers bigger than 65355? Are they 3 bytes or 4 or something like that?
Depends on how much bigger than 65355.
Like in the millions.
-
Basically, to know the limit of X bytes, you do 2X*8-1.
So 1 byte stops at 255, 2 bytes stop at 65535, etc :)
-
Basically, to know the limit of X bytes, you do 2X*8-1.
So 1 byte stops at 255, 2 bytes stop at 65535, etc :)
Ok thanks . Whats OP though?
-
The OP "registers" are a set of memory areas that are used as operands by the OS's floating point routines. Unless you need floating point, there shouldn't be a need to explicitly deal with them.
If you want to do math with larger integers, you basically need to write the routines yourself (precluding a library/axiom already having been written. I don't follow Axe too much.).
For example, to add the number BA (formed from variables A and B) to DC, and store the result back to BA, you could do something like A+C->A<C+B+D->B, where -> is the STO> symbol.
An easier-to-follow variation goes like this:
A+C->A
If A<C
B+D->B
Else
B+D+1->B
End
-
By the way, the r in the description is the radians r (it's in the [2nd][Apps] menu)
-
The OP "registers" are a set of memory areas that are used as operands by the OS's floating point routines. Unless you need floating point, there shouldn't be a need to explicitly deal with them.
If you want to do math with larger integers, you basically need to write the routines yourself (precluding a library/axiom already having been written. I don't follow Axe too much.).
For example, to add the number BA (formed from variables A and B) to DC, and store the result back to BA, you could do something like A+C->A<C+B+D->B, where -> is the STO> symbol.
An easier-to-follow variation goes like this:
A+C->A
If A<C
B+D->B
Else
B+D+1->B
End
I don't understand the BA part. Is that one number split between two variables? And I don't know what floating point is exactly.
-
I don't understand the BA part. Is that one number split between two variables? And I don't know what floating point is exactly.
Your number A is 16 bits (2 bytes). Let's represent a bit by X. So A looks like this
XXXXXXXXXXXXXXXX.
Same for B, B looks like this
XXXXXXXXXXXXXXXX.
Now, what would be BA ? It is B followed by A so BA looks like this
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
And you just created a 32 bits number ;)
Floating point is basically numbers with a decimal where the period is not at the same place for each number. So you could work with 53.21 and 589.4 as opposed to fixed point where the period is always at the same place for everyone :)
-
I don't understand the BA part. Is that one number split between two variables? And I don't know what floating point is exactly.
Your number A is 16 bits (2 bytes). Let's represent a bit by X. So A looks like this
XXXXXXXXXXXXXXXX.
Same for B, B looks like this
XXXXXXXXXXXXXXXX.
Now, what would be BA ? It is B followed by A so BA looks like this
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
And you just created a 32 bits number ;)
Floating point is basically numbers with a decimal where the period is not at the same place for each number. So you could work with 53.21 and 589.4 as opposed to fixed point where the period is always at the same place for everyone :)
So that number would be 4 bytes?
-
yes.
-
thanks