
A Prog To Make Numbers Binary
#1
Guest_juggler_*
Posted 16 September 2004 - 02:34 PM
Please react fast. I'm tryed to make one myself in a couple of minutes but it is not workind yet.
#2
Posted 16 September 2004 - 04:14 PM

#3
Posted 16 September 2004 - 05:02 PM
*Go to RUN Menu
*go into SETUP menu (SHIFT -> SETUP (on CFX)/ CTRL Setup(on AFX)
*Set Mode to convert from
*Type [Number to convert to binary]->A 'without the brackets!!!
*go into SETUP menu (SHIFT -> SETUP (on CFX)/ CTRL Setup(on AFX)
*Set mode to convert to
*enter A and press EXE.
For all the lazy people arround here:
Binary program!!! (press binary on creating)
"SELECT ORIGIN" "[F1]=BIN" "[F2]=HEX" "[F3]=DEC" "[F4]=OCT" DO:Getkey->A REPEAT UNTIL A=79 or A=69 or A=59 or B=49 A=79=>Bin:A=69=>Hex A=59=>Dec:A=49=>OCT "Enter Number"?-B "SELECT TARGET" "[F1]=BIN" "[F2]=HEX" "[F3]=DEC" "[F4]=OCT" A=79=>Bin:A=69=>Hex A=59=>Dec:A=49=>OCT B_
_ ist the triangle.
#4
Posted 16 September 2004 - 05:36 PM

DO:Getkey->A REPEAT UNTIL A=79 or A=69 or A=59 or B=49=>
Do:Getkey->A LpWhile A<>79 And A<>69 And A<>59 And A<>49

#5
Guest_Guest_*
Posted 16 September 2004 - 06:11 PM
#6
Posted 17 September 2004 - 06:45 AM

#7
Guest_Guest_juggler_*_*
Posted 17 September 2004 - 07:48 AM
And I found out, if you go to BIN in the RUN menu and you press F1, you don't need A anymore.
#8
Posted 17 September 2004 - 10:32 AM



#9
Posted 18 September 2004 - 08:41 PM
#10
Posted 18 September 2004 - 09:42 PM

#11
Posted 19 September 2004 - 12:59 AM
%Header Record Format:TXT Communication SW:0 Data Type:PG Capacity:299 File Name:BASECONV Group Name: Password: Option1:NL Option2: Option3: Option4: %Data Record "Select Origin" "[F1]=\Binary" "[F2]=\Hexadecimal" "[F3]=\Decimal" "[F4]=\Octal" \Do \Getkey\->A \LpWhile A\<>\Dec>79\ And A\<>\Dec>69\ And A\<>\Dec>59\ And A\<>\Dec>49 A=\Dec>79\=>\Bin A=\Dec>69\=>\Hex A=\Dec>59\=>\Dec A=\Dec>49\=>\Oct "Enter Number"?\->B "Select Target" "[F1]=\Binary" "[F2]=\Hexadecimal" "[F3]=\Decimal" "[F4]=\Octal" \Do \Getkey\->A \LpWhile A\<>\Dec>79\ And A\<>\Dec>69\ And A\<>\Dec>59\ And A\<>\Dec>49 A=\Dec>79\=>\Bin A=\Dec>69\=>\Hex A=\Dec>59\=>\Dec A=\Dec>49\=>\Oct B\Disp %End
#12
Posted 19 September 2004 - 10:18 AM
It does work for me. I've done that using a CFX 9850.
Or maybe i haven't been too explicit on how to do it, check the "Truth Tables" program at file sharing

Or i didn't get the point at all

#13
Posted 19 September 2004 - 04:10 PM
Do "Entry radix"?->A LpWhile ((A<>Int A)+(A<2)+(A>10))<>0 Do "Value"?->B LpWhile ((B<>Int B)+(B<0))<>0 0->C 1->D While B<>0 B/10->B 10DFrac B+C->C Int B->B AD->D WhileEnd Do "New radix"?->A LpWhile ((A<>Int A)+(A<2)+(A>10))<>0 0->B 1->D While C<>0 C/A->C DAFrac C+B->B Int C->C 10D->D WhileEnd B
#14
Guest_Guest_*
Posted 20 September 2004 - 10:22 AM
I'll try but i make the program a bit shorter, i don't use all the text and i only need BIN to DEC and back.
If i can find the right menu, i can write the rest myself.
#15
Guest_Guest_*
Posted 18 January 2006 - 09:05 PM
A=79=>Bin:A=69=>Hex A=59=>Dec:A=49=>OCT
How do you input the Bin, Hex, and Dec statements? I mean where can i find them?
OCT is a variable, but the others is not completely in capital letters?:S
#16
Posted 18 January 2006 - 09:42 PM
All these statements are only found if you create your program in binary mode (there must be a small B next to the files name) and I think you have to pres

#17
Guest_Guest_*
Posted 19 January 2006 - 05:15 AM
OCT is NO variable.
All these statements are only found if you create your program in binary mode (there must be a small B next to the files name) and I think you have to presShift' />+[SETUP] then
I cant use DO- comand in base
#18
Guest_Guest_*
Posted 19 January 2006 - 05:40 PM
I cant use DO- comand in base
how do you do the subrutines then?
#19
Posted 19 January 2006 - 05:48 PM
but in base programs you cant do anything like that, and you cant call a base program from a normal one.
#20
Guest_Guest_*
Posted 19 January 2006 - 07:47 PM
How would the entire program w/ subroutines look?
#21
Posted 19 January 2006 - 11:42 PM
so just create a normal porgram on your calc, and enter his code.
#22
Posted 20 January 2006 - 06:09 AM
so How would the entire program by huhn_m look w/ subroutines ?
#23
Posted 20 January 2006 - 09:10 AM
"Enter Decimal:"?->A "Binary:" A>Bin_
and then change the >Bin (which is one operator, not the greater than sign then Bin) to which ever you need to convert to.
#24
Posted 20 January 2006 - 03:46 PM
"Enter Decimal:"?->A "Binary:" A>Bin_
A>Bin_
Is ">" greater than, => ,-> or something else?
neither ">", "=>", -> works
(and i know that "_" is the triangle

#25
Posted 20 January 2006 - 04:19 PM
in a BASE program:

#26
Posted 20 January 2006 - 04:37 PM
there is a symbol: (on AFX, should be the same on an FX):
in a BASE program:F5' /> and there is a list of operators: >Oct , >Bin, >Hex >Dec, these are what you need to use.
Sadly there is no option for

There are Bin,Oct,Hex,Dec w/o the ">" on


#27
Posted 20 January 2006 - 06:48 PM
#28
Posted 21 January 2006 - 08:15 AM
Maybe the program can do it the old fashioned way using remainder?
#29
Posted 23 January 2006 - 11:54 AM
store the convertion in a variable (C for example) and do this in the base program
This example is for a Dec<->Bin convertion only but more can be added of course
C=1=>Bin C=2=>Dec "Number"?->N C=1=>Dec C=2=>Bin N__ is the trianglething and => is the symbol in program menu
#30
Guest_Moridin_*
Posted 29 January 2006 - 04:05 PM
this works for CFX-9850GC PLUS and other programs in this topic does not:
Lbl 1:"DEC VALUE"?->A "BIN VALUE:" Bin A_
#31
Posted 29 January 2006 - 04:44 PM
#32
Posted 29 January 2006 - 05:45 PM
that the program always gets decimal numbers and is not still in binary mode.
#33
Posted 30 January 2006 - 10:54 AM
1. In RUN mode, press


2. Change the mode to the base you wish to convert to.
3. Press F1 and select the base you wish to convert from.
4. Type in the number you wish to convert and press

With this method, you can enter an expression containing numbers from different bases by repeating step 3 before entering each number. You can also use the last answer in any base by repeating steps 1 to 2 and pressing Ans.
Just a side note, why does Dec mode include negative numbers? It would have been fine if it went from 0 to 2^32 - 1, supporting all 2^32 numbers. Instead it goes from 1 - 2^31 to 2^31 - 1, supporting only 2^32 - 1 numbers. As a result converting 2^31 to Dec mode displays - 2^31, but entering this number manually results in Ma Error!
#34
Posted 30 January 2006 - 06:23 PM
#35
Posted 31 January 2006 - 02:52 AM
A similar problem occurs in binary, if you try to use one of the bits to represent positive or negative, you end up with positive 0 and negative 0, which are the same. As a result, you have one less number than if everything was positive, rendering it INCOMPATIBLE with such bases.
#36
Posted 04 February 2006 - 04:24 PM
There is a difference of 1 in the range of numbers that can be represented but i guess it doesn't matter, in school you don't use numbers that big so that shouldn't be a problem.
#37
Guest_Guest_*
Posted 25 October 2007 - 03:45 PM
#38
Posted 26 October 2007 - 02:46 PM

Go into RUN mode, choose setup and set the number type to BIN
now you can enter binary numbers and convert them to other bases.
#39
Posted 01 November 2007 - 12:20 PM
#40
Guest_Soyez_*
Posted 17 November 2010 - 07:51 PM
easy and ready to go

[codebox]
// Notice that this is a Numeric Base-N program!!
Lbl 0
0->A //Not an O but a ZERO
"BINARY CALC"
" "
" BIN TO X"
" DEC TO X"
" HEX TO X"
" OCT TO X"
?->A
A=1=>Goto 1
A=2=>Goto 2
A=3=>Goto 3
A=4=>Goto 4
Lbl 1
Bin
"BINARY"?->B
"TO DECIMAL"
Dec
B_ // The _ is that little triangle
"TO HEXADECIMAL"
Hex
B_
"TO OCTAL"
Oct
B_
Goto 0
Lbl 2
Dec
"DECIMAL"?->D
"TO BINARY"
Bin
D_
"TO HEXADECIMAL"
Hex
D_
"TO OCTAL"
Oct
D_
Goto 0
Lbl 3
Hex
"HEXADECIMAL"?->H
"TO BINARY"
Bin
H_
"TO DECIMAL"
Dec
H_
"TO OCTAL"
Oct
H_
Goto 0
Lbl 4
"OCTAL"?->O //This time not a ZERO but an O
"TO BINARY"
Bin
O_
"TO DECIMAL"
Dec
O_
"TO HEXADECIMAL"
Hex
O_
Goto 0
[/codebox]
Questions/Requests?
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users