{"id":9915,"date":"2021-07-02T22:05:23","date_gmt":"2021-07-02T22:05:23","guid":{"rendered":"https:\/\/papersspot.com\/blog\/2021\/07\/02\/use-a-flat-assembler-write-a-program-that-converts-8-bit-integer-to-binary-and-hexadecimal-using-bitwise-operators\/"},"modified":"2021-07-02T22:05:23","modified_gmt":"2021-07-02T22:05:23","slug":"use-a-flat-assembler-write-a-program-that-converts-8-bit-integer-to-binary-and-hexadecimal-using-bitwise-operators","status":"publish","type":"post","link":"https:\/\/papersspot.com\/blog\/2021\/07\/02\/use-a-flat-assembler-write-a-program-that-converts-8-bit-integer-to-binary-and-hexadecimal-using-bitwise-operators\/","title":{"rendered":"use a flat assembler, write a program that converts 8-bit integer to binary and hexadecimal using bitwise operators."},"content":{"rendered":"<p>Do not use external functions. You may use the algorithm below. <br \/>Algorithm to convert Value to binary: (1) set Count to 0 (2) AND Value with 128 (binary 10000000) and store into Temp (3) if result is zero, output &#8220;0&#8221; (4) if result is not zero, output &#8220;1&#8221; (5) shift Temp left (6) increment Count (7) if Count &lt;= 8, jump to step (2) <br \/>Algorithm to convert Value to hexadecimal: (1) shift Value right 4 digits and store into Temp (2) if Temp =10, add 55 to Temp and print the ASCII character (4) AND Value with 240 (binary 00001111) and store into Temp (5) if Temp =10, add 55 to Temp and print the ASCII character <br \/>Example outputThis x86 assembly program converts an integer to binary and hex. <br \/>Enter an integer from 0 &#8211; 255: 73Binary: 01001001 <\/p>\n","protected":false},"excerpt":{"rendered":"<p>Do not use external functions. You may use the algorithm below. Algorithm to convert Value to binary: (1) set Count to 0 (2) AND Value with 128 (binary 10000000) and store into Temp (3) if result is zero, output &#8220;0&#8221; (4) if result is not zero, output &#8220;1&#8221; (5) shift Temp left (6) increment Count [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[28],"class_list":["post-9915","post","type-post","status-publish","format-standard","hentry","category-research-paper-writing","tag-computer-science"],"_links":{"self":[{"href":"https:\/\/papersspot.com\/blog\/wp-json\/wp\/v2\/posts\/9915","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/papersspot.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/papersspot.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/papersspot.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/papersspot.com\/blog\/wp-json\/wp\/v2\/comments?post=9915"}],"version-history":[{"count":0,"href":"https:\/\/papersspot.com\/blog\/wp-json\/wp\/v2\/posts\/9915\/revisions"}],"wp:attachment":[{"href":"https:\/\/papersspot.com\/blog\/wp-json\/wp\/v2\/media?parent=9915"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/papersspot.com\/blog\/wp-json\/wp\/v2\/categories?post=9915"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/papersspot.com\/blog\/wp-json\/wp\/v2\/tags?post=9915"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}