You are on page 1of 4

EX NO: 3

DATE:

NUMBER CONVERSIONS USING 8086

AIM: (a). To convert the BCD number to binary


(b). To convert the binary number to ASCII
APPARATUS REQUIRED: ASM SIMULATOR
(a) ALGORITHM:
Load the address in BCD data in BX register.
Get the BCD data in AL register.
Copy the BCD data in DL register.
Logically AND DL with OFh to mask the upper nibble and get units digit in DL.
Logically AND AL with FOh to mask the lower nibble.
Move the count value for rotation in CL register.
Rotate the count of AL to move the upper nibble to lower nibble position.
Move OAh to DH register
Multiply AL with DH register. Product is available at AL register.
Add the units digit in DL register to product in AL register
Save the binary data (AL) in memory.
FLOW CHART:

PROGRAM:

OBSERVATION TABLE:

(b) ALGORITHM:

.
FLOW CHART:

PROGRAM:

OBSERVATION TABLE:

You might also like