Enter Decimal Number: 12 Binary Value= 1100. C program to convert binary to decimal. Previously we have already converted Decimal to Binary. Now we will convert Binary to Decimal. For convert Binary to Decimal we need to calculate power. So, we will use pow function defined under standard library function math.h.
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 .