是否有 C 的任何非二进制补码实现? [英] Are there any non-twos-complement implementations of C?

查看:39
本文介绍了是否有 C 的任何非二进制补码实现?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

众所周知,ISOC 标准(以及 C++,我认为,虽然我对 C 方面更感兴趣)允许有符号数的三种底层表示:

As we all no doubt know, the ISO C standard (and C++ as well, I think, though I'm more interested on the C side) allows three underlying representations of signed numbers:

  • 补码;
  • ones 的补码;和
  • 符号/大小.

维基百科的条目指出,符号/幅度用于 60 年代的 IBM 7090,而 PDP-1、CDC 160A 和 UNIVAC 1100 使用的是符号/幅度,所有这些都可以追溯到 60 年代.

Wikipedia's entry states that sign/magnitude is used on the IBM 7090 from the 60s, and that ones' complement is used by the PDP-1, CDC 160A and UNIVAC 1100, all of which date back to the 60s as well.

是否有任何其他具有这些替代表示的 C(或底层硬件)实现,它们是在五十年前出现的(它们是什么)?

Are there any other implementations of C (or underlying hardware) with these alternative representations, that have come out a little more recently than fifty years ago (and what are they)?

将某些东西保留在不再存在的机器的标准中似乎有点浪费.

It seems a little wasteful to keep something in a standard for machines no longer in existence.

推荐答案

我能找到的最新例子是 UNISYS 2200 系列,基于 UNIVAC,具有补码算法.各种型号是在 1986 年到 1997 年之间生产的,但操作系统仍在积极开发中最迟到 2015 年.他们还有一个 C 编译器,如此处所示.

The most recent example I can find is the UNISYS 2200 series, based on UNIVAC, with ones-complement arithmetic. The various models were produced between 1986 and 1997 but the OS was still in active development as late as 2015. They also had a C compiler, as seen here.

它们今天似乎仍在使用.

It seems likely that they may still be in use today.

这篇关于是否有 C 的任何非二进制补码实现?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆