dfrac2bin.m
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.
Cite As
Gopinath (2024). dfrac2bin.m (https://www.mathworks.com/matlabcentral/fileexchange/47759-dfrac2bin-m), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform Compatibility
Windows macOS LinuxCategories
Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
Version | Published | Release Notes | |
---|---|---|---|
1.0.0.0 |