本文介绍了什么是规范的带符号数字?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

什么是规范符号位(CSD),以及如何将二进制数转换为CSD和CSD回到一个二进制数?您怎么知道是否应将CSD的数字规范地选择为+-0?

What is a canonical signed digit (CSD) and how does one convert a binary number to a CSD and a CSD back to a binary number? How do you know if a digit of a CSD should be canonically chosen to be +, -, or 0?

推荐答案

有符号二进制在每个2的幂数位置使用三个符号:-1、0、1.所表示的值是位置系数的总和.乘以2的相应乘方,就像二进制的一样,不同之处在于某些系数可能为-1.一个数字在该系统中可以有多个不同的表示形式.

Signed-digit binary uses three symbols in each power-of-two position: -1, 0, 1. The value represented is the sum of the positional coefficients times the corresponding power of 2, just like binary, the difference being that some of the coefficients may be -1. A number can have multiple distinct representations in this system.

规范带符号的数字表示形式相同,但受以下限制:没有两个连续的数字为非0.结果表明,每个数字在CSD中都有唯一的表示形式.

Canonical signed digit representation is the same, but subject to the constraint that no two consecutive digits are non-0. It works out that each number has a unique representation in CSD.

请参见 Parhi的比特级算法中的幻灯片31开始.更多,包括从二进制到CSD的转换算法.

See slides 31 onwards in Parhi's Bit Level Arithmetic for more, including a binary to CSD conversion algorithm.

这篇关于什么是规范的带符号数字?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

06-13 14:20