移码的位扩展

本文介绍了IEEE浮点数表示中指数部分的偏置形式,并详细阐述了如何在不改变实际值的情况下扩展偏置形式一位,以方便在计算中检测溢出和下溢。内容包括背景介绍、结论与证明、一般化过程以及如何缩小偏置形式的数字。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

0. Background

​ The exponent part of the IEEE Floating-Point Representation is encoded in a biased form. During my design of the ALU for the floating point, I need to find a way to extend the biased form for one bit without change the actual value which it’s representing and make it easier to detect the overflow and underflow during the calculation.

​ By the way, a k k k-bit biased number’s bias in this article is B i a s = 2 k − 1 − 1 Bias = 2^{k - 1} - 1 Bias=2k11.

1. Conclusion & Provement

Suppose a k k k-bit biased numer and the actual value of its representation : X k X k − 1 . . . X 1 = ∑ n = 1 k X n ∗ 2 n − 1 − 2 k − 1 + 1 X_kX_{k-1}...X_1 = \sum_{n=1}^{k}{X_n*2^{n-1}} - 2^{k-1} + 1 XkXk1...X1=n=1kXn2n12k1+1

To extend it to a $ k+1$ -bit number and its actual value: X k X k ‾ X k − 1 . . . X 1 = ∑ n = 1 k + 1 X n ∗ 2 n − 1 − 2 k + 1 X_k\overline{X_k}X_{k-1}...X_1 = \sum_{n=1}^{k+1}{X_n*2^{n-1}} - 2^{k} + 1 XkXkXk1...X1=n=1k+1Xn2n1</

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值