ヘルプ センターヘルプ センター
fi
fi オブジェクトの格納整数の符号なし 2 進数表現
b = bin(a)
例
b = bin(a) は fi オブジェクト a の格納整数を符号なし 2 進数形式の文字ベクトルとして返します。
b
a
固定小数点数は以下のように表現することができます。
real-world value=2−fraction length×stored integer
または、次も等価です。
real-world value=(slope×stored integer)+bias
格納整数は生の 2 進数の数で、2 進小数点はワードの右端にあると想定されています。
ヒント
bin は fi オブジェクトの格納整数の符号なし 2 進数表現を返します。fi オブジェクトの実際値の 2 進数表現を取得するには、dec2bin を使用します。
bin
dec2bin
すべて折りたたむ
値 -1 および 1、語長 8 ビット、小数部の長さ 7 ビットの符号付き fi オブジェクトを作成します。
-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 の格納整数の符号なし 2 進数表現を確認します。
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