Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

How to implement BCD FloatingPoint in microcontrollers?

Status
Not open for further replies.

p_karimi

Junior Member level 3
Joined
Jan 5, 2005
Messages
27
Helped
5
Reputation
10
Reaction score
2
Trophy points
1,283
Activity points
158
Hi
Everybody who has enough info about "BCD Floating Point" , Please explain about it with examples and how to implement it in microcontrollers .
 

Re: BCD FloatingPoint

BCD floating point B12345678 (DFP085, B) 8-byte BCD encoded number. These are obsolete and should no longer be used.

The first byte of an B12345678 contains the sign and the base-10 exponent. The remaining seven bytes contain the 14 BCD digit mantissa. B12345678 values are transmitted in big-endian order.

The sign bit is the high order bit of the first byte; 0 means the value is positive, 1 means the value is negative.

The base-10 exponent is determined by subtracting 64 from the value of the low order seven bits in the first byte; the exponent ranges from -64 through 63.

B12345678 numbers are normalized so that the high order digit of the mantissa is non-zero unless the value is zero.

B12345678 values range from -9.9999999999999e63 through -1.0000000000000e-64, 0, 1.0000000000000e-64 to 9.9999999999999e63.

Some examples of B12345678 numbers:

1 => 0x4010000000000000
1e-64 => 0x0010000000000000
0 => 0x0000000000000000
-1 => 0xC010000000000000
-9.8765432101234e27 => 0xDB98765432101234
 

Re: BCD FloatingPoint

O.K.
If you want to make calculations with 10 digit accuracy with microcontrollers,which format can be used ?
It doesn't seem that 32bit floating point be suitable .
Do you have any idea ?
 

Re: BCD FloatingPoint

To cover 10-digit accuracy you will need at least 34-bit binary floating point calculations, but with microcontroller almost everything is possible: 40 bits, 48 bits etc ..
 

Re: BCD FloatingPoint

Do you know any source for 40-bit or 64-bit floating point routines for PIC Microcontroller ?
 

Re: BCD FloatingPoint

Hi AVR_Luciano
The URLs you mentioned are about 32 bit (and less) floating point .
Our subject was more than 32 bit routines ( 40 bit , 48 bit , 64 bit , ...) .
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top