{"id":3549,"date":"2019-02-12T16:09:23","date_gmt":"2019-02-12T16:09:23","guid":{"rendered":"https:\/\/cyflexdoc.wpengine.com\/usage-help-manual\/1-utilities-and-user-commands\/dec2hex\/"},"modified":"2026-02-11T13:54:45","modified_gmt":"2026-02-11T18:54:45","slug":"dec2hex","status":"publish","type":"page","link":"https:\/\/cyflex.com\/index.php\/usage-help-manual\/11-utilities-and-user-commands\/dec2hex\/","title":{"rendered":"dec2hex"},"content":{"rendered":"<div>\n<h3>Purpose:<\/h3>\n<\/div>\n<dl>\n<dd>\n<p>Convert a decimal number to its hexadecimal equivalent with an option for zero-padded output and output its binary representation.<\/p>\n<\/dd>\n<\/dl>\n<h3>Enter:<\/h3>\n<dl>\n<dd>\n<p><strong>dec2hex<\/strong> &lt;number&gt; [z]<\/p>\n<\/dd>\n<\/dl>\n<h3>Where:<\/h3>\n<dl>\n<dd>\n<table style=\"width: 85.28%;\" cellspacing=\"0\" cellpadding=\"0\">\n<colgroup>\n<col \/>\n<col \/><\/colgroup>\n<tbody>\n<tr>\n<td style=\"width: 7.79%;\">number<\/td>\n<td style=\"width: 743%;\">Specify the decimal number to convert.<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 7.79%;\">z<\/td>\n<td style=\"width: 743%;\">Optional. Specify this option to pad the hexadecimal output to at least 4 digits.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/dd>\n<\/dl>\n<h3>Example:<\/h3>\n<dl>\n<dd>\n<p><strong>dec2hex<\/strong> 1027<br \/>\nConvert to hex equivalent using minimum number of digits.<\/p>\n<p><strong>dec2hex<\/strong> 255 z<br \/>\nConvert to 4-digit hex equivalent padded with zero(s) if necessary.<\/p>\n<\/dd>\n<\/dl>\n<h3>Notes:<\/h3>\n<dl>\n<dd>\n<p>The program outputs the binary representation of the number after the hexadecimal conversion.<\/p>\n<\/dd>\n<\/dl>\n<h3>See Also:<\/h3>\n<dl>\n<dd>\n<p>&nbsp;<\/p>\n<\/dd>\n<\/dl>\n","protected":false},"excerpt":{"rendered":"<p>Purpose: Convert a decimal number to its hexadecimal equivalent with an option for zero-padded output and output its binary representation. Enter: dec2hex &lt;number&gt; [z] Where: number Specify the decimal number to convert. z Optional. Specify this option to pad the hexadecimal output to at least 4 digits. Example: dec2hex 1027 Convert to hex equivalent using [&hellip;]<\/p>\n","protected":false},"author":47,"featured_media":0,"parent":1948,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-3549","page","type-page","status-publish","hentry"],"post_mailing_queue_ids":[],"_links":{"self":[{"href":"https:\/\/cyflex.com\/index.php\/wp-json\/wp\/v2\/pages\/3549","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cyflex.com\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/cyflex.com\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/cyflex.com\/index.php\/wp-json\/wp\/v2\/users\/47"}],"replies":[{"embeddable":true,"href":"https:\/\/cyflex.com\/index.php\/wp-json\/wp\/v2\/comments?post=3549"}],"version-history":[{"count":0,"href":"https:\/\/cyflex.com\/index.php\/wp-json\/wp\/v2\/pages\/3549\/revisions"}],"up":[{"embeddable":true,"href":"https:\/\/cyflex.com\/index.php\/wp-json\/wp\/v2\/pages\/1948"}],"wp:attachment":[{"href":"https:\/\/cyflex.com\/index.php\/wp-json\/wp\/v2\/media?parent=3549"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}