https://gitlab.com/tezos/tezos
Raw File
Tip revision: 946045f0fd19b10f0419990eee290306edc15077 authored by Nic Volanschi on 28 April 2023, 14:15:13 UTC
doc: explain the default role in the doc guidelines
Tip revision: 946045f
or_bytes_016.tz
parameter unit;
storage unit;
code { DROP;

       # 0x05 | 0x06 = 0x07
       PUSH bytes 0x05; PUSH bytes 0x06; OR; PUSH bytes 0x07; ASSERT_CMPEQ;

       # 0x0005 | 0x0106 = 0x0107
       PUSH bytes 0x0005; PUSH bytes 0x0106; OR; PUSH bytes 0x0107; ASSERT_CMPEQ;

       # Shorter bytes 0-padded to the left to have the same length as the longer one
       # 0x05 & 0x0106 = 0x0005 | 0x0106 = 0x0107, not 0x07
       PUSH bytes 0x05; PUSH bytes 0x0106; OR; PUSH bytes 0x0107; ASSERT_CMPEQ;

       UNIT; NIL @noop operation; PAIR; };
back to top