问题描述
我有一个数字-569360386,并将其转换为十六进制格式。
我使用toString(16),我得到-21efc002。
但是怎么能得到0xDE103FFE,这是忽略最高位为
签名位?
I have an num -569360386, and turn it into hex format.
I use toString(16),I get -21efc002.
But how can get 0xDE103FFE,which is to ignore the highest bit as the
signed bit?
推荐答案
见
-
Canadian Mind Products,Roedy Green。
Java自定义编程,咨询和教练ing。
see http://mindprod.com/jgloss/hex.html
--
Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.
见
那是关于Java,而不是Javascript!
-21efc002对我来说似乎没问题
=========== ===============
n = -569360386
document.write(n.toString( 16)+ '' <峰; br> ''); // -21efc002。
n = 569360386
document.write(n.toString(16)); // 21efc002。
-
Evertjan。
荷兰。
(请更改在我的电子邮件地址中的点'x''点数
That is about Java, not Javascript!
-21efc002 seems correct to me
==========================
n = -569360386
document.write(n.toString(16)+''<br>''); // -21efc002.
n = 569360386
document.write(n.toString(16)); // 21efc002.
--
Evertjan.
The Netherlands.
(Please change the x''es to dots in my emailaddress)
这篇关于如何忽略签名位?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!