小编jos*_*eph的帖子

32位有符号整数乘法,不使用64位数据类型

我想在不使用64位数据类型的情况下进行32位有符号整数乘法.我的输入是Q1.31(两种)格式.

input1 = A32 (Ah Al) - higher, lower half's of A32
input2 = B32 (Bh Bl) - higher, lower half's of B32
Run Code Online (Sandbox Code Playgroud)

结果应为Q1.31格式,保留溢出情况.

我需要C代码.请提供格式说明.

c signed integer bit-manipulation multiplication

1
推荐指数
1
解决办法
2605
查看次数

标签 统计

bit-manipulation ×1

c ×1

integer ×1

multiplication ×1

signed ×1