answersLogoWhite

0


Best Answer

s v i e t k a n u r u .t k

MULTIPLICATION OF TWO 8 -- BIT NUMBERS

AIM:

To perform multiplication of two 8 -- bit numbers using 8051 instruction set.

ALGORITHM:

1.

Get the data in A -- reg.2.

Get the value to be multiplied in B -- reg.3.

Multiply the two data4.

The higher order of the result is in B -- reg.5.

The lower order of the result is in A -- reg.6.

Store the results.

PROGRAM:

ORG 4100CLR CMOV A,#data1MOV B,#data2MUL ABMOV DPTR,#4500MOVX @DPTR,AINC DPTR MOV A,BMOVX @DPTR,AHERE: SJMP HERE

User Avatar

Wiki User

12y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

12y ago

MVI E, 00 : Quotient = 0

LHLD 2200H : Get dividend

LDA 2300 : Get divisor

MOV B, A : Storedivisor

MVI C, 08 : Count = 8

NEXT: DAD H : Dividend = Dividend x 2

MOV A, E

RLC

MOV E, A : Quotient = Quotient x 2

MOV A, H

SUB B : Is most significant byte of Dividend > divisor

JC SKIP : No, go to Next step

MOV H, A : Yes, subtract divisor

INR E : and Quotient = Quotient + 1

SKIP:DCR C : Count = Count - 1

JNZ NEXT : Is count =0 repeat

MOV A, E

STA 2401H : Store Quotient

Mov A, H

STA 2410H : Store remainder

HLT

This answer is:
User Avatar

User Avatar

Wiki User

11y ago

Lhld 2000h

sphl

lhld 3000h

xchg

lxi h,0000h

lxi b,0000h

next: dad sp

jnc ahead

inx b

ahead: dcx d

mov a,e

ora d

jnz next

shld 2008h

mov l,c

mov h,b

shld 200ah

hlt

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Write a program to multiply two 8 bit signed numbers using 8085 microprocessor?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What are signed numbers?

Signed numbers are "plus" and "minus" numbers.


Write an assembly language program to multiply an 8-bit signed number by a 8-bit signed number?

MVI A, 30h MVI B 20h MUL A,B OUT port1 HLT


How do signed numbers differ from integers?

Positive signed numbers with have a + Positive integers will not.


What is the basic difference between MUL and IMUL instruction in 8086 microprocessor?

mul is used for unsigned multiplication whereas imul is used for signed multiplication. Algorithm for both are same, which is as follows:when operand is a byte:AX = AL * operand.when operand is a word:(DX AX) = AX * operand.But, the difference is that mul instruction multiplies only unsigned numbers whereas imul instruction does the same for signed numbers.


How do you use signed numbers in real life?

Signed numbers are used for:TemperatureMoney, Accounting, or EconomyMath Problems


Why do you need to learn addition of signed numbers first before subtraction signed numbers?

its cuz ur ugly........


In a microprocessor command ADD B means?

ADD B in a microprocessor means to add the contents of the accumulator to the B register and store the result in the accumulator. Flags are set according to the result - Z if zero, C if an unsigned carry occurred, AC if a BCD carry occurred, N if the result is signed negative, O if the parity is odd, OV if a signed overflow occurred. Note that not every microprocessor has every flag listed.


What is the biggest number that 1byte can hold?

The range for signed numbers is -128 to +127. The range for signed numbers is 0 to 255.


Rules in operation for signed numbers?

rules of operation sign of numbers


Why is it necessary to learn addition of signed numbers before learning subtraction of signed numbers?

i'm so sorry... i don't know also...


Where do you use sign binary number?

Whenever a computer program uses integers - for example, in a game, to store a player's score, but also for many other situations - this will internally be stored as a binary number. This number may be signed or unsigned. Some programming languages, such as Java, only use signed numbers. In other cases, the programmer may decide to use either signed or unsigned numbers, depending on his needs.


What are the numbers of delegates that signed the Constitution?

39