Share with others

ASCII-Binary conversion in Assembly Language

Write a Assembly program for ASCII-Binary conversion with proper output . First of all do ASCII-Gray conversion by Dividing  the ASCII number by 2 until the quotient is 0 . 


Algorithm for ASCII-Binary conversion

Step I
         :    Get the number whose binary code equivalent is to be found.

Step II        :    Initialize count in CL = 08 H
Step III      :    Divide the number by 2 i.e. shift the number by 1 it to the left.
Step III      :    Display the bit shifted in carry.
Step IV      :    Decrement count
Step V       :    Check if count =0 ?
Step VI      :    If yes go to step  VII else go to step III.
Step VII     :    Stop.

Program Code for ASCII-Binary conversion

How to Run this Program
For Running this program you should have installed Tasm on you computer . If you have not installed Tasm  yet please install from Here .

Result : 0000 1010

Share with others