Posts

Showing posts from March, 2012

Converting between binary and decimal representations of IEEE 754 floating-point numbers in C++, Java and Python

Image
This post implements a previous post that explains how to convert 32-bit floating point numbers to binary numbers in the IEEE 754 format. What we have is some C++ / Java / Python routines that will allows us to convert a floating point value into it's equivalent binary counterpart, using the standard IEEE 754 representation consisting of the sign bit, exponent and mantissa (fractional part).

Mixing Managed and Native Types in C++ / CLI

Image
Brief Introduction C++/CLI (Common Language Infrastructure) was designed to bring C++ to .NET as a means of developing managed code applications. Specifically it helps simplify writing managed code when using C++. Suppose you are writing a WinForms application in Microsoft Visual Studio with a view to using C++ to write managed code. You may prefer to reuse existing libraries and headers written in C and C++ but are a little unsure as to how this is achieved exactly.