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.
loop unrolling, duff's device, .... and of course it depends on the processor you want to use (simple risc based microcontroller, intel-based PC, ...)
for float : it should be 32 bit, so it will take two 16 bit words. For double, 64 bit becomes 4 16 bit words. I think your compiler should store this for you in the correct place and format?
2 16-bit is 32-bit. That is float. The question is put in this way just to confuse.
You can also look at half precision floating point numbers.
Again code optimization depends upon code. There are a lot of ways e.g.
use registers for variables that are often accessed (usually done automatically by compilers).
use bit operations where possible instead of arithmetic operations e.g. multiply by 2 should be a done as a 1b-it left shift.
use a+=n instead of a = a + n;
Use switch statement if the decision is based upon an integer instead of a lot of if-else
use inline functions (compiler dependent)
Try to make/use constant time functions, or O or O(nlogn).
To MicroKernel,
Thanks! there is one question about design a system, maybe you can help me on that, the question is:
Describe a system for measuring phase changes at one frequency in S band with a dynamic range of 100 dB. The desired accuracy for this system is 0.5. Elaborate on what you think are the major problems
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.