Explain this hexadecimal subtraction
FFE,A7809- 13ABC,00000
Can't you write it more nicely? :P
FFE,A7809- 13ABC,00000 ------------ ?? 542,A7809
The two numbers are not equal in lengths?
@amistre64 @anwaarullah @eliassaab @tkhunny @undeadknight26 @Preetha @satellite73 @freckles @glamourglory @hartnn @Kamille @Loser66 @camerondoherty And the answer is NO @waterineyes
\(FFEA7809\) -\(13ABC00000\) ----------------
Last \(5\) digits will remain same..
@waterineyes you skipped the comma those are not integer hex values
Then from the right, it is \(2\).
What does that "comma" signify?
hexadecimal point i suppose..
okay let's skip the comma I'm interested only on this: FFE- 13ABC ------
@ganeshie8 you're right
you want to work the subtraction in hexadecimal system without converting is it ?
yes
If we can find the 16's Compliment of 13ABC, then may be we can add them just simply.. :)
@waterineyes solve this exercise without using any Compliment :D
Dear, I am here only, so still you feel need of tagging?? :P
Can't we switch the numbers by taking \(-\) sign out?
\(13ABC,00000\) -\(FFE,A7809\) ------------- -...................
13ABC FFE -------- 12ABE
D??
\(12ABD\)
actually the answer is: FFFFFFFFFFFED542
step1 : 1 13ABC FFE -------- E 1C - E = E
guys you're not helping me
you borrow a 16 from B and add it to units place C then subtract..
ffe-13abc not reverse
i am trying to help you, how about you ? are u trying ?
No, firstly we will help ourselves then you... :P
how do you work 456 - 121314 in decimal ?
a-b = -(b-a) right ?
You think we are pearls here knowing everything.. :P Have patience..!!
since you don't want to use complements, there is no way to represent a negative number without using the minus sign
Yeah, ganesh I agree..!!
I'm here to figure out why: 00- 13 FFFFFFFFFFFED
I thought we're working on ``` okay let's skip the comma I'm interested only on this: FFE- 13ABC ``` ?
0 0F FE + ------- 1 3A BC
thats my idea
@ganeshie8 put 2 of 0 in front of ffe
ffe-abc=542 00-13=????????
filling 0's on left side is for machines, they are not needed for carrying out subtraction manually
00-13 = -13
@ganeshie8 you mean this subtraction can't be done without using the compliment or the reverse code?
we should calculator now.. :P
how do you represent -13 on a machine ?
with the bit of sign
thats one way, and we call it signed magnitude system
however the one you're trying here is called 2's complement representation : 00- 13 FFFFFFFFFFFED
2's?? or 16's ??
...FFFFFFFFFFFED = 16's complement of 13 thnks for correcting water :)
you're using it to represent negative numbers without wasting a bit for sign
`00` - `13` = `00` + `(16's complement of 13)` = `00` + `...FFFFED` = `...FFFFED`
okay so if I'm right to find the 16's complement of -13 you do this: FFFFFFFFFFFFF- 13 FFFFFFFFFFFED
yes subtract each digit from F and in the end add 1
YEAH THAT'S WHY F-3+1=D
thank you all for the patience
@Alexander95 this is cheating, you used Complements here.. :P
@waterineyes I can use complements I said that hoping I can find another way
But you limited my approach to "just subtracting" only.. :P It is fine.. :)
maybe take an example in base10 to see why the complement stuff works
base 10 : `20` - `30` = `20` + `(10's complement of 30`) = `20` + `70` = `90`
you mean 100's compliment ? :P
Note that 10's complement of `90` is `10` as you expect the result to be... the left most bit of 1 tells you that the stored number is negative
lol techically 100's complement is possible too as the base can be any real number
@ganeshie8 how many complements are:1's;2's;...;16's;...
there are only two useful complements in base N system : 1) N's complement 2) N-1 complement
and base can be anything, 11's compliment of 5 is 11-5
if you're in base 10, you call them 10's complement and 9's complement
so for base 2 we got:1,2 10 we got:9,10 .......... 16 we got:16,15 .................
looks good, subtracting each digit by 9 or F may not reveal you much about whats going on.. there is a nice way to make sense of this complement business
\(10\)'s complement of a \(\large k \) digit number, \(\large x\), in base \(\large 10\) = \(\large 10^k-x\)
If you want to work the subtraction : \(\large w-x\) : \[\large \begin{align} w - x &= w + (-x)\\&=w + (10^k-x)\\\end{align}\] next, take the 10's complement of result, you get : \(\large 10^k- \left[ w+(10^k-x)\right] = x-w \) the computer adds a negative sign because it knows that the left most digit of the subtraction (w-x) is 1.
Join our real-time social learning platform and learn together with your friends!