Assembler Interview Questions | Glassdoor

Assembler Interview Questions

1,114

Assembler interview questions shared by candidates

Top Interview Questions

Sort: RelevancePopular Date

Feb 9, 2011
 Was asked how I would implement division without using division or mod operators. The answer should return in the form quotient r remainder.8 AnswersAnswer 1: Use subtraction and keep a count of how many times subtracted. When the remainder is smaller than the divisor, count is your answer, and whatever is left is the remainder. Was then asked the complexity in terms of binary. After that, was asked to come up with a solution with better complexity. Answer 2: Multiply the divisor by two until it is larger than the dividend. Go back one, subtract that out, multiply again. This solution will have a much better complexity.I could not get second solution. Though its really interesting .... e.g. 39/3 1. multiply 3 with 2 until it gets bigger 3->6->12->24->48 (using 8 3. Sub that out 39-24 = 14 4. Go to 11. multiply 3 with 2 until it gets bigger than 29: 6,12,24,48 2. Go back one: 24 =>8 3. Sub that out: 39-24 = 15 1. multiply 3 with 2 until it gets bigger than 15: 6,12,24 2. Go back one: 12 =>4 3. Sub that out: 15-12 = 3 1. multiply 3 with 2 until it gets bigger than 3: 6 2. Go back one: 3=>1 3. Sub that out: 3-3 = 0 Answer: 8+4+1 = 13Show More ResponsesI think you're very close, but perhaps the interviewer was suggesting to think of the quotient in terms of being a binary number. // QuickDivide, implemented in Java public static String QuickDivide(int num, int denom) { int quotBits = 1; // start with a single bit quotient int quot = 0; // get number of quotient bits while (Math.pow(2,quotBits) * denom = 0; bitExp--) { if (num >= Math.pow(2, bitExp)* denom) { // add to quotient and subtract from numerator quot += Math.pow(2,bitExp); num -= Math.pow(2, bitExp) * denom; } } // numerator is holding remainder return String.format("%1\$d R %2\$d", quot, num); }// gets leftmost bit position public native static int __builtin_clz(int n); /** * Divide x by y. * @return {result, reminder} */ public static int[] div(int x, int y) { int py = __builtin_clz(y); int res = 0; while(x > 0) { int px = __builtin_clz(x) - py; x -= y << px; if (x < 0) { x += y; px--; } res += 1 << px; } return new int[] {res, x}; }Besides the returning format, and according the algorithm above, I would write in C the following function: void div(int N, int D) { int Q = 0; int x = N; int it = 1; while (x >= D) { if ( x < (D << it) ) { x -= (D << (it-1)); Q += (1 << (it-1)); it = 0; } it++; } cout << "Quotient: " << Q << " Remainder: " << x << endl; }public class Division { public static void main(String[] args) { int num = 23, denom = 7; System.out.println(Divide(num, denom)); } public static String Divide(int num, int denom) { int quotBits = 1; // start with a single bit quotient int quot = 0; // get number of quotient bits while ((denom = 0; bitExp--) { if (num >= (denom<despite these comments, I would do a binary search on the quotient. the upper bound is the dividend

AF2 Line Assembler at Honda was asked...

Oct 19, 2013
 When would we exspect to receive a hire date? 2 AnswersWe didn't get a specific answer.I received a start date after my background check was cleared.

Assembly/Production-Hourly at General Motors (GM) was asked...

Oct 9, 2013
 Name a time when you had to fill in for a absent coworker. what did you do how did you handle it what was the outcome2 Answersworked faster harder and got it done! (to put it simply, they will want MORE)did u get any marks during the assembly test?

Assembly Technician at PACCAR was asked...

Nov 20, 2012
 They asked how I would handle dealing with a difficult person and what I would do about it.2 AnswersI told them I would listen to the person who was having a problem and help them in any way I could.i didnt mean to vote down on that... i was trying to view next sorry

Jan 9, 2015
 When was a situation you were in the wrong?2 AnswersI didn't follow the manualWhen I was miss informed about the task at hand

Assembler at Masco Cabinetry was asked...

Dec 4, 2013
 "Why should we hire you?" Or "What makes you stand out?" 1 AnswerI don't even remember what b.s. I used to respond to that question, but again; it's not so much what you say, but how you say it. If you give the impression you believe in whatever it is you say, they'll believe in you.

Assembler at Two Technologies was asked...

Jan 18, 2012
 Do you pay attention do small detail?1 AnswerYes my work experience proves this.

Assembler Software Developer at Compuware was asked...

Aug 28, 2013
 3 or 4 people discussed my resume with me in detail.1 AnswerThere was no difficult question, because i was very good at what they wanted: IBM Mainframe Assembler Development i which I had over 20 years experience.

Assembler at Two Technologies was asked...

Jan 18, 2012
 Do you have experience with electronics? 1 AnswerI went to college to study electronics.