Question d’entretien chez Amazon

Write a code to reverse binary bit pattern for an integer without using any string or utility methods?

Réponses aux questions d'entretien

Utilisateur anonyme

5 avr. 2010

there is rol and ror operations which can be useful to shift places and also the left most digit can move to the end during the operation.

Utilisateur anonyme

5 avr. 2010

http://www.intel.com/software/products/documentation/vlin/mergedprojects/analyzer_ec/mergedprojects/reference_olh/mergedProjects/instructions/instruct32_hh/vc270.htm this might be helpful

Utilisateur anonyme

9 juin 2011

unsigned int a=123; // Given number unsigned int b=0; /// temp variable int i; for(i=0; i>1; }

Utilisateur anonyme

9 juin 2011

unsigned int a=123; // Given number unsigned int b=0; /// temp variable int i; for(i=0; i> 1; }

Utilisateur anonyme

9 juin 2011

pls ignore my first ans.

Utilisateur anonyme

12 févr. 2010

hit use bitwise operations like bitwose OR, shift left, and shift right.