Interview Embedded Software Questions

Agreed - that's why the correct response is to look for more details. My point is just that if you have no choice but to make an assumption, then when asked for an integer square root on an embedded system, you should look for an integer-only solution. The best integer-only solution, of course, depends entirely on the other constraints you don't know. In a good interview situation, this would lead to the candidate demonstrating a knowledge of what might be important in an embedded system, rather than any integer square root algorithm.

Reply to
David Brown
Loading thread data ...

Always remember Knuth's rules of optimisation:

1) Don't do it. 2) (For experts only) Don't do it yet.
Reply to
David Brown

*hmm* no. I was wrong,sorry. I go back where I belong ... bits and bytes and machine-code.
--
42Bastian
Do not email to bastian42@yahoo.com, it's a spam-only account :-)
Use @monlynx.de instead !
Reply to
42Bastian Schick

Why does Endianness depend on Bit_order ? Why Bit_order is always of Big Endian in a Byte irrespective of the Little Endian or Big Endian CPU design?

A really good question to ask.

It will tell whether the candidate is aware of the Endiannes, Byte_Order, Bit_Order and Bit manipulations.

His explanations will give his view about the Dependencies and reasons for Endianness and marks for the following.

- Reasoning power

- Technical strength

- Analytical power

- Creativity

Regards, Karthik Balaguru

Reply to
karthikbg

( Thx, got it from comp.arch.embedded recently): Good answer : endian-ness is not a function of the bits or the bytes, but of the *addressing*. Most machines can not address bits, so bits are not part of endian-ness. If a machine only addresses words and not bytes, it does not *have* endian-ness in any regard.

Regards, Karthik Balaguru

Reply to
karthikbg

Someone's education is severely lacking if they can't determine that XORing a value with 1 is going to toggle the LS bit each time.

About the only lack of clarity I see in the "a^=1;" example is the lack of whitespace.

Ever work on an Internet message router fed by T3 lines?

Reply to
Everett M. Greene

For those of us who haven't seen the answer, what is it? Off the top of my head, I'd say that three gates are needed but possibly only two with some gymnastics.

Reply to
Everett M. Greene

Of course it toggles LSB, but it does not tell anything about the rest of the 'a'.

Two pages down there will be if(a==1){do_smth} How would he now that 'a' can not be equal to 2?

--
WBR, Yuriy.
"Resistance is futile"
Reply to
Yuriy K.

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.