LXI H, 6000H : Initialize memory pointer
MVI C, 00H : Initialize number counter
MVI B, 00H : Initialize negative number counter
MVI E, 00H : Initialize zero number counter
BEGIN:MOV A, M : Get the number
CPI 00H : If number = 0
JZ ZERONUM : Goto zeronum
ANI 80H : If MSB of number = 1i.e. if
JNZ NEGNUM number is negative goto NEGNUM
INR D : otherwise increment positive number counter
JMP LAST
ZERONUM:INR E : Increment zero number counter
JMP LAST
NEGNUM:INR B : Increment negative number counter
LAST:INX H : Increment memory pointer
INR C : Increment number counter
MOV A, C
CPI 32H : If number counter = 5010 then
JNZ BEGIN : Store otherwise check next number
LXI H, 7000 : Initialize memory pointer.
MOV M, B : Store negative number.
INX H
MOV M, E : Store zero number.
INX H
MOV M, D : Store positive number.
HLT : Terminate execution
Any 2 negative numbers, whether even or odd, when multiplied are positive
If the negative number is bigger then the answer will be negative If the bigger number is positive then the answer will be positive. All you do is subtract the two numbers and take the sign of the bigger number Ex (+2)+(-7)=(-5)
noNo. There are positive and negative integers. Zero is also an integer.-----------------------An integer simply means a whole number/value. It shouldn't matter whether it is positive or negative.
You can classify them according to whether they are positive, zero or negative; whether they are integers or not, whether they are unit fractions or not and so on.
If the two numbers that are being multiplied or divided have the SAME sign, the answer is positive, if they have DIFFERENT signs, the answer will be negative.
write a c++program by using if statement to read a number and check whether it is positive or negative
the answer could be negative or positive depending on whether the negative number you're adding is bigger than the positive number
Any 2 negative numbers, whether even or odd, when multiplied are positive
the answer is a positive because two negative or two positive is always positive.
No. Every integer, whether negative or positive, is rational.
Only whole numbers are integers, whether negative or positive.
When you divide or multiply positive and negative numbers, you first do the division or multiplication as normal. The next step is to assess whether or not the answer will be negative or positive. If the two numbers of the question were the same (negative and negative or positive and positive) then the answer will be positive. If the two numbers in the question were different (one negative and one positive) then the answer will be negative. Thus, if you divide a negative number by a positive number, the result will be the same as normal division, but the answer will be negative.
Criticism is having a comment for something and delivering it, whether in a positive or completely negative way. Criticism is having a comment for something and delivering it, whether in a positive or completely negative way.
Any integer, whether it is positive or negative, is a rational number.
You will end up with a negative value. It does not matter whether the numerator or denominator is negative. If either value is negative, the answer will be negative.
If the negative number is bigger then the answer will be negative If the bigger number is positive then the answer will be positive. All you do is subtract the two numbers and take the sign of the bigger number Ex (+2)+(-7)=(-5)
The charges of the objects involved determine whether an electric force is attractive or repulsive. Like charges (positive-positive or negative-negative) will repel each other, while opposite charges (positive-negative) will attract each other.