RosettaCodeData/Task/Bitwise-operations/LSE64/bitwise-operations.lse64

12 lines
246 B
Text
Raw Permalink Normal View History

2013-04-10 21:29:02 -07:00
over : 2 pick
2dup : over over
bitwise : \
" A=" ,t over ,h sp " B=" ,t dup ,h nl \
" A and B=" ,t 2dup & ,h nl \
" A or B=" ,t 2dup | ,h nl \
" A xor B=" ,t over ^ ,h nl \
" not A=" ,t ~ ,h nl
\ a \ 7 bitwise # hex literals