| Both sides previous revisionPrevious revisionNext revision | Previous revision |
| public:calculator:guides:hp16c_emulator [13/02/25 06:29 GMT] – [Setting Word Size and negative number convention] john | public:calculator:guides:hp16c_emulator [28/01/26 08:59 GMT] (current) – [EVERYTHING STARTS WITH ''16C''] john |
|---|
| Word size is set with <key>W</key> then enter (eg) ''16'' to set 16-bit words. | Word size is set with <key>W</key> then enter (eg) ''16'' to set 16-bit words. |
| |
| Word Size can also be set directly from a ''16C'' keyboard function ''16WSZ'' accessed via <key>16C</key> <key>SHIFT</key> ''5'' rather than via the ''∑MOD'' menu/launcher | Word Size can also be set directly from a ''16C'' keyboard function ''16WSZ'' accessed via <key>16C</key> <key>SHIFT</key> <key>5</key> rather than via the ''∑MOD'' menu/launcher |
| |
| <key>'?'</key> displays the current settings (**press ''?'' then quickly press and hold it to read the displayed info**) | <key>'?'</key> displays the current settings (**press ''?'' then quickly press and hold it to read the displayed info**) |
| Some trial and error is needed to find what you want, but it starts: | Some trial and error is needed to find what you want, but it starts: |
| |
| ''16C'' ''XEQ'' -> ''R: L LN RN R'' which is a menu to do bit-rotations. | <key>16C</key> <key>XEQ</key> -> ''R: L LN RN R'' which is a menu to do bit-rotations. |
| |
| Rotate 1-bit Left by pressing top-row button ''B'' | Rotate 1-bit Left by pressing top-row button <key>B</key> |
| |
| Rotate N-bits left with top-row button ''C'' (and enter the number of bits) | Rotate N-bits left with top-row button <key>'C'</key> (and enter the number of bits) |
| |
| Rotate N-bits Right with top-row button ''D'' (and enter the number of bits) | Rotate N-bits Right with top-row button <key>D</key> (and enter the number of bits) |
| |
| Rotate 1-bit Right with top-row button ''E''. | Rotate 1-bit Right with top-row button <key>E</key>. |
| |
| From the ''R'' menu: | From the ''R'' menu: |
| |
| ''A'' give the ''S: L LN RN R'' menu to ''SHIFT'' bits Left or Right | <key>'A'</key> give the ''S: L LN RN R'' menu to ''SHIFT'' bits Left or Right |
| |
| From the ''S'' menu: | From the ''S'' menu: |
| |
| ''XEQ'' gives ''∑R : ...................... '' which gives lots of options to do things //rightwards// with the bits. FIXME list them | <key>XEQ</key> gives ''∑R : ...................... '' which gives lots of options to do things //rightwards// with the bits. FIXME list them |
| |
| This goes on via ''XEQ'' and ''SHIFT'' (''ORANGE'' button) to access several //menu launchers//. Trial and Error and muscle memory. | This goes on via <key>XEQ</key> and <key>SHIFT</key> (''ORANGE'' button) to access several //menu launchers//. Trial and Error and muscle memory. |
| |
| |
| === A brief map/list of launchers === | === A brief map/list of launchers === |
| | |
| |
| ** assumes ''16KEYS'' is active** | <key>16C</key><key>XEQ</key> -> ''∑ROT'' |
| | |
| | |
| <key>XEQ</key> -> ''∑ROT'' | |
| | |
| ''∑ROT'' -> <key>XEQ</key> -> ''∑LEFT'' -> <key>XEQ</key> -> ''∑MOD'' -> <key>XEQ</key> -> ''∑ROT'' | ''∑ROT'' -> <key>XEQ</key> -> ''∑LEFT'' -> <key>XEQ</key> -> ''∑MOD'' -> <key>XEQ</key> -> ''∑ROT'' |
| ===== Registers etc ===== | ===== Registers etc ===== |
| |
| Numbers can be saved in ''16C'' registers via ''16C'' ''STO'' ''NN'' | Numbers can be saved in ''16C'' registers via <key>16C</key> <key>STO</key> ''NN'' |
| |
| e.g. save a ''subnet mask'' of ''11111100'' into REG ''00'' (a **/30** network ''255.255.255.252'') | e.g. save a ''subnet mask'' of ''11111100'' into ''16C'' REG ''00'' (i.e. the last octet of a **/30** network ''255.255.255.252'') |
| |
| ''16C'' ''B'' (go to BINARY mode) | <key>16C</key> <key>B</key> (go to BINARY mode) |
| |
| ''16C'' ''16NPT'' ''11111100'' ''ENTER'' ''16C'' ''STO'' ''00'' | <key>16C</key> <key>16NPT</key> ''11111100'' <key>ENTER</key> <key>16C</key> <key>STO</key> ''00'' |
| |
| ==== Use the stored value ==== | ==== Use the stored value ==== |
| What is ''123'' ''AND'' ''MASK'' ? (what's the //network// base number for host address of 123 using a netmask of 252?) | What is ''123'' ''AND'' ''MASK'' ? (what's the //network// base number for host address of 123 using a netmask of 252?) |
| |
| ''16C'' ''D'' (decimal so you can enter ''123'' rather than a BINARY number) | <key>16C</key> <key>D</key> (decimal so you can enter ''123'' rather than a BINARY number) |
| |
| ''16C'' ''16NPT'' ''123'' ''ENTER'' | <key>16C</key> <key>16NPT</key> ''123'' <key>ENTER</key> |
| |
| recall mask (it doesn't matter that it was initially stored as a BINARY number, it's displayed in whatever base you are currently using) | recall mask (it doesn't matter that it was initially stored as a BINARY number, it's displayed in whatever base you are currently using) |
| |
| ''16C'' ''RCL'' ''00'' | <key>16C</key> <key>RCL</key> ''00'' |
| |
| ''AND'' them | ''AND'' them |
| |
| ''16C'' ''SHIFT'' ''x'' | <key>16C</key> <key>SHIFT</key> <key>'x'</key> |
| |
| answer is ''120'' | answer is ''120'' |
| Net address of a host with address ''43''? | Net address of a host with address ''43''? |
| |
| ''16C'' ''D'' | <key>16C</key> <key>D</key> |
| |
| ''16C'' ''16NPT'' ''43'' ''ENTER'' | <key>16C</key> <key>16NPT</key> ''43'' <key>ENTER</key> |
| |
| ''16C'' ''RCL'' ''00'' | <key>16C</key> <key>RCL</key> ''00'' |
| |
| ''16C'' ''SHIFT'' ''X'' | <key>16C</key> <key>SHIFT</key> <key>'x'</key> |
| |
| answer : ''40'' | answer : ''40'' |
| ===== Most Used Functions ===== | ===== Most Used Functions ===== |
| |
| ''16C'' = ''LN'' (i.e. ''E'' on top-row) | <key>16C</key> = <key>LN</key> (i.e. <key>E</key> on top-row) |
| |
| ''16NPT'' = ''∑+'' (i.e. ''A'' on top-row, must be triggered with ''16C'') ((if you forget the ''16C'' and hit ''∑+'' directly you'll probably end up with the ''complex number'' module keyboard triggger ''Z:'')) | <key>16NPT</key> = <key>'∑+'</key> (i.e. <key>'A'</key> on top-row, must be triggered with <key>16C</key>) ((if you forget the <key>16C</key> and hit <key>'∑+'</key> directly you'll probably end up with the ''complex number'' module keyboard trigger ''Z:'')) |
| |
| ''16C'' ''16NPT'' ''type in a number'' ''ENTER'' (enter a number in whatever base is currently selected) | <key>16C</key> <key>16NPT</key> ''type in a number'' <key>ENTER</key> (enter a number in whatever base is currently selected) |
| |
| ''BIN'' ''OCT'' ''DEC'' ''HEX'' = ''16C'' then one of top-row buttons ''B'', ''C'', ''D'', ''E'' (select the required base) | ''BIN'' ''OCT'' ''DEC'' ''HEX'' = <key>16C</key> then one of top-row buttons <key>'B'</key>, <key>'C'</key>, <key>'D'</key>, <key>'E'</key> (select the required base) |
| |
| ''∑MOD'' = ''16C'' ''USR'' .... or ''16C'' ''SHIFT'' ''2'' (open a settings menu to set the choice of mode/word/signed) | ''∑MOD'' = <key>16C</key> <key>USR</key> .... or <key>16C</key> <key>SHIFT</key> <key>2</key> (open a settings menu to set the choice of mode/word/signed) |
| |
| ''NOT'' / ''OR'' / ''AND'' / ''XOR'' = ''16C'' ''SHIFT'' then one of ''-'' ''+'' ''x'' ''÷'' (logic functions) | ''NOT'' / ''OR'' / ''AND'' / ''XOR'' = <key>16C</key> <key>SHIFT</key> then one of ''-'' ''+'' ''x'' ''÷'' (logic functions) |
| |
| ''RR'' / ''RL'' = ''16C'' then one of ''SIN'' or ''COS'' (rotate Left or Right 1-bit) | ''RL'' / ''RR'' = <key>16C</key> then one of <key>SIN</key> or <key>COS</key> (rotate Left or Right 1-bit) |
| |
| ''RRN'' / ''RLN'' = ''16C'' ''SHIFT'' then one of ''SIN'' or ''COS'' (rotate Left or Right N-bits) | ''RLN'' / ''RRN'' = <key>16C</key> <key>SHIFT</key> then one of <key>SIN</key> or <key>COS</key> (rotate Left or Right N-bits _ _) |
| |
| ''SLN'' = ''16C'' ''TAN'' (shift Left N-bits) | ''SLN'' = <key>16C</key> <key>TAN</key> (shift Left N-bits _ _) |
| |
| ''SRN'' = ''16C'' ''SHIFT'' ''TAN'' (shift Right N-bits) | ''SRN'' = <key>16C</key> <key>SHIFT</key> <key>TAN</key> (shift Right N-bits _ _) |
| |
| ''Sb'' = ''16C'' ''SHIFT'' ''7'' (set a bit _ _) | ''Sb'' = <key>16C</key> <key>SHIFT</key> <key>7</key> (set a bit _ _) |
| |
| ''Cb'' = ''16C'' ''SHIFT'' ''8'' (clear a bit _ _) | ''Cb'' = <key>16C</key> <key>SHIFT</key> <key>8</key> (clear a bit _ _) |
| |
| ''B?'' = ''16C'' ''SHIFT'' ''9'' (is a bit set or not?) | ''B?'' = <key>16C</key> <key>SHIFT</key> <key>9</key> (is a bit _ _ set or not?) |
| |
| ''#BITS'' = ''16C'' ''SHIFT'' ''∑+'' (i.e. ''A'' on top-row) (how many bits are high?) | ''#BITS'' = <key>16C</key> <key>SHIFT</key> <key>'∑+'</key> (i.e. <key>'A'</key> on top-row) (how many bits are high?) |
| |
| See [[#Keyboard Overlay]] Pic above for more hints on ''16C'' key assignments | See [[#Keyboard Overlay]] Pic above for more hints on ''16C'' key assignments |
| |
| |
| | ===== Further Reading ===== |
| |
| |
| Page last updated: ~~LASTMOD~~ | Page last updated: ~~LASTMOD~~ |
| |
| {{tag>dm41x calculator}} | {{tag>calculator dm41x}} |
| |
| |