本文介绍了如何重新$ P $负数的32位有符号整数psented?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何负数再$ P $ 32位有符号整数psented?
它是二的或者一个补?或左侧的最后一个比特是像一个标志?
例如:(-10)

How are negative number represented in 32-bit signed integer?Is it two's or one's complement? or the last bit on the left is like a flag?For example: (-10)

推荐答案

大多数计算机,这些天使用对于有符号整数,但它可以通过硬件结构,程序设计语言,或者其他特定于平台的问题而变化。

Most computers these days use two's complement for signed integers, but it can vary by hardware architecture, programming language, or other platform-specific issues.

有关一个二进制补码重新presentation,最左边的比特被称为符号位的,它会被用于负整数设置和清除为一个非负整数。然而,它不仅仅是一个标记的更多。请参阅更多信息。

For a two's-complement representation, the leftmost bit is referred to as the sign bit, and it will be set for a negative integer and clear for a non-negative integer. However, it is more than just a "flag". See the Wikipedia article for more information.

这篇关于如何重新$ P $负数的32位有符号整数psented?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-04 19:33