帮助中心帮助中心
fi
fi 对象的存储整数的无符号二进制表示
b = bin(a)
示例
b = bin(a) 以无符号二进制格式返回 fi 对象 a 的存储整数作为字符向量。
b
a
定点数可以表示为
real-world value=2−fraction length×stored integer
或者,等效于
real-world value=(slope×stored integer)+bias
此存储整数是原始二进制数字,其中假定二进制小数点位于字的最右侧。
提示
bin 返回 fi 对象的存储整数的无符号二进制表示。要获取 fi 对象的真实值的二进制表示,请使用 dec2bin。
bin
dec2bin
全部折叠
创建一个有符号 fi 对象,值为 -1 和 1,字长为 8 位,小数长度为 7 位。
-1
1
a = fi([-1 1], 1, 8, 7)
a = -1.0000 0.9922 DataTypeMode: Fixed-point: binary point scaling Signedness: Signed WordLength: 8 FractionLength: 7
查找 fi 对象 a 的存储整数的无符号二进制表示。
b = '10000000 01111111'
输入数组,指定为 fi 对象。
数据类型: fi
在 R2006a 之前推出
dec | hex | storedInteger | oct | dec2hex | dec2base | dec2bin
dec
hex
storedInteger
oct
dec2hex
dec2base
您点击的链接对应于以下 MATLAB 命令:
请在 MATLAB 命令行窗口中直接输入以执行命令。Web 浏览器不支持 MATLAB 命令。
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Contact your local office