Advanced Boolean Functions
|
04-25-2020, 12:39 PM
Post: #1
|
|||
|
|||
Advanced Boolean Functions
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=19u8tPc...-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/h...olean.html |
|||
04-25-2020, 04:03 PM
Post: #2
|
|||
|
|||
RE: Advanced Boolean Functions
(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 ? |
|||
04-25-2020, 06:13 PM
Post: #3
|
|||
|
|||
RE: Advanced Boolean Functions
Not at the moment.
|
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 2 Guest(s)