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
Signed numbers are "plus" and "minus" numbers.
MVI A, 30h MVI B 20h MUL A,B OUT port1 HLT
Positive signed numbers with have a + Positive integers will not.
Learning multiplication of signed numbers first is essential because division is fundamentally the inverse operation of multiplication. Understanding how to multiply signed numbers helps establish the rules for handling positive and negative values, which are crucial for division. Once you grasp these multiplication rules, applying them to division becomes more intuitive, as you'll see that dividing by a negative number or a positive number follows the same principles established during multiplication. This foundational knowledge ensures a smoother learning curve when tackling division involving signed numbers.
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.
Signed numbers are used for:TemperatureMoney, Accounting, or EconomyMath Problems
its cuz ur ugly........
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.
The range for signed numbers is -128 to +127. The range for signed numbers is 0 to 255.
rules of operation sign of numbers
i'm so sorry... i don't know also...
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.