本文介绍了内部整数repres。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是内部表示的所有整数只是位向量吗?


- nethlek

解决方案




ISO C没有定义内部如何表示整数。 br />

-

/ - Joona Palaste(pa*****@cc.helsinki.fi)---------- ---芬兰-------- \

\-- ---------------------规则! -------- /

这不对。这甚至都不错。

- Wolfgang Pauli





不一定,除了位域和变量类型

unsigned char。但是,无符号整数

类型所需的语义使它们就好像它们如此表示一样。





是的。计算机将所有内容都表示为位向量。


好​​吧,有人可能为百灵鸟制作了一台三元计算机,但是C / /
指定一个字节由一个序列组成比特,所以它的C

实现必须这样做。


-

Hallvard

are all integers represented internally as just bit vectors?

-- nethlek

解决方案



ISO C does not define how integers are represented internally.

--
/-- Joona Palaste (pa*****@cc.helsinki.fi) ------------- Finland --------\
\-- http://www.helsinki.fi/~palaste --------------------- rules! --------/
"This isn''t right. This isn''t even wrong."
- Wolfgang Pauli




Not necessarily, apart from bitfields and variables of type
unsigned char. However, the required semantics of unsigned integer
types make them act as if they were so represented.




Yes. Computers represent everything as bit vectors.

Well, someone might have made a trinary computer for a lark, but C
specifies that a byte consists of a sequence of bits, so its C
implementation must do the same.

--
Hallvard


这篇关于内部整数repres。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-29 08:33