From: Zangief Ief Date: 2008-01-23T07:51:15+09:00 Subject: Re: Circular shift Thanks a lot, Lloyd Linklater, 7stud and Mental Guy!! I am very happy to see all of your reply for the question! :) I have trying to use functions of Mental Guy with this few lines: block = 134 # it's a example of decimal value puts "block (dec): #{block}" puts "block (bin): #{block.to_s(2)}" # here I try to shift 2 bites at the right new_b = circular_shift_right(block, block.to_s(2).length, 2) # and to display the result: puts "new_b (dec): #{new_b}" puts "new_b (bin): #{new_b.to_s(2)}" Is it possible to use your system like this? circular_shift_right(my_block, number_of_bit_to_shift) I will continue to read your code :) Thanks again! -- Posted via http://www.ruby-forum.com/.