dfrac2bin.m
Version 1.0.0.0 (2 KB) by
Gopinath
To convert decimal fraction to fixed point binary number
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 (2026). dfrac2bin.m (https://www.mathworks.com/matlabcentral/fileexchange/47759-dfrac2bin-m), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Created with
R2009a
Compatible with any release
Platform Compatibility
Windows macOS LinuxCategories
Find more on Numbers and Precision in Help Center and MATLAB Answers
Tags
Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
| Version | Published | Release Notes | |
|---|---|---|---|
| 1.0.0.0 |
