13 - Decimal to Binary Converter

Post Reply
Peet
Posts: 99
Joined: Tue Sep 29, 2020 12:01 am
Location: Germany

13 - Decimal to Binary Converter

Post by Peet »

Usage:
LBL A: DEC -> BIN
LBL B: BIN -> DEC

Example:
12 <A> DEC-12= BIN-1100
10 <B> BIN-10= DEC-2

Code: Select all

LBL "D-B"
SF 27
"DEC-BIN"
PROMPT
LBL A
FIX 0
CF 29
"DEC-"
ARCL X
"|-="
AVIEW
1
STO 02
CLX
STO 03
RDN
LBL 00
1
X=Y?
GTO 01
RDN
ENTER
ENTER
2
/
INT
STO 05
2
*
-
RCL 02
*
ST+ 03
10
ST* 02
RCL 05
GTO 00
LBL 01
RCL 02
ST+ 03
RCL 03
"BIN-"
ARCL X
FIX 4
SF 29
PROMPT
LBL B
FIX 0
CF 29
"BIN-"
ARCL X
"|-="
AVIEW
STO 01
CLX 
STO 02
STO 03
LBL 03
RCL 01
10
/
ENTER 
ENTER
FRC
10
*
2
RCL 02
Y^X
*
ST+ 03
RDN
INT
STO 01
1
ST+ 02
RCL 02
10
X=Y?
GTO 04
GTO 03
LBL 04
RCL 03
"DEC-"
ARCL X 
FIX 4
SF 29
PROMPT
END
Attachments
13_D-B_Dec-Bin.raw
(152 Bytes) Downloaded 23 times
My programmable calculators - former: CBM PR100, HP41CV, HP28S, HP11C - current: HP48G(+), HP35S, DM41X, DM42
Post Reply