Breaking News
Comments
Newest First | Oldest First | Threaded View
DU00000001
User Rank
CEO
Why should I ...
DU00000001   3/20/2014 1:41:02 PM
NO RATINGS
... bother the poor piece of silicon with this calculation at all ?

Until it is sent to an output the "physical value" will only con-
sume memory and CPU power (to calculate) but the result does not hold more information than the mere 1234d value from the ADC.

Nowadays the fresh-bred engineers from univerity are calling for floating point units - seemingly not aware that integer arithmetics exist at all. About 15 years ago I was tasked with improvements on an automotive ECU - based on an i80196. 90 % of the software was in assembler (primarily due to memory restrictions) and there was absolutely no FP arithmetics.

I was fiddling with data resolutions of 1/4 rpm and - IIRC - 1/16 degree of camshaft angle -- and that was just fine. The only instance where the "computing numbers" were converted to "real world values" was in the visualizing tools (PC based). And it was THEIR damned job to calculate these values :)

Nowadays there are still some fields of application where you sould resort to integer arithmetics, e.g. EC control units. OK - CPUs with FPUs are readily available. But when it comes to total cost, power consumption etc. integer math is superior. And - BTW - easily more precise than 32 bit floating point.

One more: ever seen fixed-point arithmetics ?

HankWalker
User Rank
Manager
Think of the Processor Resources
HankWalker   3/20/2014 11:50:30 AM
NO RATINGS
This is written from the viewpoint that floating point is expensive and integer is cheap. In an embedded processor, this can be a reasonable assumption. But in a multi-issue, out-of-order execution pipe, using floating-point can be faster because you are using otherwise idle functional units, freeing up the integer units for other operations. So you have to think about your overall system bottlenecks.

prabhakar_deosthali
User Rank
CEO
Base2 arithmetic
prabhakar_deosthali   3/20/2014 1:30:27 AM
NO RATINGS
When you are solving mathematical problems in digital computers, many times it helps to abondon the base10 arithmetic and do all your calculations in just the binary base2 numbers . Thereby most of the multiplications and divisions can be achieved by Left Shift or the right shift of the bits . 

 

It is so fast compared to a floating point or the interger arithmetic , that I used it in one of motion control alogirithms .  I was working on DEC LSI 11 processor based motion controller  and the robotic 3 axis motion control required the interpolation of the robot arms path while it waas negotiating a complex chassi assembly.

 

The base2 arithemetic came very handy - time and memory effiecient and without much of the rounding errors.

Max The Magnificent
User Rank
Blogger
Re: My Mistake
Max The Magnificent   3/19/2014 2:27:43 PM
NO RATINGS
Bill and Paul actually paid another developer for the floating-point part -- I think they paid him a few hundred dollars -- if only he had known how far Microsoft BASIC woudl spread (it was even on Apple's machines) -- he should have asked for 1% of net...

Max The Magnificent
User Rank
Blogger
Re: My Mistake
Max The Magnificent   3/19/2014 2:25:31 PM
NO RATINGS
@Antedeluvian: ...the 8048 was 1Kx8. The 8049 was 2Kx8....

Did you ever read the biographies of Bill Gates and Paul Allen -- the original Microsoft BASIC fit in 4K and that was with a floating-point library. I hadn't realized quite what an achievement it was until I read the biographies -- now I have a much better appreciation for the mannitude of the task.

antedeluvian
User Rank
Blogger
Re: Delightful
antedeluvian   3/19/2014 2:23:56 PM
NO RATINGS
Max

not seen "Math Toolkit for Real-Time Programming" but the reviews on Amazon make it sound like it would be well-worth reading.

Jack Crenshaw, author of the above book is a long time contributor to the magazine Embedded Systems Programming in his column "Programmer's Toolbox". It is a pleasure to read although he often goes way over my head.

antedeluvian
User Rank
Blogger
My Mistake
antedeluvian   3/19/2014 2:17:51 PM
NO RATINGS
Back in the day, when the 2 kbyte 8048 microcontroller was the latest and greatest thing on the market,

Sorry, my mistake- the 8048 was 1Kx8. The 8049 was 2Kx8. National brought out a 4K version which they called the 8050. The EPROM version had a 28 pin piggy-back socket on the 40 pin DIP and you could install a regular EPROM in it, up to a 2732 (4Kx8)

Max The Magnificent
User Rank
Blogger
Delightful
Max The Magnificent   3/19/2014 2:11:50 PM
NO RATINGS
I've got the book "Hacker's Delight" -- it's really, really good. I've not seen "Math Toolkit for Real-Time Programming" but the reviews on Amazon make it sound like it would be well-worth reading.



Flash Poll
EE Life
Frankenstein's Fix, Teardowns, Sideshows, Design Contests, Reader Content & More
Rishabh N. Mahajani, High School Senior and Future Engineer

Future Engineers: Don’t 'Trip Up' on Your College Road Trip
Rishabh N. Mahajani, High School Senior and Future Engineer
Post a comment
A future engineer shares his impressions of a recent tour of top schools and offers advice on making the most of the time-honored tradition of the college road trip.

Max Maxfield

Juggling a Cornucopia of Projects
Max Maxfield
6 comments
I feel like I'm juggling a lot of hobby projects at the moment. The problem is that I can't juggle. Actually, that's not strictly true -- I can juggle ten fine china dinner plates, but ...

Larry Desjardin

Engineers Should Study Finance: 5 Reasons Why
Larry Desjardin
29 comments
I'm a big proponent of engineers learning financial basics. Why? Because engineers are making decisions all the time, in multiple ways. Having a good financial understanding guides these ...

Karen Field

July Cartoon Caption Contest: Let's Talk Some Trash
Karen Field
128 comments
Steve Jobs allegedly got his start by dumpster diving with the Computer Club at Homestead High in the early 1970s.

latest comment mhrackin Where's the "empty bin" link?
Top Comments of the Week
Like Us on Facebook
EE Times on Twitter
EE Times Twitter Feed

Datasheets.com Parts Search

185 million searchable parts
(please enter a part number or hit search to begin)