Explain the procedure of sign modulus method and 2's complement method for storing positive & negative numbers
922610
In signed representation, a binary number contains two fields. One of the fields tells us what the sign of the number is. The other one tells us *something* about the size of the number.\n\nIf a signed binary number has n bits, then the field that describes the sign of the number occupies the most significant bit. The other (n-1) bits represent the field that describes the size of the number.\n\nSuppose then that you have some number - let's say +5.\n\nThe first thing that you need to do is to represent the magnitude of the number as an unsigned number:\n\n5 = 101\n\nNotice that we can represent 5 as a 3-bit unsigned number. When you represent the signed form of this number, we will end up adding a bit. This means that +4 will have a 4-bit signed representation.\n\nThe easiest problem to solve is representing a positive number. It doesn't matter if it's sign-magnitude (Hopefully, that's the same as what you're calling sign-modulus) or signed 2's complement. Just put a "0" sign bit in front of the unsigned magnitude.\n\n+5 = 0101\n\nSo whenever you see a positive number, just form its magnitude, and make sure that it is led by a zero sign bit. All positive numbers have the same representation, regardless of the binary format.\n\nThings get trickier when we start talking about negative numbers. But as I tell my students, you can always negate a number in any format if you know what the negation algortithm is for that format.\n\nIf you want to negate a number in sign-magnitude, *start with the positive number* and change the sign bit only:\n\nIf +5 = 0101, then -5 in sign-magnitude = 1101.\n\nCompare the two, and note that only the sign bit has changed.\n\nIf you want to negate a number in signed 2's complement, *start with the positive number* and change all of the bits.  Then add 1 to your result.\n\nAgain, if +5 = 0101, then -5 in signed 2's complement =\n\n1010 + 1 = 1011.\n\nNotice that the two codes for -5 look different, because they represent the same number in two different formats.\n\nWhen you work with a positive number, it doesn't matter which format it's in - you can always interpret the value of the number.\n\nBut when you work with a negative number, make sure that you know which signed format is being used to represent it.\n\nRecap:\n\nTo create a negative number in sign magnitude, start with the positive signed number and change the sign bit.\n\nTo create a negative number in signed 2's complement, start with the positive signed number, change all of the bits, and then add one to that result.\n\nI hope this answers your question!
19517
Same way the decimal system or any other base number system works.\n\nReading from right to left, you take that digit and multiply it by the base raised to the column number (with column numbers counting from 0, by 1s). Then you add the values up. \n\nexample of why 714 = 714:\nyou take the sum of:\n4 x 10 ^ 0 \n1 x 10 ^ 1\n7 x 10 ^ 2   \n\nwhich becomes\n4 x 1   = 4\n1 x 10  = 10\n7 x 100 = 700\n\n\nAdd them up and you get 714\n\nSo, 1011001 in base 2 (binary) would be the sum of:\n1 x 2 ^ 0\n0 x 2 ^ 1\n0 x 2 ^ 2\n1 x 2 ^ 3\n1 x 2 ^ 4\n0 x 2 ^ 5\n1 x 2 ^ 6\n\nwhich becomes\n1 x 1   = 1\n0 x 2   = 0\n0 x 4   = 0\n1 x 8   = 8\n1 x 16  = 16\n0 x 32  = 32\n1 x 64  = 64\n\nAdd them up, and 1011001 represents 89 in base 10.
895848
The opposite\n\ne.g. \nto cancel 5, add -5 to both sides\nto cancel x², add -x² to both sides\nto cancel -12x, add 12x to both sides\netc.
196018
Those are easy problems...what is the problem? For example,\n\ntake the 3x2 and decide whether or not it can be divided...(3x...\nthen take the whole number (10) and divide it by 2\n(3x +...\nto decide what sign you are going to use depends on whether the the undefined is a positive or neg...in this case all signs are positive\nso...we have (3x + --choose either the 5 or 2 and you will have to play with it a little to find exactly where it goes...\nwhen I did the problem I chose (3x + 5) (x +2) I did cross multiplication\n3x*x which = 3x2 + 3x*2 which = 6x (don't forget to line the numbers correctly)\nthen I multiplied 5*x = 5x 5*2 = 10\nbut that obviously didn't work because when you add 6x and 5x together it = 11x\nso I switched the numbers to read (3x +2) (x + 5) and do the same process over again...so that I cross multiplied 3x*x=3x2 + 3x*5=15x\n           2*x =2x +2*5=10\nadd up the numbers and it should read 3x2 +17x +10.\n\nthat should help you get started
960662
ry +s = tx - m\nYou must leave y alone for indicate its value in terms of other variables.\n\nFirst of all you move the s to the other side or the = as shown: ry =tx- m - s (you change the sign of s)\n\nThen you move the r as follows: y=(tx-m-s)/r\n\nAnd thats it \n\nYou have a restriction because the r has to be different than 0 to avoid a division by zero.  So restriction is r different from zero.
699207
(2c-3d)-(-7c-2d)\nThis is simply 2c-3d+7c+2d = 9c-d.\nThe negative sign is distributed.\n- (-7c) = + 7c\n- (-2d) = +2d\nThe leftover terms can be combined.\n2c +7c = 9c and -3d +2d = -d\nThus, the final answer is:\n9c-d
454426
i have a great logical reasoning for that.... here goes:\n1. there are two 2s, so you overlap them, making just one two. \n2. take the plus sign out for a second.\n2 1/2. the plus sign consists of 2 sticks, one horizantal and one vertical. \n3. the vertical came become a one and place it on the left of the 2. ( it makes 12)\n4. the other horizantal line can be used as a minus sign. \n5. Now, in the equal sign, it consists of two lines, both horizantal. \n5 1/2. if you leave one, and make the other diagonal, and attach in together, it makes a seven. \n6. so.. so far, it's is like this: 12-7=?\n7. ultimately, the answers five\nso there you have it, it sounds a little weird and strange, but it's really impossible to have a logical reasoning for 2+2=5... hehe
1091506
Easiest way to describe it is that it has expressed the formula as 9 + (-7). Register B just holds the value of -7. Simple as that.
181375
I would use a vector<double> to store the coefficients.\nAddition/subtraction are just coordinate-wise addition and subtraction of the two vectors. For multiplication you just add up products of coefficients. I would implement division by doing a long division with remainder.
917997
Simply loop through the list of numbers and compute:\n\n'number' modulo '2'\n\nIn C, that would be:\n\nnumber % 2\n\nA modulus of 2 would return a '1' for odd numbers, and '0' for even numbers (since even numbers divide by 2 with no remainder, and odd numbers divide by 2 with a remainder of 1).\n\nExample:\n\nint index;\nint numArray[25];\n\n...(store the 25 numbers in the array)...\n\nfor(index = 0; index < 25; index++) {\n     if(numArray[i] % 2) {\n          printf("%d&#92;n", numArray[i]);\n     }\n}
784373
So long as the absolute value of the sum total of the 2 negative numbers is greater than the absolute value of the sum of the 2 positive numbers the answer should be negative.\n\nExample:\n    (-4)+(-3)+(+2)+(+1)=(-4)\nAbsolute value of (-4)+(-3)= |7|\nAbsolute value of (+2)+(+1)=|3|\n7>3 and 7 is negative so the answer is -4
984884
Adding and subtracting:  You use the sign from the largest number.\n\nIn your example: 8x +6x + 2 + 10\nAll are positive.  You have 14x + 12\n\nLet's say you  have 8x - 6x.  the 8 is bigger and is positive so your answer is positive.  It's 2x.\n\nNow try 6x - 8x.  The 8x is negative and is the larger number.  So it is going to be negative.  The answer is - 2x.  \n\nIf multiplaying or dividing:\n\n+ and + is +\n+ and  - is -\n-  and -  is + \n\nYou must have to memorize those.  Remember, it's always positive unless one sign is positive and one negative.  Then it is negative.\n\nBest Wishes,\nSue
756529
For the mixed number, you know it will be 2 point something, so divide the top of the fraction by the bottom and attach this decimal to the 2.\n\nFor a negative, still divide the top by the bottom, just make the answer negative.
12600
In Custom format you can specify format as required by you.\nIt has three parts seperated by ;\n1st is for positive\n2nd is for negetive\n3rd is for Zero\nso you can specify as  follows to get the + sign displyed\n\n+#;-#;"Zero"
203937
The absolute value makes the inside (which is negative or positive) positive. Therefore there are always two answers, when x is negative and when x is positive\nLets say X is positive, we don't need the absolute value sign, since its already positive\n2X-4= 8\n2X=12\nX=6\nNow lets say X is negative. Well, multiply both sides by negative one (so that you can get rid of the absolute value sign) \n-1(2x-4)=8\n-2x+4=8\n-2X=4\nX=-2\nNow plug them into the equation\nabs(2(-2)-4)=8\nabs(-4-4)=8\nabso(-8)=8\nTherefore, the two solutions are 6, and -2
889816
1/rt3 *1/rt2-1/rt3\n[1/rt3](1/rt2-1)\n[1/rt3](1-rt2/rt2)\nrationalising\n[(1-rt2)*rt6]/6
843943
4, 0, -2, -2, 0\n\nFigure it out! Don't be lazy!