149

## Top Interview Questions

Sort: RelevancePopular Date

May 12, 2012
 there is a disk half painted white and the other half black. There are two sensors and the outputs of these sensors are the only signals available. How will you determine if the disk is rotating clockwise or anti-clockwise? 3 AnswersGot an idea however it is valid only if clock can be used additionally to the two sensors. I use clock hours to describe the locations of the 2 sensors. The first sensor will be located at hour 12:00 the second will be located at hour 3:00. Then the first sensor will have to calculate the time it takes for one complete circle by: T=(time change from black to white) * 2 or T=(time change from white to black) * 2 The first sensor deliver signal to the second sensor when there is a change from black to white (or white to black) and the sensor is expecting the change. if the change (from black to white or from white to black) detected at the second sensor T/4 after getting the signal from the first sensor then the disk rounds clockwise else (when it take more then T/4 time) it runs counter clockwise when the second sensor get the signal it start timer to 1/4Disk - vertically divided, left side White, right side Black, sensors - on upper quadrants horizontal division line of the disk, white sensor in left upper quadrant, black - in the right upper quadrant. 1. No rotation, initial state - White sensor (WS) = HI, Black sensor (BS) = LO 2. Clockwise rotation to 90" : WS =HI, BS changes from LO to HI Truth table (for each 90") WS BS 1 0 1 1 0 1 0 0 1 0 etc WS ==__==__==__==__==__==__==__==__==__==__== BS _==__==__==__==__==__==__==__==__==__==__= 3. Anti-clockwise rotation to - 90" : WS changes from HI to LO, BS=LO Truth table (for each - 90") WS BS 1 0 0 0 0 1 1 1 1 0 etc WS =__==__==__==__==__==__==__==__==__==__ BS __==__==__==__==__==__==__==__==__==__=There is a much simpler solution. Place the sensors about 1/4 circumference apart. Use one FF. Feed one sensor into the clock pin and the other sensor into the D pin. Let's say bottom left sensor is A is is used for the clock. Lets say bottom right sensor (90 degrees apart from A) is connected to the D pin. When the wheel spins, the transition from black to light (0->1) cause the FF to sample the other input. If the D input is 1, the Q will become one and you are rotating CW. If there is a 0->1 transition and the D input is a 0, the Q becomes 0 and we are rotating CCW.

Dec 9, 2010
 design AND from Mux2 Answers2to1 Mux output is 0 if select(B)=0, and A if select(B)=1, it represents A AND B.Wire input1 to 0 and input2 to A and select to B.

Feb 10, 2014
 How is processor performance affected when the instruction cache hit latency increases? How do you overcome that? 6 Answerslatency could increase with increase in cache size, one way to overcome could be to use a multi-level cache, so that L1 cache could be smaller and which decrease s hit latencyI assume by 'overcoming' they mean that it cannot be improved by adding levels of cache hierarchy. In that case I think they are looking for a prefetching scheme.Increase in cache latency makes a longer pipeline and increases taken branch penalties. Using branch prediction helps reduce this affect.Show More ResponsesI don't think prefetching will help reduced "hit latency". Prefetching helps eliminate compulsory misses but to decrease hit latency, it should probably be at the lower levels of abstraction - circuit level.I don't think prefetching will help reduce "hit latency". Prefetching helps eliminate compulsory misses but to decrease hit latency, it should probably be at the lower levels of abstraction - circuit level.1. Use small, simple cache 2. Split & multi-banked cache organization (instruction cache and data cache) 3. Use virtual indexing and physical tagging rather than virtual address to reduce the time caused by translations. 4. Use way prediction to predict the index 5. Pipeline the write operation, do write the word to block and cache in background

May 12, 2012
 there are 1000 wires in which any number of them can be swapped among themselves. How many bit patterns would you send at the input side to get the correct number of wires that are swapped?4 Answers10-bit input (2^10)Any number of wires /2 -1. Might be a more optimal solution i'm not aware of500 patternsShow More Responsesanswer = ceiling(log(N))

### Design Engineering Intern at Pratt & Whitney was asked...

Apr 8, 2013
 I was asked a trick question about writing the equation for Energy. But even though I only got it partially right the manager was impressed.1 AnswerThe trick is that at the end of the equation you have to subtract energy lost.

Feb 23, 2014
 A. Why are Manhole covers round B. How do you get 4 gallons of water into one jug if you have one 3 gallong and one 5 gallons jug2 AnswersA.) Because they are the only shape that no matter what way you turn it they cannot fall through the hole B.) Google it, its a common weirdo question there are several mathematical ways to solve this question.1. a) A round cover will never fall in manhole. b) Easy for transportation, can be rolled even if it is heavy. c) Fitting/sliding it over the manhole it easy, no alignment problems. 2. step 1: Full the 5 gallon jug then pour water in 2 gallon jug to fill it. Now you are left with 2 gallon water in 5 gallon jug. step 2: Now pour that 2 gallon water in a vessel and repeat step 1 and 2 again. step 3: You will have 4 gallons of water in the vessel

Nov 13, 2013
 One thing that you did differently in a project compared to every one else in class1 AnswerCame up with some answer, which was not very convincing though.

Mar 28, 2014
 How many skills can you practice at the same time? (designers, expected to multitask)1 Answerdesigners are expected to multitask