Bitwise operations: Difference between revisions
Content added Content deleted
(Added J solution.) |
(→{{header|J}}: Rearranged definitions.) |
||
Line 94: | Line 94: | ||
=={{header|J}}== |
=={{header|J}}== |
||
Actual bitwise calculation occurs in<tt> bwonum</tt>. Other definitions provide formatting. |
Actual bitwise calculation occurs in<tt> bwonum</tt>. Other definitions provide formatting. |
||
⚫ | |||
bwonum =: (17 b.) , (23 b.) , (22 b.) , (28. b.) |
bwonum =: (17 b.) , (23 b.) , (22 b.) , (28. b.) |
||
⚫ | |||
combine =: [ ,. ":@|:@,:@] |
combine =: [ ,. ":@|:@,:@] |
||
title =: >;._2 'Bitwise x AND y: |Bitwise x OR y:|Bitwise x XOR y:|Bitwise NOT-x:|' |
title =: >;._2 'Bitwise x AND y: |Bitwise x OR y:|Bitwise x XOR y:|Bitwise NOT-x:|' |