hex string, reverse and move 4 LSB ???

Thread Solved

Join Date: Sep 2006
Posts: 3
Reputation: etxulid is an unknown quantity at this point 
Solved Threads: 0
etxulid etxulid is offline Offline
Newbie Poster

hex string, reverse and move 4 LSB ???

 
0
  #1
Sep 29th, 2006
Hi, got a hex string

3E 65 72 3D 65

which first needs to be reversed to

C7 6A E4 CB 6A

then I need to move the 4 LSB in each byte to the 4 LSB in the next byte, need also to include 4 new bits (x) in the first byte of course, it will look like

Cx 67 EA C4 6B

Any ideas of existing functions?

Thanks
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 1,542
Reputation: Ene Uran has a spectacular aura about Ene Uran has a spectacular aura about 
Solved Threads: 172
Ene Uran's Avatar
Ene Uran Ene Uran is offline Offline
Posting Virtuoso

Re: hex string, reverse and move 4 LSB ???

 
0
  #2
Sep 29th, 2006
What do you mean with reversing a hex string?
drink her pretty
Reply With Quote Quick reply to this message  
Join Date: Sep 2006
Posts: 3
Reputation: etxulid is an unknown quantity at this point 
Solved Threads: 0
etxulid etxulid is offline Offline
Newbie Poster

Re: hex string, reverse and move 4 LSB ???

 
0
  #3
Sep 29th, 2006
Maybe my question was a little bit wrong. I would like to reverse a nibble. I have a dodgy solution but it works...

Now I have a different issue. I would like

temp1psc : ['\xc7', 'g', '\xea']

to look like

['\xc7g\xea']

Any ideas?
Reply With Quote Quick reply to this message  
Join Date: Apr 2006
Posts: 148
Reputation: ghostdog74 is on a distinguished road 
Solved Threads: 40
ghostdog74 ghostdog74 is offline Offline
Junior Poster

Re: hex string, reverse and move 4 LSB ???

 
0
  #4
Sep 29th, 2006
Originally Posted by etxulid View Post
Maybe my question was a little bit wrong. I would like to reverse a nibble. I have a dodgy solution but it works...

Now I have a different issue. I would like

temp1psc : ['\xc7', 'g', '\xea']

to look like

['\xc7g\xea']

Any ideas?
''.join(['\xc7', 'g', '\xea'])
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC