Bit Manipulation Interview Questions
- 0of 0 votes
AnswersConvert a two dimensional byte array to one dimensional int array - int[] convert(byte[][] b). Optimize for minimum space usage.
- Anonymous February 10, 2011| Report Duplicate | Flag | PURGE
Software Engineer / Developer Bit Manipulation - 0of 0 votes
Answersoptimize a code to reverse bits of a character n print it?
- bk February 07, 2011| Report Duplicate | Flag | PURGE
One97 Software Engineer / Developer Bit Manipulation - 0of 0 votes
AnswersGiven a long bit string M and a small bit string N
- Yang January 12, 2011
Make the bits between p & q in M same as N (q-p = strlen(N))| Report Duplicate | Flag | PURGE
NVIDIA Software Engineer / Developer Bit Manipulation - 0of 0 votes
AnswersIf a number is power of 2
- Interviewee October 07, 2010| Report Duplicate | Flag | PURGE
Qualcomm Software Engineer in Test Bit Manipulation - 1of 1 vote
AnswersSwap variables without using temp
- Interviewee October 07, 2010| Report Duplicate | Flag | PURGE
Qualcomm Software Engineer in Test Bit Manipulation - 0of 0 votes
AnswersSwap variables without using temp
- Interviewee October 07, 2010| Report Duplicate | Flag | PURGE
Qualcomm Software Engineer in Test Bit Manipulation - 1of 1 vote
AnswersThere is very long array of ints, and you are given pointer to base addr of this array.. each int is 16bit representation... you need to return the pointer to tht "bit" inside array where longest sequence of "1"s start
- gradStudent June 16, 2010| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Algorithm Arrays Bit Manipulation Computer Architecture & Low Level - 0of 0 votes
AnswersWrite a function void DrawRectangle(char *Screen, int x1, int y1, int x2, int y2). Height and width of the monitor is known. To set a pixel, you need to set that particular bit of the screen.
- binu May 28, 2010| Report Duplicate | Flag | PURGE
Google Software Engineer / Developer Algorithm Bit Manipulation - 2of 2 votes
AnswersAn array of integers of size n-1, all the elements are form [1,n]. Find the missing number. You can read only one bit in one operation, ie, to read A[i], you need to perform log(A[i]) operations.
- binu May 28, 2010| Report Duplicate | Flag | PURGE
Google Software Engineer / Developer Algorithm Arrays Bit Manipulation - 1of 1 vote
AnswersNumber of binary 1's in an integer n umber.
- bcsavsani May 08, 2010| Report Duplicate | Flag | PURGE
Qualcomm Software Engineer / Developer Bit Manipulation - 1of 1 vote
AnswersGiven an 32-bit integer X, swap the i-th and j-th bit.
- onetreehill April 23, 2010| Report Duplicate | Flag | PURGE
Google Software Engineer / Developer Bit Manipulation - 1of 1 vote
Answersgiven a number, 9th bit set or not?
- Anonymous April 12, 2010| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Bit Manipulation - 1of 1 vote
AnswersGiven an array one set repeats once, one set repeats thrice, rest all repeats twice .. XOR method only .. (No Sorting and Hashing)
- Anonymous March 20, 2010| Report Duplicate | Flag | PURGE
Bit Manipulation - 0of 0 votes
Answerswrite a c code to reverse the bits in a uint8 type variable.
- dd March 06, 2010| Report Duplicate | Flag | PURGE
Qualcomm Software Engineer / Developer Bit Manipulation - 1of 1 vote
Answerswrite a code to count the no.of 1s in a given 16 bit integer.
- dd March 06, 2010| Report Duplicate | Flag | PURGE
Qualcomm Software Engineer / Developer Bit Manipulation - 0of 0 votes
AnswersGiven a 32-bit binary number, what is the quickest way to find the position of the most significant 1 bit?
- Glenn January 26, 2010| Report Duplicate | Flag | PURGE
Software Engineer / Developer Bit Manipulation - 1of 1 vote
AnswersWrite code to convert a hex string to a byte buffer
- AM January 13, 2010| Report Duplicate | Flag | PURGE
Google Software Engineer / Developer Bit Manipulation - 1of 1 vote
AnswersDesign an algorithm to count number for Bit 1s in byte
- CPPDEVELOPER January 11, 2010| Report Duplicate | Flag | PURGE
Bloomberg LP Software Engineer / Developer Bit Manipulation - 1of 1 vote
AnswersFind if a given integer is a power of 2.Optimize it.
- jack November 15, 2009| Report Duplicate | Flag | PURGE
Bloomberg LP Software Engineer / Developer Financial Software Developer Bit Manipulation - 0of 0 votes
AnswersHow would you reverse bits of an integer in an optimized way suitable for an embedded system?
- S3 November 13, 2009| Report Duplicate | Flag | PURGE
NVIDIA Software Engineer / Developer Bit Manipulation - 0of 0 votes
AnswersWrite a code to swap every two bits in a byte. (Using bit operators) eg: Input: 10 01 11 00 Output: 01 10 11 00
- jai August 11, 2009| Report Duplicate | Flag | PURGE
Cisco Systems Bit Manipulation - 0of 0 votes
AnswersGiven an 8 bits, give the range of integers it can cover.
- optimus June 26, 2009| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Bit Manipulation - 0of 0 votes
AnswersWrite a code that displays the bit pattern corresponding to an unsigned decimal integer.
- neil turok December 17, 2008| Report Duplicate | Flag | PURGE
Bloomberg LP Financial Software Developer Bit Manipulation - 1of 1 vote
AnswersWrite a method to check if a number is power of 2
- Anonymous November 11, 2008| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Bit Manipulation