Professional Documents
Culture Documents
Mic Micproject Ayush Sasane 232
Mic Micproject Ayush Sasane 232
CERTIFICATE
Submitted by:
Computer tech.
A PROJECT REPORT ON
Submitted by:
Examiner’s Certificate
Submitted by:
Computer tech.
Introduction:-
In this project we've executed the program to
"Convert the BCD no. into Hexadecimal no.
binary coded decimal) number.
To convert BCD to hexadecimal at first we
have to cut the BCD digits. The most
significant digit will be multiplied with 0AH
(10D), and then least significant digit will be
added with the result of multiplication.
Thus, the BCD will be converted to its
equivalent hexadecimal form.
The code of our project is:
Algorithm:
START
BL=BLAND 0F
dududu
AL=AL AND F0
DL=0AH
AL= AL BL
End
CODE/PROGRAM:
.MODEL SMALL
.STACK 100H
.DATA
BCD DB '1234'
HEX_NUM DW 0
MULT_FACTOR DW 1000
DIGIT_COUNT DW 4
.CODE
MOV AX , @DATA ; Initializing Data Segment
MOV DS , AX
MOV BX , 10 ; Initialize Division Factor
MOV CX , DIGIT_COUNT ; Initialize memory pointer
LEA SI , BCD
UP:
MOV AL , [SI] ;Read digit from BCD
AND AX , 000FH ;Mask required digit
MUL MULT_FACTOR ; Multiply by multiplication factor
ADD HEX_NUM , AX ; Add to HEX Number
MOV AX , MULT_FACTOR ; Change Multiplication Factir
MOV DX , 00
DIV BX
MOV MULT_FACTOR , AX
INC SI
LOOP UP; Is a last digit if no jump to up
MOV AX , HEX_NUM
MOV AH , 4CH ; Service Routine for Exit
INT 21H
END
The output of our project is:-
CONCLUSION:
In this project we conclude how to convert BCD
number to Hexadecimal using assembly
language.