dfrac2bin function converts a decimal fraction to a fixed point representation. Negative numbers are directly converted into 2's complement numbers. The inputs are as below.
x: Any decimal fraction number
number_of_bits_int: Number of bits used to represent integer part
number_of_bits_fr : Number of bits used to represent fraction part
format : format in which we want outputs ... 'dec' or 'bin'. sign_required: A flag whether to include sign bit in the output expression.
Gopinath (2022). dfrac2bin.m (https://www.mathworks.com/matlabcentral/fileexchange/47759-dfrac2bin-m), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform CompatibilityWindows macOS Linux
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!