Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
9
Task/Bitwise-operations/F-Sharp/bitwise-operations.fs
Normal file
9
Task/Bitwise-operations/F-Sharp/bitwise-operations.fs
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
let bitwise a b =
|
||||
printfn "a and b: %d" (a &&& b)
|
||||
printfn "a or b: %d" (a ||| b)
|
||||
printfn "a xor b: %d" (a ^^^ b)
|
||||
printfn "not a: %d" (~~~a)
|
||||
printfn "a shl b: %d" (a <<< b)
|
||||
printfn "a shr b: %d" (a >>> b) // arithmetic shift
|
||||
printfn "a shr b: %d" ((uint32 a) >>> b) // logical shift
|
||||
// No rotation operators.
|
||||
Loading…
Add table
Add a link
Reference in a new issue