Canonical Signed Digits

Generates a CSD representation of a floating point number.
3.8K Downloads
Updated 24 Jan 2006

No License

Canonical-signed-digit (CSD) coefficient representations of floating point numbers lead to efficient add/subtract networks for hardwired DSP multiplies of two?s complement signals.

example csdigit(23) returns +0-00-.
Where +0-00-. is a representation of +1 in 2^5, -1 in 2^3 and -1 in 2^0 positions.
i.e. 23 = 32 - 8 - 1

example [a,p,n]=csdigit(23.5,6,2) returns
a = +0-000.-0
p=32
n=8.5
23.5 = 32 - 8 - 0.5

Cite As

Patrick Moran (2024). Canonical Signed Digits (https://www.mathworks.com/matlabcentral/fileexchange/9730-canonical-signed-digits), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R14SP2
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes
1.0.0.0