7

## Top Interview Questions

Sort: Relevance Popular 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 Answers Got 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/4 Disk - 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.

Feb 10, 2014
 How is processor performance affected when the instruction cache hit latency increases? How do you overcome that? 6 Answers latency 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 latency I 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 Responses I 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 Answers 10-bit input (2^10) Any number of wires /2 -1. Might be a more optimal solution i'm not aware of 500 patterns Show More Responses answer = ceiling(log(N))

Feb 11, 2014
 What are the different ways of implementing a multiplexor at transistor-level? Compare them in terms of least delay? 1 Answer 1. use primary gates 2. use passing transistors 3. using transmission gates. delay: primary gates>passing transistors>transmission gates

Apr 15, 2013
 Compare the power usage of a regular versus a gray code counter. 2 Answers Gray code counters consume only half the power of an equivalent binary counter. Only one bit is toggling at a time. Not true that grey code consumes 1/2 power. Look at the case of an 8-bit counter where it becomes all 1's so the next count it will roll over to 0's. That's 8 bitschanging. Grey code only allows 1 bit changing.

### ASIC Design Engineer Intern at Qualcomm was asked...

Oct 12, 2011
 Digital VLSI