posted 15 years ago
Hi Ali,
Know this point helps you:
The MSB position used for sign.
MSB 0 - implies positive number.
MSB 1 - implies negetive number(which will be in 2's complement notation)
[Note: 2'compl( positive number) --> its negetive representation.
-5 = 2's compl(5) ---> 1's complement( make 1 as 0 and 0 as 1) + 1
1111 1011(1 byte)]
In our case MSB is 1. that means it understands negetive number(in 2'comp)
1. 1's compl( 2's compl - 1 ) ---> magnitude of negetive number
2. attaches - to magnitude.( Uses Some falgs do this).
Know once helps all the way.
[ April 20, 2007: Message edited by: Srinivasan thoyyeti ]
Thanks & Regards, T.Srinivasan
SCWCD 1.4(89%), SCJP 5.0(75%)