Advanced Boolean Functions - Printable Version +- HP Forums (https://www.hpmuseum.org/forum) +-- Forum: HP Software Libraries (/forum-10.html) +--- Forum: General Software Library (/forum-13.html) +--- Thread: Advanced Boolean Functions (/thread-14888.html) |
Advanced Boolean Functions - Eddie W. Shore - 04-25-2020 12:39 PM The programs NOTBIT, NAND, NOR, and IMPL are four advanced Boolean functions that work on Binary Numbers. You designate a bit size, up to 35, on each of these functions. There is no signed bit in these programs. Results are stored in the Alpha Register while the decimal equivalent is stored in the X register. HP 42S/DM42/Free 42 Program: NOTBIT Code:
Example: NOT 11011, bit size: 8 Result: NOT: 11100100 HP 42S/DM42/Free 42 Program: NAND a NAND b = NOT ( a AND b ) Code:
Example: 110011 NAND 111100, bit size: 8 Result: NAND: 11001111 HP 42S/DM42/Free 42 Program: NOR a NOR b = NOT ( a OR b ) Code:
Example: 110011 NOR 111100, bit size: 8 Result: NOR: 11000000 HP 42S/DM42/Free 42 Program: IMPL IMPL (Implication): a → b = (NOT a) OR b Code:
Example: 110011 IMPL 111100, bit size: 8 Result: IMPL: 11111100 You can download the raw files here: https://drive.google.com/open?id=19u8tPcX4_-o0lwvjUc0KO4-WSmhnxpwe Source: John W. Harris and Horst Stocker Handbook of Mathematics and Computation Science Springer: New York, NY. 2006. ISBN 978-0-387-94746-4 Blog Link: http://edspi31415.blogspot.com/2020/04/hp-42sdm42free-42-advanced-boolean.html RE: Advanced Boolean Functions - Nihotte(lma) - 04-25-2020 04:03 PM (04-25-2020 12:39 PM)Eddie W. Shore Wrote: The programs NOTBIT, NAND, NOR, and IMPL are four advanced Boolean functions that work on Binary Numbers. You designate a bit size, up to 35, on each of these functions. There is no signed bit in these programs. Results are stored in the Alpha Register while the decimal equivalent is stored in the X register. Thanks Eddie W. Shore, I'm interesting to know : are you writing some programmable robot or other compiler ? RE: Advanced Boolean Functions - Eddie W. Shore - 04-25-2020 06:13 PM Not at the moment. |