I am making this project in which I have to make a 16-byte float datatype manually. So, as per the specifications, 32 bits are for the mantissa, and the rest for the exponent(including sign).

I'm planning to store it in this form - unsigned char num[16];

I can get the mantissa into an integer(4-bytes only) and use bitwise operators to put the bytes in place in the char array.

BUT - exponent's size is 12 bytes!! So, maybe i'll have to use a string. How do I perform bitwise operations in a string e.g. - "12354624514124521"???

Please Help!!

1. I'm sure that you misunderstand your assignment specifications. It's an absolutely senseless FP data type with a very long exponent and so reduced mantissa.
2. Why string? And even if so, why bitwise operators?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.