MUL AB ADD A,R2 INC DPTR MOVX SJMP HERE HERE Hexadecimal to BCD LABEL
MNEMONICS MOV DPTR,#4600 MOVX MOV R5,A ANL A,#F0 SWAP A MOV R1,A MOV A,R5 ANL A,#0F MOV R2,A MOV A,R1 MOV F0,#0A Binary coded decimal (BCD) is a system of writing numerals that assigns a four-digit binary code to each digit 0 through 9 in a decimal (base-10) numeral. 8 bit two digit BCD number system into Hexadecimal number system. The hexadecimal number system (also called base-16) is a number system that uses 16 unique symbols to represent a particular value. 6.3 Program Logic: In this program, 8 bit two digit Hexadecimal number system into BCD number system.
6.2 Hardware Requirement: The 8051 Microcontroller kit, Power supply. Lab 6 Ex.No.6: BCD To Hexadecimal Conversion And Hexadecimal To BCD Conversion 6.1 Introduction: The purpose of this experiment is to obtain the BCD to HEXADECIMAL and viceversa of a given data using 8051 micro controller trainer kit.