Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Floating-Point Multiplier

Status
Not open for further replies.

elvis.merida

New Member
Hello: Im a new guy. Well, I been searching for information on this "digital" project and have came up empty handed via google.

The project summary is basically this: Accepts as operands two 12 bit (possibley unnormalized) floating point numbers and outputs a 12 bit normalized number and an overflow indicator.

If anyone can point me in the right direction, or maybe have reference to good digital design books that i might need to read. If more information is needed, i can provide. Thank in advance for any feedback...
 
Digital circuits don't normally do floating point (with the exception of maths co-processors), in a micro-controller you would have to write your own routines (which would be large and very slow). As there's no way for you to store a floating point number anyway, you have to utilise (or create) a scheme to implement them.

I'm presuming this is a homework/classwork question?, and not something you are actually wanting to do?.

Generally it's a lot easier, much faster, and much more accurate, to scale your numbers so you can use integer (even if very long integer) maths. This also applies to calculations on a PC, it's often easier not to use floating point - and you should never use it for calculations involving money!. Anyone remember the famous electricty bills for things like £11.548725362452 - a fine example of using floating point when you shouldn't :lol:
 
Actually, I have to build this if I want to graduate, it is my senior project for my Bachelors of Science. It has to be built using multiplexers, adders, and register which is why i meant digital. In terms of digital, i mean, AND gates and so forth. I been studying the basics of the floating points, exponent and mantissa. Also, i started to do basic "logic" multiplication so I can further understand what I will be multiplying. Hope this clears up any confusion.

Floating points are not that bad, except its a 12 bit number... I also have a parts list that I found in my research that I might need to build this circuit.

Thank you.
 
Fair enough, I presumed it must be something like that. As you've studied the exponent and mantissa requirements, presumably you've already decided on a format to use.

All I can say is GOOD LUCK!, as you already know it's not a trivial task, but it's not for a trivial qualification. I look forward to hearing how you get on.
 
Are you allowed to use ROM to store some form of microcode? It will be extremely difficult to perform this multiplication in one clock cycle.
 
If a 12-bit floating point number is expressed as 8-bits mantissa and 4 bits exponent, then the resulting product is the 16-bit binary product of the mantissas and the 5-bit sum of the exponents. You can easily build a parallel 8-bit multiplier and 4-bit adder.

Normalizing will consist of shifting the mantissa left (in effect multiplying by 2) while at the same time decrementing the exponent until the most significant bit is 1. After normalizing, the lower 8-bits of the 16-bit mantissa can be dropped. You now have a product with 8-bits mantissa and 4-bits exponent. The fifth bit in the exponent can be used for overflow detection.
 
Motion, unfortuanately I'm not able to use ROM to store data. It is all done using adders and multiplexers. Hey, you provided a lot useful information, I very grateful. Can you refer me to the right place where i can read about this type of multiplication. As far As i understand, it should be like multiplying regular numbers.

.02 x 10^2
multiply by
.02 x 10^2
equals to
.04 x 10^2
where .nn is the mantissa and 10^n is the exponent. Well, similar to this.

Motion, I posted the block diagram for the floating point multiplier. It is exactly as you say, with an 8 bit multi and 4-bit adder. How about the registers, what function do they provide. Also, THe control box appears to be the one that will give me the most problems. Im currently looking for a kit that can provide all the parts that i need, such as the multiplexer and adders, intead of buying them one by one, but have found no such thing.

As a specification for the controL: Do a clean design of a sequential machine to cycle through the control states needed to automatically execute the floating-point multiplication algorithm.

If you can recommend any good textbooks that I can reference to concerning this project, It would be greatly appreciated.
 

Attachments

  • blockdiagram1.gif
    blockdiagram1.gif
    25.1 KB · Views: 702
You may use a 74LS283 as a 4-bit full adder and a circuit consisting of 4 4-bit parallel binary multipliers (74284 or 74285) and a few full adders. A schematic can be found in TI's 74284 datasheet.

However, the block diagram indicated a different method for performing binary multiplication. You might find it useful to google search "binary multiplication".

Also, if you look at the block diagram, there is box named "CONTROL". This may require some form of ROM storage or else you will be dealing with a lot of loose gates.

This is really old techniques. It would be helpful to search for TTL logic circuits to give you some idea on how to implement these circuits this way.
 
I have located the datasheet fot the 74284. What do you refer to by "old techniques"... I am familiar with Transitor Transistor Logic and would like more input on how I can implement the block diagram I provided.

Thanks.
 
The easy way is to use field programmable gate arrays or similar LSI devices but you are forced to use old MSI devices like multiplexers and other stuff. Therefore, the books on how to implement these using TTL gates are relatively old.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top