Firmware Engineer Interview Questions | Glassdoor

Firmware Engineer Interview Questions

376

Firmware engineer interview questions shared by candidates

Top Interview Questions

Sort: RelevancePopular Date

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

9 Answers

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<

#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); }

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

5 Answers

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

3 Answers

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 Answers

Name a few different types of registers.

2 Answers

Technical C programming and logic questions.

1 Answer

Swap two numbers without using a temporary variable

3 Answers

Pointers, TCP and UDP, debugging, past projects

1 Answer

What are some of the python libraries you have used

1 Answer

How to estimate the DP SNR?

1 Answer
110 of 376 Interview Questions