Preguntas de entrevista de Firmware engineer

1 mil

Preguntas de entrevista para Firmware Engineer compartidas por los candidatos

Principales preguntas de entrevista

Ordenar: Relevancia|Popular|Fecha
A un DSP Firmware Engineer le preguntaron...15 de julio de 2010

Write a c functions that takes two bit indices and an int, and reverses the bits in the int between the two indices.

9 respuestas

Made no mistakes on this question, but had done similar things before

//reverses bit between two indices of a number. #include using namespace std; int main() { unsigned int no=90,i=2,j=6,tmp=0,tmp1=0; tmp=no>>i; cout>1; } cout>1; if(x=i) tmp=tmp|0; else tmp=tmp|0x80000000; } cout< Menos

#include main(int arg, char *argv[]) { unsigned char num, hi_indx, lo_indx, mask, num_tmp, mask_c, num_rv, iter,i; num = atoi(argv[1]); hi_indx = atoi(argv[2]); lo_indx = atoi(argv[3]); mask = ((0xFF > (7-hi_indx+lo_indx); mask = (mask << lo_indx); mask_c = ~mask; num_tmp = num & mask_c; printf("%x %d %d %x",num, hi_indx, lo_indx, mask); num_rv = 0x0; iter = hi_indx-lo_indx+1; i = 0; while(i<=iter) { int flg; flg=(num & (1<<(i+lo_indx)))?1:0; if(flg) num_rv=num_rv|(1<<(hi_indx-i)); i++; } num = num_rv | num_tmp; printf("\nnum=%x ",num); } Menos

Mostrar más respuestas

How to swap the values in 2 variables without using a temporary variable.

5 respuestas

a=a^b b=b^a a=a^b

but it should say swap two integers! because this XOR won't work with float for example Menos

This works for floats: a = a+b b = a-b a = a-b But you might overflow on a+b. Menos

Mostrar más respuestas

How many pins in a JTAG cable?

5 respuestas

25 Pins

Is that even a relevant question ? :)

Why does it matter as long as you know how to use the ICD?

Mostrar más respuestas

Puzzles 1: You have rope that take 60 min to burn. Speed of burning is not uniform. Example: it doesn't take 30 min to burn half Using two ropes, how would you get 45 min? Answer: First Rope. Burn both ends at same time Second Rope: Burn only one side. when First rope is totally burn, it's been 30 min, now burn the rest of second rope both ends. Which should take additional 15 min. 30 + 15 = 45 min. Puzzle 2: There is a guy in a boat holding a rope that's tight to a Top of pole in the shore. He keep pulling the rope until he reach the shore. What is the speed relationship between amount of rope he pulls, vs horizonal speed? Which speed is higher? Answer: Horizonal speed is faster than the amount of rope he pulls. (Horizonal distance he travel is higher than amount of rope he pulls, by triangle theory where sum of two sides must be greater than 3rd side) Puzzle 3: in Analog Clock, It's exacly 3:00 Clock. What time would the Hour hand, and Min hand would overlap each other?

4 respuestas

The analog and min hand overlap once each hour so the next overlap after 3:00 would be 3:16 and some change. Sanity check: 16 minutes should be between the 3:00 and 4:00 on the clock, which is true. Math: Hour hand gets an equation like 3 + (1/60)*minutes, since the hour hand starts at 3 and every minute it increases by 1/60th of an hour. The minute hand gets 12*(1/60) * minutes since in 60 minutes it goes around the 12 hours of the clock. So 3+(1/60)x = (12/60)x gives you 180/11 or about 16. Menos

1) hour = min / 12 deg 2) min = hour + hour(initial) = hour + 90 deg 1=>2 and solving gives 98.18 deg. Converting back into time format gives 3:16:22. Menos

you should keep the same units: Hour hand: starts at 15 min so 15 min + 5 min/hr*t Min hand: 60 min/hr 15 min + 5 min/hr * t = 60 min/hr 15 min = 55 min/hr * t 15/55 = .2727 hr .2727 hr * 60 min/hr = 16.3636 min = 16 min 21.8182 sec Menos

Mostrar más respuestas
Sierra Wireless

Why is a manhole cover round?

4 respuestas

It's a Microsoft interview question to get you to think.

Hi, is there any technical question? Thanks

Depends on who interviews you. They might write some C code up on a whiteboard and you get to tell them what it does and or what is wrong with it. 2nd Interview is usually to see if you will make a good fit within the environment/culture of the team(s). As long as you can show that you can think or have a basic understanding, all is good. Menos

Mostrar más respuestas

How to invert all the bits in a byte? e.g. 0x55 should be changed to 0xAA.

4 respuestas

mask=0xffffffff; no^=mask;

Xor it with all ones

But how do you implement ~?

Mostrar más respuestas

write a code to find if a numver is power of 2

2 respuestas

return (num != 0) && ((num & (num - 1)) == 0);

return((num!=0) && ((num & (-1-num))==0))


Give you a 16 bit binary number. How do you change the 11th and 12th bit to some given number.

3 respuestas

num = (num & (~(1 << 11 | 1 << 12))) | (given & (1 << 11 | 1 << 12)); Menos

num = (num & (~(3 << 12))) | (3 & given << 12 ));

num ^= (Math.Pow(2, 11) + Math.Pow(2, 12))

Efftronics Systems

Tell me about the range of bluetooth frequency?

3 respuestas





What different ways can you get information to/from a device driver to user space?

3 respuestas

Kernel modules

Tasklets, work queues

copy_from_user, copy_to_user. Shared and named files/using the virtual file system. Menos

Viendo 1 - 10 de 1402 Preguntas de entrevista