{"id":29658,"date":"2020-12-29T11:45:40","date_gmt":"2020-12-29T10:45:40","guid":{"rendered":"https:\/\/hooxies.nl\/?page_id=29658"},"modified":"2026-11-25T21:07:29","modified_gmt":"2026-11-25T20:07:29","slug":"dhhd","status":"publish","type":"page","link":"https:\/\/hooxies.nl\/?page_id=29658","title":{"rendered":"DHHD"},"content":{"rendered":"<p><b>Display<\/b><br \/>\n<a rel=\"hp-41cx_dhhd\" href=\"https:\/\/hooxies.nl\/wp-content\/uploads\/2020\/12\/dhhd.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/hooxies.nl\/wp-content\/uploads\/2020\/12\/dhhd.png\" alt=\"\" width=\"226\" height=\"104\"\/><\/a> <a rel=\"hp-41cx_dhhd\" href=\"https:\/\/hooxies.nl\/wp-content\/uploads\/2023\/02\/dhhd-dm41x.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/hooxies.nl\/wp-content\/uploads\/2023\/02\/dhhd-dm41x.png\" alt=\"\" width=\"174\" height=\"104\" \/><\/a> <br \/>\n<em>(HP-41CX, Hewlett Packard 1983 and DM41X, <a href=\"https:\/\/www.swissmicros.com\/\" rel=\"noopener noreferrer\" target=\"_blank\">SwissMicros<\/a> 2020)<\/em><br \/>\n&nbsp;<\/p>\n<p><b>Overview<\/b><br \/>\nPrograms <tt>DHHD<\/tt>, <tt>D-H<\/tt> and <tt>H-D<\/tt> convert decimal to hexadecimal numbers and vice versa. The <tt>DHHD<\/tt> program combines both ways conversions and programs the \u201cD\u201d and \u201cH\u201d keys in User Mode for direct access to the respective conversions.<br \/>\nMany conversion programs have been created by several users aiming to build with the least number of  bytes for the programs. The ones in this document require HP-41CX functions AROT, XTOA and ATOX.<br \/>\n&nbsp;<\/p>\n<p><b>Conversions<\/b><br \/>\nThe decimal versus hexadecimal values are shown below for the base range:<\/p>\n<pre>\r\nDecimal:     0  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15\r\nHexadecimal: 0  1  2  3  4  5  6  7  8  9  A  B  C  D  E  F\r\n<\/pre>\n<p>The conversion from hexadecimal to decimal is simply straightforward. The base 16 is to be used as follows for the hexadecimal number <b>35DA8<sub>16<\/sub><\/b>:<\/p>\n<pre>\r\n    8:  8x160 =      8\r\n    A: 10x161 =    160\r\n    D: 13x162 =   3328\r\n    5:  5x163 =  20480\r\n    3:  3x164 = 196608 +\r\n                <b>220584<sub>10<\/sub><\/b><\/pre>\n<p>Converting this number 220584 to a hexadecimal requires a division by 16 as follows:<\/p>\n<pre>\r\n220584\/16 = 13786.5000 &#8658; remainder 16*0.5000 =  8 &#8658; <b>8<sub>16<\/sub><\/b>\r\n 13786\/16 =   861.6250 &#8658; remainder 16*0.6250 = 10 &#8658; <b>A<sub>16<\/sub><\/b>\r\n   861\/16 =    53.8125 &#8658; remainder 16*0.8125 = 13 &#8658; <b>D<sub>16<\/sub><\/b>\r\n    53\/16 =     3.3125 &#8658; remainder 16*0.3125 =  5 &#8658; <b>5<sub>16<\/sub><\/b>\r\n     3\/16 =     0.1875 &#8658; remainder 16*0.1875 =  3 &#8658; <b>3<sub>16<\/sub><\/b>\r\n                                                 <b>35DAB<sub>16<\/sub><\/b><\/pre>\n<p>&nbsp;<\/p>\n<p><b>Example 1: D-H<\/b><br \/>\n<a rel=\"hp-41cx_dhhd\" href=\"https:\/\/hooxies.nl\/wp-content\/uploads\/2020\/12\/dhhd-example1.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/hooxies.nl\/wp-content\/uploads\/2020\/12\/dhhd-example1-413x77.png\" alt=\"\" width=\"413\" height=\"77\" \/><\/a><br \/>\n&nbsp;<\/p>\n<p><b>Example 2: H-D<\/b><br \/>\n<a rel=\"hp-41cx_dhhd\" href=\"https:\/\/hooxies.nl\/wp-content\/uploads\/2020\/12\/dhhd-example2.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/hooxies.nl\/wp-content\/uploads\/2020\/12\/dhhd-example2-413x89.png\" alt=\"\" width=\"413\" height=\"89\" \/><\/a><br \/>\n&nbsp;<\/p>\n<p><b>Example 3: DHHD<\/b><br \/>\n<a rel=\"hp-41cx_dhhd\" href=\"https:\/\/hooxies.nl\/wp-content\/uploads\/2020\/12\/dhhd-example3.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/hooxies.nl\/wp-content\/uploads\/2020\/12\/dhhd-example3-413x185.png\" alt=\"\" width=\"413\" height=\"185\" \/><\/a><br \/>\n&nbsp;<\/p>\n<p><b>Program Listing<\/b><br \/>\nThe listing of programs D-H, H-D and DHHD is given below:<br \/>\n<a rel=\"hp-41cx_dhhd\" href=\"https:\/\/hooxies.nl\/wp-content\/uploads\/2020\/12\/dhhd-program.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/hooxies.nl\/wp-content\/uploads\/2020\/12\/dhhd-program.png\" alt=\"\" width=\"413\" height=\"385\" \/><\/a><br \/>\n&nbsp;<\/p>\n<p><b>Registers, Labels and Flags<\/b><br \/>\n<a rel=\"hp-41cx_dhhd\" href=\"https:\/\/hooxies.nl\/wp-content\/uploads\/2020\/12\/dhhd-registers.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/hooxies.nl\/wp-content\/uploads\/2020\/12\/dhhd-registers-413x98.png\" alt=\"\" width=\"413\" height=\"98\" \/><\/a><br \/>\n&nbsp;<\/p>\n<p><b>Downloads<\/b><br \/>\nPDF format of program <a rel=\"hp-41cx_dhhd\" href=\"https:\/\/hooxies.nl\/wp-content\/uploads\/2023\/02\/dhhd.pdf\">DHHD<\/a>.<br \/>\nRAW\/TXT format of program <a href=\"https:\/\/hooxies.nl\/wp-content\/uploads\/2020\/12\/dhhd.zip\">DHHD<\/a> (in zip file).<br \/>\n&nbsp;<\/p>\n<div style=\"font-size: 12px;\">This program is copyright and is supplied without representation or warranty of any kind. The author assumes no responsibility and shall have no liability, consequential or otherwise, of any kind arising from the use of this program material or any part thereof<\/div>\n<p><i>&copy; 2006-2020 by Auke Hoekstra<\/i><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Display (HP-41CX, Hewlett Packard 1983 and DM41X, SwissMicros 2020) &nbsp; Overview Programs DHHD, D-H and H-D convert decimal to hexadecimal numbers and vice versa. The DHHD program combines both ways conversions and programs the \u201cD\u201d and \u201cH\u201d keys in User Mode for direct access to the respective conversions. Many conversion programs have been created by [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":2,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_oct_exclude_from_cache":false,"footnotes":""},"class_list":["post-29658","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/hooxies.nl\/index.php?rest_route=\/wp\/v2\/pages\/29658","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/hooxies.nl\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/hooxies.nl\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/hooxies.nl\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/hooxies.nl\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=29658"}],"version-history":[{"count":1,"href":"https:\/\/hooxies.nl\/index.php?rest_route=\/wp\/v2\/pages\/29658\/revisions"}],"predecessor-version":[{"id":57396,"href":"https:\/\/hooxies.nl\/index.php?rest_route=\/wp\/v2\/pages\/29658\/revisions\/57396"}],"up":[{"embeddable":true,"href":"https:\/\/hooxies.nl\/index.php?rest_route=\/wp\/v2\/pages\/2"}],"wp:attachment":[{"href":"https:\/\/hooxies.nl\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=29658"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}