Post Reply 
HP 50g Binary Number Formatting
04-23-2022, 06:50 PM
Post: #4
RE: HP 50g Binary Number Formatting
Easier to understand the following code, where we take every value and check if it is the 4th, the 8th,the 12th..., and when it is the case add a blank.

Code for —>BIN4c:

\<< \->STR DUP DUP SIZE \-> str.ORIGIN size.ORIGIN
\<< size.ORIGIN 4 MOD 4 SWAP - 4 MOD \-> m
\<< m m
WHILE m 0 \=/
REPEAT " " str.ORIGIN + 'str.ORIGIN' STO -1 'm' STO+
END size.ORIGIN + 1 SWAP "" UNROT
FOR i str.ORIGIN i i SUB + i 4 MOD 0 ==
IF
THEN " " +
END
NEXT DUP SIZE 1 - ROT 1 + SWAP SUB
\>>
\>>
\>>


Attached File(s)
.doc  —>BIN4c.Doc (Size: 321 bytes / Downloads: 4)
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
HP 50g Binary Number Formatting - aaron - 04-20-2022, 05:47 PM
RE: HP 50g Binary Number Formatting - Gil - 04-23-2022, 01:38 PM
RE: HP 50g Binary Number Formatting - Gil - 04-23-2022, 06:01 PM
RE: HP 50g Binary Number Formatting - Gil - 04-23-2022 06:50 PM
RE: HP 50g Binary Number Formatting - Gil - 04-24-2022, 12:03 AM
RE: HP 50g Binary Number Formatting - 3298 - 04-24-2022, 10:40 AM
RE: HP 50g Binary Number Formatting - Gil - 04-24-2022, 11:34 AM
RE: HP 50g Binary Number Formatting - Gil - 04-25-2022, 04:04 PM
RE: HP 50g Binary Number Formatting - Gil - 04-25-2022, 10:34 PM



User(s) browsing this thread: 2 Guest(s)