Bitwise operations: Difference between revisions
Content deleted Content added
m →{{header|Sidef}}: updated code |
|||
Line 3,083: | Line 3,083: | ||
=={{header|Sidef}}== |
=={{header|Sidef}}== |
||
<lang ruby>func bitwise(a, b) { |
<lang ruby>func bitwise(a, b) { |
||
⚫ | |||
say ('a or b : ', a | b) |
|||
⚫ | |||
a.to_int!; |
|||
⚫ | |||
b.to_int!; |
|||
⚫ | |||
say ('a |
say ('a >> b : ', a >> b) # arithmetic right shift |
||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
say ('a >> b : ', a >> b); # arithmetic right shift |
|||
} |
} |
||
bitwise(14,3)</lang> |
bitwise(14,3)</lang> |
||
{{out}} |
{{out}} |