Rol and Ror operators missing

Write your ideas what you would like to have in Objective-Basic

Rol and Ror operators missing

Postby udo.killermann » Wed Nov 17, 2010 7:52 am

Bernd,

the bit operators would profit if you add rotate operators to it. Rotate looks at the bit pattern as a ring and if a bit leaves at one end it re enters on the other.
So if you rotate 0x5 (b00000101) one bit right it would become 0x82 (b10000010) when you assume the value to be 8 bits wide. Rotating it to the left would produce 0xa (b00001010). Rotation operators e.g. are used for crypto operation.

Regards
Udo
--------------
MacBook (2GHz, 4 GByte) - Lion (10.7.3)
started Objective Basic coding in April 2010 - still enjoy it ;-)
udo.killermann
 
Posts: 247
Joined: Thu Apr 08, 2010 6:46 am
Location: Hannover, Germany

Re: Rol and Ror operators missing

Postby berndnoetscher » Thu Nov 18, 2010 10:16 am

udo.killermann wrote:Bernd,

the bit operators would profit if you add rotate operators to it. Rotate looks at the bit pattern as a ring and if a bit leaves at one end it re enters on the other.
So if you rotate 0x5 (b00000101) one bit right it would become 0x82 (b10000010) when you assume the value to be 8 bits wide. Rotating it to the left would produce 0xa (b00001010). Rotation operators e.g. are used for crypto operation.

Regards
Udo


Interesting, didn't know it before. Will do it in the next releases...
berndnoetscher
Site Admin
 
Posts: 280
Joined: Fri Feb 20, 2009 11:58 am


Return to Wish List (Xcode 3)

Who is online

Users browsing this forum: No registered users and 0 guests

cron