• Post Reply Bookmark Topic Watch Topic
  • New Topic

Can you Explain this...  RSS feed

 
nikunj shingala
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Here I put some code but I don't understand result of this code and how it's work please explain me...
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please UseCodeTags when posting code or configuration. Unformatted code and configuration is unnecessarily difficult to read.

You can edit your post by using the button.
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It might help to see what's happening overall--do you understand what the purpose of the code is?

Then break it down piece by piece... there's a mask, which is probably to avoid signing issues. There's a shift of 8 (how many bits in a byte?) of n places, where n is determined by the index variable--which also determines which addr byte you're working with.

If you try putting it into your own words, you might suddenly discover you know exactly what's happening, and how--try it out and let us know what you come up with!
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!