Anonymous user
Bitwise operations: Difference between revisions
→{{header|J}}: Segregated bitwise and rotation/shift functions. Simplified verb 'combine'.
(→{{header|J}}: Segregated bitwise and rotation/shift functions. Simplified verb 'combine'.) |
|||
Line 215:
=={{header|J}}==
Actual
brs =: 33 b.~ , (33 b.~ -), (34 b.~ -), 32 b.~ , (32 b.~ -)
title=: t,>;._2'Left shift:|Right shift:|Right signed shift:|Left rotate:|Right rotate:|'
Examples of execution, with output:
5 255 250 _256
8160 7 7 8160 _134217721
255 boolf 5 NB. formatted text with English titling
Bitwise x
Bitwise
Right
Left rotate:
Right rotate: _134217721
f _255 (bwo, brs) 5 NB. 32-bit diagrams
...............................x
xxxxxxxxxxxxxxxxxxxxxxxx.....x.x
|