Problem Statement :
Convert an 8 bit hex no to its binary form & store in memory
Source Program:
Convert an 8 bit hex no to its binary form & store in memory
Source Program:
* LXI H, 4150 : Initialize memory pointer
* MVI B, 08 : count for 8-bit
* MVI A, 54
* LOOP : RRC
* JC LOOP1
* MVI M, 00 : store zero it no carry
* JMP COMMON
* LOOP2: MVI M, 01 : store one if there is a carry
* COMMON: INX H
* DCR B : check for carry
* JNZ LOOP
* HLT : Terminate the program
Be the first to comment on "HEX to binary conversion"