need help with subtracting bases other than 10 and adding

Btoney1977

New member
Joined
Feb 4, 2010
Messages
1
hi i do not understand how to subtract other bases like binary or octal. i also am having problems adding this hexadecimal problem: 43A(base 16) +496(base 16). i keep getting stuck because the A=10and I add it to the 6 and get 16(base 16). can any one break down an example of subtracts other bases and help me solve the hexadecimal problem?
 
Change 'em to base 10, do the addition or subtraction, change result to base 16 (or whatever)...
 
Btoney1977 said:
hi i do not understand how to subtract other bases like binary or octal. i also am having problems adding this hexadecimal problem: 43A(base 16) +496(base 16). i keep getting stuck because the A=10and I add it to the 6 and get 16(base 16). can any one break down an example of subtracts other bases and help me solve the hexadecimal problem?

Think about what happens in base 10, when you have an addition problem like

8 + 2

Eight 'ones' plus two 'ones' becomes ten 'ones'...and we write that as one ten + zero ones, or 10.

So....in the hexadecimal system,

A + 6 means ten 'ones' plus six 'ones' which gives you sixteen 'ones'....but we can write that as one sixteen + zero ones, or 10[sub:3gzyy61l]16[/sub:3gzyy61l]. So, you'd write a 0 in the 'ones' place, and carry 1 to the 'sixteens' place.

You might find it helpful to search the internet for information on addition and subtraction in other bases...I found this site, which has both addition and multiplication tables that can be modified to the base you're interested in.

http://www.cut-the-knot.org/blue/SysTab ... able.shtml
 
It can help a lot to do non-base 10 arithmetic using a few extra steps.

base 2 (binary)
Code:
    0  1  1  0
+   1  1  0  1
---------------
   (1)(2)(1)(1)
Then, wherever you have a number larger than the base (2 in this case), subtract the base and add 1 to the next column.
Code:
        (1)  (2) (1)(1) 
=      (1+1)(2-2)(1)(1) 
=       (2)  (0) (1)(1)
= (0+1)(2-2) (0) (1)(1)
=  (1)  (0)  (0) (1)(1)
= 10011
And an example in base 16 (hexadecimal)
Code:
    A  7 = (10) ( 7)
+   C  D = (12) (13)
           ---------
           (22) (20)
And again, subtract the base (16 now) from one column and add 1 to the column on the left.
Code:
        (22+ 1) (20-16)
=        (23)     (4)
= (0+1) (23-16)   (4)
=  (1)    (7)     (4)
Using this method, you can approach problems in any base using the base 10 math that you're used to. The same technique works for subtraction.
 
Top