This document describes algorithms for converting between BCD and binary number representations and binary to ASCII. It outlines loading BCD data into registers, masking digits, rotating bits to convert to binary. Steps include multiplying the binary number by 10 and adding the remaining digit. For binary to ASCII, it will load binary data, but does not provide details of the algorithm or program. The aim is to demonstrate number conversions on an 8086 ASM simulator.
This document describes algorithms for converting between BCD and binary number representations and binary to ASCII. It outlines loading BCD data into registers, masking digits, rotating bits to convert to binary. Steps include multiplying the binary number by 10 and adding the remaining digit. For binary to ASCII, it will load binary data, but does not provide details of the algorithm or program. The aim is to demonstrate number conversions on an 8086 ASM simulator.
This document describes algorithms for converting between BCD and binary number representations and binary to ASCII. It outlines loading BCD data into registers, masking digits, rotating bits to convert to binary. Steps include multiplying the binary number by 10 and adding the remaining digit. For binary to ASCII, it will load binary data, but does not provide details of the algorithm or program. The aim is to demonstrate number conversions on an 8086 ASM simulator.
(b). To convert the binary number to ASCII APPARATUS REQUIRED: ASM SIMULATOR (a) ALGORITHM: Load the address in BCD data in BX register. Get the BCD data in AL register. Copy the BCD data in DL register. Logically AND DL with OFh to mask the upper nibble and get units digit in DL. Logically AND AL with FOh to mask the lower nibble. Move the count value for rotation in CL register. Rotate the count of AL to move the upper nibble to lower nibble position. Move OAh to DH register Multiply AL with DH register. Product is available at AL register. Add the units digit in DL register to product in AL register Save the binary data (AL) in memory. FLOW CHART: