ligo/gitlab-pages/docs/reference/bitwise.md

70 lines
1.5 KiB
Markdown
Raw Normal View History

2020-03-17 19:38:41 +04:00
---
id: bitwise-reference
title: Bitwise
description: Operations on bytes
hide_table_of_contents: true
---
import Syntax from '@theme/Syntax';
import SyntaxTitle from '@theme/SyntaxTitle';
<SyntaxTitle syntax="pascaligo">
function and : nat -> nat -> nat
</SyntaxTitle>
<SyntaxTitle syntax="cameligo">
val and : nat -> nat -> nat
</SyntaxTitle>
<SyntaxTitle syntax="reasonligo">
2020-04-06 20:09:23 +04:00
let and: (nat, nat) => nat
2020-03-17 19:38:41 +04:00
</SyntaxTitle>
A bitwise `and` operation.
<SyntaxTitle syntax="pascaligo">
function or : nat -> nat -> nat
</SyntaxTitle>
<SyntaxTitle syntax="cameligo">
val or : nat -> nat -> nat
</SyntaxTitle>
<SyntaxTitle syntax="reasonligo">
2020-04-06 20:09:23 +04:00
let or: (nat, nat) => nat
2020-03-17 19:38:41 +04:00
</SyntaxTitle>
A bitwise `or` operation.
<SyntaxTitle syntax="pascaligo">
function xor : nat -> nat -> nat
</SyntaxTitle>
<SyntaxTitle syntax="cameligo">
val xor : nat -> nat -> nat
</SyntaxTitle>
<SyntaxTitle syntax="reasonligo">
2020-04-06 20:09:23 +04:00
let xor: (nat, nat) => nat
2020-03-17 19:38:41 +04:00
</SyntaxTitle>
A bitwise `xor` operation.
<SyntaxTitle syntax="pascaligo">
function shift_left : nat -> nat -> nat
</SyntaxTitle>
<SyntaxTitle syntax="cameligo">
val shift_left : nat -> nat -> nat
</SyntaxTitle>
<SyntaxTitle syntax="reasonligo">
2020-04-06 20:09:23 +04:00
let shift_left: (nat, nat) => nat
2020-03-17 19:38:41 +04:00
</SyntaxTitle>
A bitwise shift left operation.
<SyntaxTitle syntax="pascaligo">
function shift_right : nat -> nat -> nat
</SyntaxTitle>
<SyntaxTitle syntax="cameligo">
val shift_right : nat -> nat -> nat
</SyntaxTitle>
<SyntaxTitle syntax="reasonligo">
2020-04-06 20:09:23 +04:00
let shift_right: (nat, nat) => nat
2020-03-17 19:38:41 +04:00
</SyntaxTitle>
A bitwise shift right operation.