01-19-2014, 06:45 PM
Description:
This program allows to convert numbers from one base to another.
Register:
Reg 1: from-base
Reg 2: to-base
Program:
STO 0
RCL 1
RCL 2
-
x<>y
LBL 0
RCL 1
x<>y
RCL 2
÷
INT
x=0
GTO 1
R↓
×
R↓
×
STO + 0
R↓
GTO 0
LBL 1
RCL 0
Examples:
Dec - Bin
Reg 1: 10
Reg 2: 2
21 - 10101
Hex - Dec
Reg 1: 16
Reg 2: 100
0xCAFE = 12:10:15:14
12101514 - 51966
This program allows to convert numbers from one base to another.
Register:
Reg 1: from-base
Reg 2: to-base
Program:
STO 0
RCL 1
RCL 2
-
x<>y
LBL 0
RCL 1
x<>y
RCL 2
÷
INT
x=0
GTO 1
R↓
×
R↓
×
STO + 0
R↓
GTO 0
LBL 1
RCL 0
Examples:
Dec - Bin
Reg 1: 10
Reg 2: 2
21 - 10101
Hex - Dec
Reg 1: 16
Reg 2: 100
0xCAFE = 12:10:15:14
12101514 - 51966