though im very unsure abt this,but how abt converting the number to BCD and then normal swapping of the two nibbles?? Bt i guess this would work only for 2 digit numbers...
On Wed, Aug 24, 2011 at 8:20 PM, aditya kumar <aditya.kumar130...@gmail.com>wrote: > does anyone know the correct solution this problem ?? > problem : i/p :: 39 > o/p:: 93 (using bitwise operator) > > > On Fri, Aug 12, 2011 at 1:41 PM, Prakash D <cegprak...@gmail.com> wrote: > >> how does the above code work? >> >> >> On Fri, Aug 12, 2011 at 1:14 PM, Rahul <raikra...@gmail.com> wrote: >> >>> I understand. where I find some more tricks like these , I mean I >>> really. find. bit thinking hacks. difficult to understand. >>> >>> >>> On 8/12/11, Tarun Arya <tarun....@gmail.com> wrote: >>> > RAHUL@ >>> > d question was to reverse d 2 numbers...it can b done by wat i hav >>> said... >>> > if u want 2 extract numbers then.... >>> > a&0x0f //this wil giv number in units place... >>> > a&0xf0 a>>4//this wil give number in tens place >>> > >>> > correct me if i m wrong >>> > Tarun >>> > >>> > -- >>> > You received this message because you are subscribed to the Google >>> Groups >>> > "Algorithm Geeks" group. >>> > To post to this group, send email to algogeeks@googlegroups.com. >>> > To unsubscribe from this group, send email to >>> > algogeeks+unsubscr...@googlegroups.com. >>> > For more options, visit this group at >>> > http://groups.google.com/group/algogeeks?hl=en. >>> > >>> > >>> >>> >>> -- >>> Rahul >>> >>> -- >>> You received this message because you are subscribed to the Google Groups >>> "Algorithm Geeks" group. >>> To post to this group, send email to algogeeks@googlegroups.com. >>> To unsubscribe from this group, send email to >>> algogeeks+unsubscr...@googlegroups.com. >>> For more options, visit this group at >>> http://groups.google.com/group/algogeeks?hl=en. >>> >>> >> -- >> You received this message because you are subscribed to the Google Groups >> "Algorithm Geeks" group. >> To post to this group, send email to algogeeks@googlegroups.com. >> To unsubscribe from this group, send email to >> algogeeks+unsubscr...@googlegroups.com. >> For more options, visit this group at >> http://groups.google.com/group/algogeeks?hl=en. >> > > -- > You received this message because you are subscribed to the Google Groups > "Algorithm Geeks" group. > To post to this group, send email to algogeeks@googlegroups.com. > To unsubscribe from this group, send email to > algogeeks+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/algogeeks?hl=en. > -- Aditi Garg Undergraduate Student Electronics & Communication Divison NETAJI SUBHAS INSTITUTE OF TECHNOLOGY Sector 3, Dwarka New Delhi -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.