Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 9

SANJIVANI RURAL EDUCATION SOCIETY’

SANJIVANI K. B. P. POLYTECHNIC KOPARGAON – 423603.

CERTIFICATE

This is to certify that, the project report entitled:


“CONVERT BCD NUMBER TO HEXADECIMAL”

Submitted by:

 SASANE AYUSH [232]


 SALUNKE PRANAV [226]

Mr. M.R. GAIKWAD PROF G.N. JORVEKER

Project Guide H.O.D

Computer tech.
A PROJECT REPORT ON

“CONVERT BCD NUMBER TO HEXADECIMAL”

Submitted by:

 SASANE AYUSH [232]


 SALUNKE PRANAV [226]

Second Year Diploma In Computer Technology


Under the Guidance of:
Mr. M.R.GAIKWAD
Department Of Computer Technology
SRES, Sanjivani K.B.P Polytechnic Kopargaon – 423601
MSBTE, Mumbai
DEPARTMENT OF COMPUTER TECHNOLOGY,
SANJIVANI K.B.P POLYTECHNIC, KOPARGAON.
(2020-21)

Examiner’s Certificate
Submitted by:

 SASANE AYUSH [232]


 SALUNKE PRANAV [226]

Mr. M.R.GAIKWAD PROF G.N. JORVEKER

Project Guide H.O.D

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:

1.Start with the rightmost byte of the BCD


number and process from right to left.
2.Multiply the first rightmost BCD digit by 1, the
second rightmost digit by 10(0AH), The third by
100(64H) and so on, and sum the products
 FLOWCHART:

START

SI= Memory address to get the number

BL= data from memory

BL=BLAND 0F

dududu

AL= data from memory again

AL=AL AND F0

Rotate AL to right four times

DL=0AH

AL= AL BL

Store AL into memory

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.

You might also like