Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
13
Task/Bitwise-operations/Erlang/bitwise-operations-1.erl
Normal file
13
Task/Bitwise-operations/Erlang/bitwise-operations-1.erl
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
-module(bitwise_operations).
|
||||
|
||||
-export([test/0]).
|
||||
|
||||
test() ->
|
||||
A = 255,
|
||||
B = 170,
|
||||
io:format("~p band ~p = ~p\n",[A,B,A band B]),
|
||||
io:format("~p bor ~p = ~p\n",[A,B,A bor B]),
|
||||
io:format("~p bxor ~p = ~p\n",[A,B,A bxor B]),
|
||||
io:format("not ~p = ~p\n",[A,bnot A]),
|
||||
io:format("~p bsl ~p = ~p\n",[A,B,A bsl B]),
|
||||
io:format("~p bsr ~p = ~p\n",[A,B,A bsr B]).
|
||||
6
Task/Bitwise-operations/Erlang/bitwise-operations-2.erl
Normal file
6
Task/Bitwise-operations/Erlang/bitwise-operations-2.erl
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
255 band 170 = 170
|
||||
255 bor 170 = 255
|
||||
255 bxor 170 = 85
|
||||
not 255 = -256
|
||||
255 bsl 170 = 381627307539845370001346183518875822092557105621893120
|
||||
255 bsr 170 = 0
|
||||
Loading…
Add table
Add a link
Reference in a new issue