hi there,
i was wondering if someone could explain me how to do the addition and subtraction without transofrming the hex into decimal, is there any method that will not make me do all these calculations with the 16?
DEF15
+ED77
DEF15
-ED77
?
|
hi there,
i was wondering if someone could explain me how to do the addition and subtraction without transofrming the hex into decimal, is there any method that will not make me do all these calculations with the 16?
DEF15
+ED77
DEF15
-ED77
?
I do not know of anyway. Other then a table or from memory, and converting them to decimal.Originally Posted by asalvani
Or a computer program that does it for you. A spread sheet could, excel would. A data base would.
Sincerely,
William McCormick
Sure. But first let me ask how you learned to add. Do you do the 5 + 6 is 11. So that's 1, carry the 10 to the tens place?
If so, you just have to change your thinking slightly. 5 + 6 is A, with no carry. 8 + 8 is 10, which is 0, carry the 1 to the 16's place.
Hope that makes sense![]()
Originally Posted by Numsgil
Hex is messed up.
0=0
1=1
2=2
3=3
4=4
5=5
6=6
7=7
8=8
9=9
A=10
B=11
C=12
D=13
E=14
F=15
100=256
101=257
1F1=497
1000=4096
3000=12288
F000=61440
I have to decode the Hex into decimal. You can multiply the first left hand digit of Hex by sixteen, for two place Hex, and add second digit to that sum.
Multiply the left most digit by 256 for three place Hex, multiply the second digit by sixteen, add both of those sums together with the last digit.
Four digit Hex you multiply the first left most number by 4096.
But I bet if you worked with them day in and day out, you could just add them up in your head after a while, in Hex.
Sincerely,
William McCormick
sorry this a bit messy for me,
i understand the technique and kinda like it i tried with some and got some right answers,
but i tried with e27b
+4eb
and i can't understand what is going when adding b and b?
is 22, how come i write 6?
can u apply this technique to all this problem ?
thanks
apprieciated,
Antonio
10 and 11 ????????????????????????Originally Posted by William McCormick
Thanks for catching that I must have over looked a copy and paste accident.Originally Posted by leohopkins
Sincerely,
William McCormick
Every sixteen of any column to the right makes one more in the next column to the left. So 22 minus 16 leaves 6 carry the one.Originally Posted by asalvani
If I had to do this everyday, I would start to think in terms of 16. But for me I use a program to convert them. I just cannot safely accurately add in that base.
Sincerely,
William McCormick
Well if you were a school child you'd just memorize that B + B = 18. But if you're like me you have to convert to decimal then unconvert. 0xB + 0xB = 12 + 12 = 24 = 16 + 8 = 0x10 + 0x08 = 0x18.Originally Posted by asalvani
We used to practice adding in different bases. And to be honest it was ok to learn how to do it. But in all honesty there was a bit of confusing nonsense being injected into my head, trying to remember it all.Originally Posted by Numsgil
It is easier to just create a little program to convert them. If you even have to do that anymore today. Who knows the memory scheme of Windows XT?
Sincerely,
William McCormick
Why not do what every engineer does, and just buy a calculator with a hex function, nobody does it in their head except for very easy sums when there is no calculator handy :wink: If you try to learn to do maths to the base 16 you will be wasting your time.
If I had to work with those kinds of codes. I would create a data base, and create a history of my mathematical manipulation.Originally Posted by Megabrain
Then I could just run down a list and check to see if I incorrectly input any of them. You lose the ability to check them, because there is not the familiarity of adding in the Arabic system we normally use. They are basically meaningless entries to me. So I would want a trail to quickly run down and check. The data base can keep track of other stuff that can coordinate to something in the program you are working on.
Sincerely,
William McCormick
I always frown when someone says "use a calculator". And I'm not some old timer waving a slide rule around. We had calculators in school and my Ti-83 is basically an extension of myself. But if you have the inclination to learn stuff like this you'll almost always be faster than some guy on a calculator. It's totally worth it to be able to sit down and figure out the answer to something using just pen and paper. If nothing else it means you'll be able to rebuild society after the Mad Max style collapse :P
I see a calculator as a tool, an effective tool, I can actually perform maths on hex, even boolean you know, D and A = 8 etc but I see no need to deliberately learn to use it in place of a calculator, if you use it enough it will become second nature, as will binary. Of course understand it but use a tool, it will save you time in the long run.Originally Posted by Numsgil
I am an old timer and still have several slide rules (none of mine have hex on them..) As for a mad max 're-boot' I'll become a potato farmer. (that's pronounced 'potatoe' not tomatoe... oh forgrt it...
In our university, we are using the simplest way. As described from other but I think you can easily try it. Use the decode list as below.
0=0
1=1
2=2
3=3
4=4
5=5
6=6
7=7
8=8
9=9
A=10
B=11
C=12
D=13
E=14
F=15
But we will consider in column by column.
I will give you an example of your question.
DEF15+ED77
State the form as follow
DEF15
ED77
---------
consider first from the leftmost column, like decimal addition.
7+5=12=C
7+1=8
F=15,D=13,F+D=15+13=28/16= carry = 1,remainder = 12= C.
E+E=14+14=28+carry1=27/16= carry=1,remainder=13=D.
D+carry1=E.
So the answer is EDC8C.
As similar way in subtraction is more easier.
DEF15
ED77
--------
5-7,impossible.
So, we will get 16 from the right partner. So, it become like this.
DEF0(21)
ED7 7
----------
21-7=14=E#
As described in earlier, get 16 from right f.So,
16-7=9#
F will become E
E-D=1#
E-E=0#
Write down D.#
So your answer D019e
You can solve your problem without using a computer or a calculator.
« what is true type font | Prefix and postfix notation » |