Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

Defines a set of function to convert number between fixed and floating point representations

Project Description

Functions to convert numbers between fixed and floating point representation as experienced by simulink users. Permits conversion of 8, 16 and 32 bit representation of signed and unsigned decimal numbers, with or without binary point.


Package can be downloaded from the public git repo as:

$ git clone
$ python install

or installed automatically via pypi:

$ pip install fixreal


>>> import fixreal
>>> fixreal.real2fix(-0.9921875, fixreal.get_conv(8, 7, True))
>>> fixreal.real2fix(-3.96875, fixreal.get_conv(8, 5, True))
>>> fixreal.real2fix(-127, fixreal.get_conv(8, 0, True))
>>> fixreal.real2fix(1.0078125, fixreal.get_conv(8, 7, False))
>>> fixreal.real2fix(4.03125, fixreal.get_conv(8, 5, False))
>>> fixreal.real2fix(129, fixreal.get_conv(8, 0, False))
>>> fixreal.fix2real(0b10000001, fixreal.get_conv(8, 7, True))
>>> fixreal.fix2real(0b10000001, fixreal.get_conv(8, 5, True))
>>> fixreal.fix2real(0b10000001, fixreal.get_conv(8, 0, True))
>>> fixreal.fix2real(0b10000001, fixreal.get_conv(8, 7, False))
>>> fixreal.fix2real(0b10000001, fixreal.get_conv(8, 5, False))
>>> fixreal.fix2real(0b10000001, fixreal.get_conv(8, 0, False))
>>> conv = fixreal.conv_from_name("fix_8_7")
Release History

Release History

This version
History Node


Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
fixreal-0.8.tar.gz (59.0 kB) Copy SHA256 Checksum SHA256 Source Jan 23, 2012

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting