From 018b6c32fe54242abef0d6fb6ba33ac4a798daa2 Mon Sep 17 00:00:00 2001 From: Gavin Howard Date: Fri, 30 Jul 2021 22:27:32 -0600 Subject: Add new lib2.bc functions to the manuals Signed-off-by: Gavin Howard --- manuals/bc.1.md.in | 296 +++++++++++++++++++++++++++++++++++++++++++++- manuals/bc/A.1 | 340 ++++++++++++++++++++++++++++++++++++++++++++++++++++- manuals/bc/A.1.md | 296 +++++++++++++++++++++++++++++++++++++++++++++- manuals/bc/H.1 | 340 ++++++++++++++++++++++++++++++++++++++++++++++++++++- manuals/bc/H.1.md | 296 +++++++++++++++++++++++++++++++++++++++++++++- manuals/bc/HN.1 | 340 ++++++++++++++++++++++++++++++++++++++++++++++++++++- manuals/bc/HN.1.md | 296 +++++++++++++++++++++++++++++++++++++++++++++- manuals/bc/N.1 | 340 ++++++++++++++++++++++++++++++++++++++++++++++++++++- manuals/bc/N.1.md | 296 +++++++++++++++++++++++++++++++++++++++++++++- 9 files changed, 2795 insertions(+), 45 deletions(-) diff --git a/manuals/bc.1.md.in b/manuals/bc.1.md.in index 44d860c8..6e009795 100644 --- a/manuals/bc.1.md.in +++ b/manuals/bc.1.md.in @@ -1375,31 +1375,317 @@ The extended library is a **non-portable extension**. : Returns a random boolean value (either **0** or **1**). -**band()** +**band(a, b)** : Takes the truncated absolute value of both **a** and **b** and calculates and returns the result of the bitwise **and** operation between them. -**bor()** + If you want to use signed two's complement arguments, use **s2u(x)** to + convert. + +**bor(a, b)** : Takes the truncated absolute value of both **a** and **b** and calculates and returns the result of the bitwise **or** operation between them. -**bxor()** + If you want to use signed two's complement arguments, use **s2u(x)** to + convert. + +**bxor(a, b)** : Takes the truncated absolute value of both **a** and **b** and calculates and returns the result of the bitwise **xor** operation between them. -**blshift()** + If you want to use signed two's complement arguments, use **s2u(x)** to + convert. + +**bshl(a, b)** : Takes the truncated absolute value of both **a** and **b** and calculates and returns the result of **a** bit-shifted left by **b** places. -**brshift()** + If you want to use signed two's complement arguments, use **s2u(x)** to + convert. + +**bshr(a, b)** : Takes the truncated absolute value of both **a** and **b** and calculates and returns the truncated result of **a** bit-shifted right by **b** places. + If you want to use signed two's complement arguments, use **s2u(x)** to + convert. + +**bnotn(x, n)** + +: Takes the truncated absolute value of **x** and does a bitwise not as though + it has the same number of bytes as the truncated absolute value of **n**. + + If you want to a use signed two's complement argument, use **s2u(x)** to + convert. + +**bnot8(x)** + +: Does a bitwise not of the truncated absolute value of **x** as though it has + **8** binary digits (1 unsigned byte). + + If you want to a use signed two's complement argument, use **s2u(x)** to + convert. + +**bnot16(x)** + +: Does a bitwise not of the truncated absolute value of **x** as though it has + **16** binary digits (2 unsigned bytes). + + If you want to a use signed two's complement argument, use **s2u(x)** to + convert. + +**bnot32(x)** + +: Does a bitwise not of the truncated absolute value of **x** as though it has + **32** binary digits (4 unsigned bytes). + + If you want to a use signed two's complement argument, use **s2u(x)** to + convert. + +**bnot64(x)** + +: Does a bitwise not of the truncated absolute value of **x** as though it has + **64** binary digits (8 unsigned bytes). + + If you want to a use signed two's complement argument, use **s2u(x)** to + convert. + +**bnot(x)** + +: Does a bitwise not of the truncated absolute value of **x** as though it has + the minimum number of power of two unsigned bytes. + + If you want to a use signed two's complement argument, use **s2u(x)** to + convert. + +**brevn(x, n)** + +: Runs a bit reversal on the truncated absolute value of **x** as though it + has the same number of 8-bit bytes as the truncated absolute value of **n**. + + If you want to a use signed two's complement argument, use **s2u(x)** to + convert. + +**brev8(x)** + +: Runs a bit reversal on the truncated absolute value of **x** as though it + has 8 binary digits (1 unsigned byte). + + If you want to a use signed two's complement argument, use **s2u(x)** to + convert. + +**brev16(x)** + +: Runs a bit reversal on the truncated absolute value of **x** as though it + has 16 binary digits (2 unsigned bytes). + + If you want to a use signed two's complement argument, use **s2u(x)** to + convert. + +**brev32(x)** + +: Runs a bit reversal on the truncated absolute value of **x** as though it + has 32 binary digits (4 unsigned bytes). + + If you want to a use signed two's complement argument, use **s2u(x)** to + convert. + +**brev64(x)** + +: Runs a bit reversal on the truncated absolute value of **x** as though it + has 64 binary digits (8 unsigned bytes). + + If you want to a use signed two's complement argument, use **s2u(x)** to + convert. + +**brev(x)** + +: Runs a bit reversal on the truncated absolute value of **x** as though it + has the minimum number of power of two unsigned bytes. + + If you want to a use signed two's complement argument, use **s2u(x)** to + convert. + +**broln(x, p, n)** + +: Does a left bitwise rotatation of the truncated absolute value of **x**, as + though it has the same number of unsigned 8-bit bytes as the truncated + absolute value of **n**, by the number of places equal to the truncated + absolute value of **p** modded by the **2** to the power of the number of + binary digits in **n** 8-bit bytes. + + If you want to a use signed two's complement argument, use **s2u(x)** to + convert. + +**brol8(x, p)** + +: Does a left bitwise rotatation of the truncated absolute value of **x**, as + though it has **8** binary digits (**1** unsigned byte), by the number of + places equal to the truncated absolute value of **p** modded by **2** to the + power of **8**. + + If you want to a use signed two's complement argument, use **s2u(x)** to + convert. + +**brol16(x, p)** + +: Does a left bitwise rotatation of the truncated absolute value of **x**, as + though it has **16** binary digits (**2** unsigned bytes), by the number of + places equal to the truncated absolute value of **p** modded by **2** to the + power of **16**. + + If you want to a use signed two's complement argument, use **s2u(x)** to + convert. + +**brol32(x, p)** + +: Does a left bitwise rotatation of the truncated absolute value of **x**, as + though it has **32** binary digits (**2** unsigned bytes), by the number of + places equal to the truncated absolute value of **p** modded by **2** to the + power of **32**. + + If you want to a use signed two's complement argument, use **s2u(x)** to + convert. + +**brol64(x, p)** + +: Does a left bitwise rotatation of the truncated absolute value of **x**, as + though it has **64** binary digits (**2** unsigned bytes), by the number of + places equal to the truncated absolute value of **p** modded by **2** to the + power of **64**. + + If you want to a use signed two's complement argument, use **s2u(x)** to + convert. + +**brol(x, p)** + +: Does a left bitwise rotatation of the truncated absolute value of **x**, as + though it has the minimum number of power of two unsigned 8-bit bytes, by + the number of places equal to the truncated absolute value of **p** modded + by 2 to the power of the number of binary digits in the minimum number of + 8-bit bytes. + + If you want to a use signed two's complement argument, use **s2u(x)** to + convert. + +**brorn(x, p, n)** + +: Does a right bitwise rotatation of the truncated absolute value of **x**, as + though it has the same number of unsigned 8-bit bytes as the truncated + absolute value of **n**, by the number of places equal to the truncated + absolute value of **p** modded by the **2** to the power of the number of + binary digits in **n** 8-bit bytes. + + If you want to a use signed two's complement argument, use **s2u(x)** to + convert. + +**bror8(x, p)** + +: Does a right bitwise rotatation of the truncated absolute value of **x**, as + though it has **8** binary digits (**1** unsigned byte), by the number of + places equal to the truncated absolute value of **p** modded by **2** to the + power of **8**. + + If you want to a use signed two's complement argument, use **s2u(x)** to + convert. + +**bror16(x, p)** + +: Does a right bitwise rotatation of the truncated absolute value of **x**, as + though it has **16** binary digits (**2** unsigned bytes), by the number of + places equal to the truncated absolute value of **p** modded by **2** to the + power of **16**. + + If you want to a use signed two's complement argument, use **s2u(x)** to + convert. + +**bror32(x, p)** + +: Does a right bitwise rotatation of the truncated absolute value of **x**, as + though it has **32** binary digits (**2** unsigned bytes), by the number of + places equal to the truncated absolute value of **p** modded by **2** to the + power of **32**. + + If you want to a use signed two's complement argument, use **s2u(x)** to + convert. + +**bror64(x, p)** + +: Does a right bitwise rotatation of the truncated absolute value of **x**, as + though it has **64** binary digits (**2** unsigned bytes), by the number of + places equal to the truncated absolute value of **p** modded by **2** to the + power of **64**. + + If you want to a use signed two's complement argument, use **s2u(x)** to + convert. + +**bror(x, p)** + +: Does a right bitwise rotatation of the truncated absolute value of **x**, as + though it has the minimum number of power of two unsigned 8-bit bytes, by + the number of places equal to the truncated absolute value of **p** modded + by 2 to the power of the number of binary digits in the minimum number of + 8-bit bytes. + + If you want to a use signed two's complement argument, use **s2u(x)** to + convert. + +**bmodn(x, n)** + +: Returns the modulus of the truncated absolute value of **x** by **2** to the + power of the multiplication of the truncated absolute value of **n** and + **8**. + + If you want to a use signed two's complement argument, use **s2u(x)** to + convert. + +**bmod8(x, n)** + +: Returns the modulus of the truncated absolute value of **x** by **2** to the + power of **8**. + + If you want to a use signed two's complement argument, use **s2u(x)** to + convert. + +**bmod16(x, n)** + +: Returns the modulus of the truncated absolute value of **x** by **2** to the + power of **16**. + + If you want to a use signed two's complement argument, use **s2u(x)** to + convert. + +**bmod32(x, n)** + +: Returns the modulus of the truncated absolute value of **x** by **2** to the + power of **32**. + + If you want to a use signed two's complement argument, use **s2u(x)** to + convert. + +**bmod64(x, n)** + +: Returns the modulus of the truncated absolute value of **x** by **2** to the + power of **64**. + + If you want to a use signed two's complement argument, use **s2u(x)** to + convert. + +**bunrev(t)** + +: Assumes **t** is a bitwise-reversed number with an extra set bit one place + more significant than the real most significant bit (which was the least + significant bit in the original number). This number is reversed and + returned without the extra set bit. + + This function is used to implement other bitwise functions; it is not meant + to be used by users, but it can be. + **ubytes(x)** : Returns the numbers of unsigned integer bytes required to hold the truncated diff --git a/manuals/bc/A.1 b/manuals/bc/A.1 index d101c0e4..ff9973e3 100644 --- a/manuals/bc/A.1 +++ b/manuals/bc/A.1 @@ -1582,30 +1582,360 @@ In other words, it randomizes the sign of \f[B]x\f[R]. \f[B]brand()\f[R] Returns a random boolean value (either \f[B]0\f[R] or \f[B]1\f[R]). .TP -\f[B]band()\f[R] +\f[B]band(a, b)\f[R] Takes the truncated absolute value of both \f[B]a\f[R] and \f[B]b\f[R] and calculates and returns the result of the bitwise \f[B]and\f[R] operation between them. +.RS +.PP +If you want to use signed two\[cq]s complement arguments, use +\f[B]s2u(x)\f[R] to convert. +.RE .TP -\f[B]bor()\f[R] +\f[B]bor(a, b)\f[R] Takes the truncated absolute value of both \f[B]a\f[R] and \f[B]b\f[R] and calculates and returns the result of the bitwise \f[B]or\f[R] operation between them. +.RS +.PP +If you want to use signed two\[cq]s complement arguments, use +\f[B]s2u(x)\f[R] to convert. +.RE .TP -\f[B]bxor()\f[R] +\f[B]bxor(a, b)\f[R] Takes the truncated absolute value of both \f[B]a\f[R] and \f[B]b\f[R] and calculates and returns the result of the bitwise \f[B]xor\f[R] operation between them. +.RS +.PP +If you want to use signed two\[cq]s complement arguments, use +\f[B]s2u(x)\f[R] to convert. +.RE .TP -\f[B]blshift()\f[R] +\f[B]bshl(a, b)\f[R] Takes the truncated absolute value of both \f[B]a\f[R] and \f[B]b\f[R] and calculates and returns the result of \f[B]a\f[R] bit-shifted left by \f[B]b\f[R] places. +.RS +.PP +If you want to use signed two\[cq]s complement arguments, use +\f[B]s2u(x)\f[R] to convert. +.RE .TP -\f[B]brshift()\f[R] +\f[B]bshr(a, b)\f[R] Takes the truncated absolute value of both \f[B]a\f[R] and \f[B]b\f[R] and calculates and returns the truncated result of \f[B]a\f[R] bit-shifted right by \f[B]b\f[R] places. +.RS +.PP +If you want to use signed two\[cq]s complement arguments, use +\f[B]s2u(x)\f[R] to convert. +.RE +.TP +\f[B]bnotn(x, n)\f[R] +Takes the truncated absolute value of \f[B]x\f[R] and does a bitwise not +as though it has the same number of bytes as the truncated absolute +value of \f[B]n\f[R]. +.RS +.PP +If you want to a use signed two\[cq]s complement argument, use +\f[B]s2u(x)\f[R] to convert. +.RE +.TP +\f[B]bnot8(x)\f[R] +Does a bitwise not of the truncated absolute value of \f[B]x\f[R] as +though it has \f[B]8\f[R] binary digits (1 unsigned byte). +.RS +.PP +If you want to a use signed two\[cq]s complement argument, use +\f[B]s2u(x)\f[R] to convert. +.RE +.TP +\f[B]bnot16(x)\f[R] +Does a bitwise not of the truncated absolute value of \f[B]x\f[R] as +though it has \f[B]16\f[R] binary digits (2 unsigned bytes). +.RS +.PP +If you want to a use signed two\[cq]s complement argument, use +\f[B]s2u(x)\f[R] to convert. +.RE +.TP +\f[B]bnot32(x)\f[R] +Does a bitwise not of the truncated absolute value of \f[B]x\f[R] as +though it has \f[B]32\f[R] binary digits (4 unsigned bytes). +.RS +.PP +If you want to a use signed two\[cq]s complement argument, use +\f[B]s2u(x)\f[R] to convert. +.RE +.TP +\f[B]bnot64(x)\f[R] +Does a bitwise not of the truncated absolute value of \f[B]x\f[R] as +though it has \f[B]64\f[R] binary digits (8 unsigned bytes). +.RS +.PP +If you want to a use signed two\[cq]s complement argument, use +\f[B]s2u(x)\f[R] to convert. +.RE +.TP +\f[B]bnot(x)\f[R] +Does a bitwise not of the truncated absolute value of \f[B]x\f[R] as +though it has the minimum number of power of two unsigned bytes. +.RS +.PP +If you want to a use signed two\[cq]s complement argument, use +\f[B]s2u(x)\f[R] to convert. +.RE +.TP +\f[B]brevn(x, n)\f[R] +Runs a bit reversal on the truncated absolute value of \f[B]x\f[R] as +though it has the same number of 8-bit bytes as the truncated absolute +value of \f[B]n\f[R]. +.RS +.PP +If you want to a use signed two\[cq]s complement argument, use +\f[B]s2u(x)\f[R] to convert. +.RE +.TP +\f[B]brev8(x)\f[R] +Runs a bit reversal on the truncated absolute value of \f[B]x\f[R] as +though it has 8 binary digits (1 unsigned byte). +.RS +.PP +If you want to a use signed two\[cq]s complement argument, use +\f[B]s2u(x)\f[R] to convert. +.RE +.TP +\f[B]brev16(x)\f[R] +Runs a bit reversal on the truncated absolute value of \f[B]x\f[R] as +though it has 16 binary digits (2 unsigned bytes). +.RS +.PP +If you want to a use signed two\[cq]s complement argument, use +\f[B]s2u(x)\f[R] to convert. +.RE +.TP +\f[B]brev32(x)\f[R] +Runs a bit reversal on the truncated absolute value of \f[B]x\f[R] as +though it has 32 binary digits (4 unsigned bytes). +.RS +.PP +If you want to a use signed two\[cq]s complement argument, use +\f[B]s2u(x)\f[R] to convert. +.RE +.TP +\f[B]brev64(x)\f[R] +Runs a bit reversal on the truncated absolute value of \f[B]x\f[R] as +though it has 64 binary digits (8 unsigned bytes). +.RS +.PP +If you want to a use signed two\[cq]s complement argument, use +\f[B]s2u(x)\f[R] to convert. +.RE +.TP +\f[B]brev(x)\f[R] +Runs a bit reversal on the truncated absolute value of \f[B]x\f[R] as +though it has the minimum number of power of two unsigned bytes. +.RS +.PP +If you want to a use signed two\[cq]s complement argument, use +\f[B]s2u(x)\f[R] to convert. +.RE +.TP +\f[B]broln(x, p, n)\f[R] +Does a left bitwise rotatation of the truncated absolute value of +\f[B]x\f[R], as though it has the same number of unsigned 8-bit bytes as +the truncated absolute value of \f[B]n\f[R], by the number of places +equal to the truncated absolute value of \f[B]p\f[R] modded by the +\f[B]2\f[R] to the power of the number of binary digits in \f[B]n\f[R] +8-bit bytes. +.RS +.PP +If you want to a use signed two\[cq]s complement argument, use +\f[B]s2u(x)\f[R] to convert. +.RE +.TP +\f[B]brol8(x, p)\f[R] +Does a left bitwise rotatation of the truncated absolute value of +\f[B]x\f[R], as though it has \f[B]8\f[R] binary digits (\f[B]1\f[R] +unsigned byte), by the number of places equal to the truncated absolute +value of \f[B]p\f[R] modded by \f[B]2\f[R] to the power of \f[B]8\f[R]. +.RS +.PP +If you want to a use signed two\[cq]s complement argument, use +\f[B]s2u(x)\f[R] to convert. +.RE +.TP +\f[B]brol16(x, p)\f[R] +Does a left bitwise rotatation of the truncated absolute value of +\f[B]x\f[R], as though it has \f[B]16\f[R] binary digits (\f[B]2\f[R] +unsigned bytes), by the number of places equal to the truncated absolute +value of \f[B]p\f[R] modded by \f[B]2\f[R] to the power of \f[B]16\f[R]. +.RS +.PP +If you want to a use signed two\[cq]s complement argument, use +\f[B]s2u(x)\f[R] to convert. +.RE +.TP +\f[B]brol32(x, p)\f[R] +Does a left bitwise rotatation of the truncated absolute value of +\f[B]x\f[R], as though it has \f[B]32\f[R] binary digits (\f[B]2\f[R] +unsigned bytes), by the number of places equal to the truncated absolute +value of \f[B]p\f[R] modded by \f[B]2\f[R] to the power of \f[B]32\f[R]. +.RS +.PP +If you want to a use signed two\[cq]s complement argument, use +\f[B]s2u(x)\f[R] to convert. +.RE +.TP +\f[B]brol64(x, p)\f[R] +Does a left bitwise rotatation of the truncated absolute value of +\f[B]x\f[R], as though it has \f[B]64\f[R] binary digits (\f[B]2\f[R] +unsigned bytes), by the number of places equal to the truncated absolute +value of \f[B]p\f[R] modded by \f[B]2\f[R] to the power of \f[B]64\f[R]. +.RS +.PP +If you want to a use signed two\[cq]s complement argument, use +\f[B]s2u(x)\f[R] to convert. +.RE +.TP +\f[B]brol(x, p)\f[R] +Does a left bitwise rotatation of the truncated absolute value of +\f[B]x\f[R], as though it has the minimum number of power of two +unsigned 8-bit bytes, by the number of places equal to the truncated +absolute value of \f[B]p\f[R] modded by 2 to the power of the number of +binary digits in the minimum number of 8-bit bytes. +.RS +.PP +If you want to a use signed two\[cq]s complement argument, use +\f[B]s2u(x)\f[R] to convert. +.RE +.TP +\f[B]brorn(x, p, n)\f[R] +Does a right bitwise rotatation of the truncated absolute value of +\f[B]x\f[R], as though it has the same number of unsigned 8-bit bytes as +the truncated absolute value of \f[B]n\f[R], by the number of places +equal to the truncated absolute value of \f[B]p\f[R] modded by the +\f[B]2\f[R] to the power of the number of binary digits in \f[B]n\f[R] +8-bit bytes. +.RS +.PP +If you want to a use signed two\[cq]s complement argument, use +\f[B]s2u(x)\f[R] to convert. +.RE +.TP +\f[B]bror8(x, p)\f[R] +Does a right bitwise rotatation of the truncated absolute value of +\f[B]x\f[R], as though it has \f[B]8\f[R] binary digits (\f[B]1\f[R] +unsigned byte), by the number of places equal to the truncated absolute +value of \f[B]p\f[R] modded by \f[B]2\f[R] to the power of \f[B]8\f[R]. +.RS +.PP +If you want to a use signed two\[cq]s complement argument, use +\f[B]s2u(x)\f[R] to convert. +.RE +.TP +\f[B]bror16(x, p)\f[R] +Does a right bitwise rotatation of the truncated absolute value of +\f[B]x\f[R], as though it has \f[B]16\f[R] binary digits (\f[B]2\f[R] +unsigned bytes), by the number of places equal to the truncated absolute +value of \f[B]p\f[R] modded by \f[B]2\f[R] to the power of \f[B]16\f[R]. +.RS +.PP +If you want to a use signed two\[cq]s complement argument, use +\f[B]s2u(x)\f[R] to convert. +.RE +.TP +\f[B]bror32(x, p)\f[R] +Does a right bitwise rotatation of the truncated absolute value of +\f[B]x\f[R], as though it has \f[B]32\f[R] binary digits (\f[B]2\f[R] +unsigned bytes), by the number of places equal to the truncated absolute +value of \f[B]p\f[R] modded by \f[B]2\f[R] to the power of \f[B]32\f[R]. +.RS +.PP +If you want to a use signed two\[cq]s complement argument, use +\f[B]s2u(x)\f[R] to convert. +.RE +.TP +\f[B]bror64(x, p)\f[R] +Does a right bitwise rotatation of the truncated absolute value of +\f[B]x\f[R], as though it has \f[B]64\f[R] binary digits (\f[B]2\f[R] +unsigned bytes), by the number of places equal to the truncated absolute +value of \f[B]p\f[R] modded by \f[B]2\f[R] to the power of \f[B]64\f[R]. +.RS +.PP +If you want to a use signed two\[cq]s complement argument, use +\f[B]s2u(x)\f[R] to convert. +.RE +.TP +\f[B]bror(x, p)\f[R] +Does a right bitwise rotatation of the truncated absolute value of +\f[B]x\f[R], as though it has the minimum number of power of two +unsigned 8-bit bytes, by the number of places equal to the truncated +absolute value of \f[B]p\f[R] modded by 2 to the power of the number of +binary digits in the minimum number of 8-bit bytes. +.RS +.PP +If you want to a use signed two\[cq]s complement argument, use +\f[B]s2u(x)\f[R] to convert. +.RE +.TP +\f[B]bmodn(x, n)\f[R] +Returns the modulus of the truncated absolute value of \f[B]x\f[R] by +\f[B]2\f[R] to the power of the multiplication of the truncated absolute +value of \f[B]n\f[R] and \f[B]8\f[R]. +.RS +.PP +If you want to a use signed two\[cq]s complement argument, use +\f[B]s2u(x)\f[R] to convert. +.RE +.TP +\f[B]bmod8(x, n)\f[R] +Returns the modulus of the truncated absolute value of \f[B]x\f[R] by +\f[B]2\f[R] to the power of \f[B]8\f[R]. +.RS +.PP +If you want to a use signed two\[cq]s complement argument, use +\f[B]s2u(x)\f[R] to convert. +.RE +.TP +\f[B]bmod16(x, n)\f[R] +Returns the modulus of the truncated absolute value of \f[B]x\f[R] by +\f[B]2\f[R] to the power of \f[B]16\f[R]. +.RS +.PP +If you want to a use signed two\[cq]s complement argument, use +\f[B]s2u(x)\f[R] to convert. +.RE +.TP +\f[B]bmod32(x, n)\f[R] +Returns the modulus of the truncated absolute value of \f[B]x\f[R] by +\f[B]2\f[R] to the power of \f[B]32\f[R]. +.RS +.PP +If you want to a use signed two\[cq]s complement argument, use +\f[B]s2u(x)\f[R] to convert. +.RE +.TP +\f[B]bmod64(x, n)\f[R] +Returns the modulus of the truncated absolute value of \f[B]x\f[R] by +\f[B]2\f[R] to the power of \f[B]64\f[R]. +.RS +.PP +If you want to a use signed two\[cq]s complement argument, use +\f[B]s2u(x)\f[R] to convert. +.RE +.TP +\f[B]bunrev(t)\f[R] +Assumes \f[B]t\f[R] is a bitwise-reversed number with an extra set bit +one place more significant than the real most significant bit (which was +the least significant bit in the original number). +This number is reversed and returned without the extra set bit. +.RS +.PP +This function is used to implement other bitwise functions; it is not +meant to be used by users, but it can be. +.RE .TP \f[B]ubytes(x)\f[R] Returns the numbers of unsigned integer bytes required to hold the diff --git a/manuals/bc/A.1.md b/manuals/bc/A.1.md index 63dafbec..9ab4665e 100644 --- a/manuals/bc/A.1.md +++ b/manuals/bc/A.1.md @@ -1286,31 +1286,317 @@ The extended library is a **non-portable extension**. : Returns a random boolean value (either **0** or **1**). -**band()** +**band(a, b)** : Takes the truncated absolute value of both **a** and **b** and calculates and returns the result of the bitwise **and** operation between them. -**bor()** + If you want to use signed two's complement arguments, use **s2u(x)** to + convert. + +**bor(a, b)** : Takes the truncated absolute value of both **a** and **b** and calculates and returns the result of the bitwise **or** operation between them. -**bxor()** + If you want to use signed two's complement arguments, use **s2u(x)** to + convert. + +**bxor(a, b)** : Takes the truncated absolute value of both **a** and **b** and calculates and returns the result of the bitwise **xor** operation between them. -**blshift()** + If you want to use signed two's complement arguments, use **s2u(x)** to + convert. + +**bshl(a, b)** : Takes the truncated absolute value of both **a** and **b** and calculates and returns the result of **a** bit-shifted left by **b** places. -**brshift()** + If you want to use signed two's complement arguments, use **s2u(x)** to + convert. + +**bshr(a, b)** : Takes the truncated absolute value of both **a** and **b** and calculates and returns the truncated result of **a** bit-shifted right by **b** places. + If you want to use signed two's complement arguments, use **s2u(x)** to + convert. + +**bnotn(x, n)** + +: Takes the truncated absolute value of **x** and does a bitwise not as though + it has the same number of bytes as the truncated absolute value of **n**. + + If you want to a use signed two's complement argument, use **s2u(x)** to + convert. + +**bnot8(x)** + +: Does a bitwise not of the truncated absolute value of **x** as though it has + **8** binary digits (1 unsigned byte). + + If you want to a use signed two's complement argument, use **s2u(x)** to + convert. + +**bnot16(x)** + +: Does a bitwise not of the truncated absolute value of **x** as though it has + **16** binary digits (2 unsigned bytes). + + If you want to a use signed two's complement argument, use **s2u(x)** to + convert. + +**bnot32(x)** + +: Does a bitwise not of the truncated absolute value of **x** as though it has + **32** binary digits (4 unsigned bytes). + + If you want to a use signed two's complement argument, use **s2u(x)** to + convert. + +**bnot64(x)** + +: Does a bitwise not of the truncated absolute value of **x** as though it has + **64** binary digits (8 unsigned bytes). + + If you want to a use signed two's complement argument, use **s2u(x)** to + convert. + +**bnot(x)** + +: Does a bitwise not of the truncated absolute value of **x** as though it has + the minimum number of power of two unsigned bytes. + + If you want to a use signed two's complement argument, use **s2u(x)** to + convert. + +**brevn(x, n)** + +: Runs a bit reversal on the truncated absolute value of **x** as though it + has the same number of 8-bit bytes as the truncated absolute value of **n**. + + If you want to a use signed two's complement argument, use **s2u(x)** to + convert. + +**brev8(x)** + +: Runs a bit reversal on the truncated absolute value of **x** as though it + has 8 binary digits (1 unsigned byte). + + If you want to a use signed two's complement argument, use **s2u(x)** to + convert. + +**brev16(x)** + +: Runs a bit reversal on the truncated absolute value of **x** as though it + has 16 binary digits (2 unsigned bytes). + + If you want to a use signed two's complement argument, use **s2u(x)** to + convert. + +**brev32(x)** + +: Runs a bit reversal on the truncated absolute value of **x** as though it + has 32 binary digits (4 unsigned bytes). + + If you want to a use signed two's complement argument, use **s2u(x)** to + convert. + +**brev64(x)** + +: Runs a bit reversal on the truncated absolute value of **x** as though it + has 64 binary digits (8 unsigned bytes). + + If you want to a use signed two's complement argument, use **s2u(x)** to + convert. + +**brev(x)** + +: Runs a bit reversal on the truncated absolute value of **x** as though it + has the minimum number of power of two unsigned bytes. + + If you want to a use signed two's complement argument, use **s2u(x)** to + convert. + +**broln(x, p, n)** + +: Does a left bitwise rotatation of the truncated absolute value of **x**, as + though it has the same number of unsigned 8-bit bytes as the truncated + absolute value of **n**, by the number of places equal to the truncated + absolute value of **p** modded by the **2** to the power of the number of + binary digits in **n** 8-bit bytes. + + If you want to a use signed two's complement argument, use **s2u(x)** to + convert. + +**brol8(x, p)** + +: Does a left bitwise rotatation of the truncated absolute value of **x**, as + though it has **8** binary digits (**1** unsigned byte), by the number of + places equal to the truncated absolute value of **p** modded by **2** to the + power of **8**. + + If you want to a use signed two's complement argument, use **s2u(x)** to + convert. + +**brol16(x, p)** + +: Does a left bitwise rotatation of the truncated absolute value of **x**, as + though it has **16** binary digits (**2** unsigned bytes), by the number of + places equal to the truncated absolute value of **p** modded by **2** to the + power of **16**. + + If you want to a use signed two's complement argument, use **s2u(x)** to + convert. + +**brol32(x, p)** + +: Does a left bitwise rotatation of the truncated absolute value of **x**, as + though it has **32** binary digits (**2** unsigned bytes), by the number of + places equal to the truncated absolute value of **p** modded by **2** to the + power of **32**. + + If you want to a use signed two's complement argument, use **s2u(x)** to + convert. + +**brol64(x, p)** + +: Does a left bitwise rotatation of the truncated absolute value of **x**, as + though it has **64** binary digits (**2** unsigned bytes), by the number of + places equal to the truncated absolute value of **p** modded by **2** to the + power of **64**. + + If you want to a use signed two's complement argument, use **s2u(x)** to + convert. + +**brol(x, p)** + +: Does a left bitwise rotatation of the truncated absolute value of **x**, as + though it has the minimum number of power of two unsigned 8-bit bytes, by + the number of places equal to the truncated absolute value of **p** modded + by 2 to the power of the number of binary digits in the minimum number of + 8-bit bytes. + + If you want to a use signed two's complement argument, use **s2u(x)** to + convert. + +**brorn(x, p, n)** + +: Does a right bitwise rotatation of the truncated absolute value of **x**, as + though it has the same number of unsigned 8-bit bytes as the truncated + absolute value of **n**, by the number of places equal to the truncated + absolute value of **p** modded by the **2** to the power of the number of + binary digits in **n** 8-bit bytes. + + If you want to a use signed two's complement argument, use **s2u(x)** to + convert. + +**bror8(x, p)** + +: Does a right bitwise rotatation of the truncated absolute value of **x**, as + though it has **8** binary digits (**1** unsigned byte), by the number of + places equal to the truncated absolute value of **p** modded by **2** to the + power of **8**. + + If you want to a use signed two's complement argument, use **s2u(x)** to + convert. + +**bror16(x, p)** + +: Does a right bitwise rotatation of the truncated absolute value of **x**, as + though it has **16** binary digits (**2** unsigned bytes), by the number of + places equal to the truncated absolute value of **p** modded by **2** to the + power of **16**. + + If you want to a use signed two's complement argument, use **s2u(x)** to + convert. + +**bror32(x, p)** + +: Does a right bitwise rotatation of the truncated absolute value of **x**, as + though it has **32** binary digits (**2** unsigned bytes), by the number of + places equal to the truncated absolute value of **p** modded by **2** to the + power of **32**. + + If you want to a use signed two's complement argument, use **s2u(x)** to + convert. + +**bror64(x, p)** + +: Does a right bitwise rotatation of the truncated absolute value of **x**, as + though it has **64** binary digits (**2** unsigned bytes), by the number of + places equal to the truncated absolute value of **p** modded by **2** to the + power of **64**. + + If you want to a use signed two's complement argument, use **s2u(x)** to + convert. + +**bror(x, p)** + +: Does a right bitwise rotatation of the truncated absolute value of **x**, as + though it has the minimum number of power of two unsigned 8-bit bytes, by + the number of places equal to the truncated absolute value of **p** modded + by 2 to the power of the number of binary digits in the minimum number of + 8-bit bytes. + + If you want to a use signed two's complement argument, use **s2u(x)** to + convert. + +**bmodn(x, n)** + +: Returns the modulus of the truncated absolute value of **x** by **2** to the + power of the multiplication of the truncated absolute value of **n** and + **8**. + + If you want to a use signed two's complement argument, use **s2u(x)** to + convert. + +**bmod8(x, n)** + +: Returns the modulus of the truncated absolute value of **x** by **2** to the + power of **8**. + + If you want to a use signed two's complement argument, use **s2u(x)** to + convert. + +**bmod16(x, n)** + +: Returns the modulus of the truncated absolute value of **x** by **2** to the + power of **16**. + + If you want to a use signed two's complement argument, use **s2u(x)** to + convert. + +**bmod32(x, n)** + +: Returns the modulus of the truncated absolute value of **x** by **2** to the + power of **32**. + + If you want to a use signed two's complement argument, use **s2u(x)** to + convert. + +**bmod64(x, n)** + +: Returns the modulus of the truncated absolute value of **x** by **2** to the + power of **64**. + + If you want to a use signed two's complement argument, use **s2u(x)** to + convert. + +**bunrev(t)** + +: Assumes **t** is a bitwise-reversed number with an extra set bit one place + more significant than the real most significant bit (which was the least + significant bit in the original number). This number is reversed and + returned without the extra set bit. + + This function is used to implement other bitwise functions; it is not meant + to be used by users, but it can be. + **ubytes(x)** : Returns the numbers of unsigned integer bytes required to hold the truncated diff --git a/manuals/bc/H.1 b/manuals/bc/H.1 index 211f7c29..2fab932c 100644 --- a/manuals/bc/H.1 +++ b/manuals/bc/H.1 @@ -1582,30 +1582,360 @@ In other words, it randomizes the sign of \f[B]x\f[R]. \f[B]brand()\f[R] Returns a random boolean value (either \f[B]0\f[R] or \f[B]1\f[R]). .TP -\f[B]band()\f[R] +\f[B]band(a, b)\f[R] Takes the truncated absolute value of both \f[B]a\f[R] and \f[B]b\f[R] and calculates and returns the result of the bitwise \f[B]and\f[R] operation between them. +.RS +.PP +If you want to use signed two\[cq]s complement arguments, use +\f[B]s2u(x)\f[R] to convert. +.RE .TP -\f[B]bor()\f[R] +\f[B]bor(a, b)\f[R] Takes the truncated absolute value of both \f[B]a\f[R] and \f[B]b\f[R] and calculates and returns the result of the bitwise \f[B]or\f[R] operation between them. +.RS +.PP +If you want to use signed two\[cq]s complement arguments, use +\f[B]s2u(x)\f[R] to convert. +.RE .TP -\f[B]bxor()\f[R] +\f[B]bxor(a, b)\f[R] Takes the truncated absolute value of both \f[B]a\f[R] and \f[B]b\f[R] and calculates and returns the result of the bitwise \f[B]xor\f[R] operation between them. +.RS +.PP +If you want to use signed two\[cq]s complement arguments, use +\f[B]s2u(x)\f[R] to convert. +.RE .TP -\f[B]blshift()\f[R] +\f[B]bshl(a, b)\f[R] Takes the truncated absolute value of both \f[B]a\f[R] and \f[B]b\f[R] and calculates and returns the result of \f[B]a\f[R] bit-shifted left by \f[B]b\f[R] places. +.RS +.PP +If you want to use signed two\[cq]s complement arguments, use +\f[B]s2u(x)\f[R] to convert. +.RE .TP -\f[B]brshift()\f[R] +\f[B]bshr(a, b)\f[R] Takes the truncated absolute value of both \f[B]a\f[R] and \f[B]b\f[R] and calculates and returns the truncated result of \f[B]a\f[R] bit-shifted right by \f[B]b\f[R] places. +.RS +.PP +If you want to use signed two\[cq]s complement arguments, use +\f[B]s2u(x)\f[R] to convert. +.RE +.TP +\f[B]bnotn(x, n)\f[R] +Takes the truncated absolute value of \f[B]x\f[R] and does a bitwise not +as though it has the same number of bytes as the truncated absolute +value of \f[B]n\f[R]. +.RS +.PP +If you want to a use signed two\[cq]s complement argument, use +\f[B]s2u(x)\f[R] to convert. +.RE +.TP +\f[B]bnot8(x)\f[R] +Does a bitwise not of the truncated absolute value of \f[B]x\f[R] as +though it has \f[B]8\f[R] binary digits (1 unsigned byte). +.RS +.PP +If you want to a use signed two\[cq]s complement argument, use +\f[B]s2u(x)\f[R] to convert. +.RE +.TP +\f[B]bnot16(x)\f[R] +Does a bitwise not of the truncated absolute value of \f[B]x\f[R] as +though it has \f[B]16\f[R] binary digits (2 unsigned bytes). +.RS +.PP +If you want to a use signed two\[cq]s complement argument, use +\f[B]s2u(x)\f[R] to convert. +.RE +.TP +\f[B]bnot32(x)\f[R] +Does a bitwise not of the truncated absolute value of \f[B]x\f[R] as +though it has \f[B]32\f[R] binary digits (4 unsigned bytes). +.RS +.PP +If you want to a use signed two\[cq]s complement argument, use +\f[B]s2u(x)\f[R] to convert. +.RE +.TP +\f[B]bnot64(x)\f[R] +Does a bitwise not of the truncated absolute value of \f[B]x\f[R] as +though it has \f[B]64\f[R] binary digits (8 unsigned bytes). +.RS +.PP +If you want to a use signed two\[cq]s complement argument, use +\f[B]s2u(x)\f[R] to convert. +.RE +.TP +\f[B]bnot(x)\f[R] +Does a bitwise not of the truncated absolute value of \f[B]x\f[R] as +though it has the minimum number of power of two unsigned bytes. +.RS +.PP +If you want to a use signed two\[cq]s complement argument, use +\f[B]s2u(x)\f[R] to convert. +.RE +.TP +\f[B]brevn(x, n)\f[R] +Runs a bit reversal on the truncated absolute value of \f[B]x\f[R] as +though it has the same number of 8-bit bytes as the truncated absolute +value of \f[B]n\f[R]. +.RS +.PP +If you want to a use signed two\[cq]s complement argument, use +\f[B]s2u(x)\f[R] to convert. +.RE +.TP +\f[B]brev8(x)\f[R] +Runs a bit reversal on the truncated absolute value of \f[B]x\f[R] as +though it has 8 binary digits (1 unsigned byte). +.RS +.PP +If you want to a use signed two\[cq]s complement argument, use +\f[B]s2u(x)\f[R] to convert. +.RE +.TP +\f[B]brev16(x)\f[R] +Runs a bit reversal on the truncated absolute value of \f[B]x\f[R] as +though it has 16 binary digits (2 unsigned bytes). +.RS +.PP +If you want to a use signed two\[cq]s complement argument, use +\f[B]s2u(x)\f[R] to convert. +.RE +.TP +\f[B]brev32(x)\f[R] +Runs a bit reversal on the truncated absolute value of \f[B]x\f[R] as +though it has 32 binary digits (4 unsigned bytes). +.RS +.PP +If you want to a use signed two\[cq]s complement argument, use +\f[B]s2u(x)\f[R] to convert. +.RE +.TP +\f[B]brev64(x)\f[R] +Runs a bit reversal on the truncated absolute value of \f[B]x\f[R] as +though it has 64 binary digits (8 unsigned bytes). +.RS +.PP +If you want to a use signed two\[cq]s complement argument, use +\f[B]s2u(x)\f[R] to convert. +.RE +.TP +\f[B]brev(x)\f[R] +Runs a bit reversal on the truncated absolute value of \f[B]x\f[R] as +though it has the minimum number of power of two unsigned bytes. +.RS +.PP +If you want to a use signed two\[cq]s complement argument, use +\f[B]s2u(x)\f[R] to convert. +.RE +.TP +\f[B]broln(x, p, n)\f[R] +Does a left bitwise rotatation of the truncated absolute value of +\f[B]x\f[R], as though it has the same number of unsigned 8-bit bytes as +the truncated absolute value of \f[B]n\f[R], by the number of places +equal to the truncated absolute value of \f[B]p\f[R] modded by the +\f[B]2\f[R] to the power of the number of binary digits in \f[B]n\f[R] +8-bit bytes. +.RS +.PP +If you want to a use signed two\[cq]s complement argument, use +\f[B]s2u(x)\f[R] to convert. +.RE +.TP +\f[B]brol8(x, p)\f[R] +Does a left bitwise rotatation of the truncated absolute value of +\f[B]x\f[R], as though it has \f[B]8\f[R] binary digits (\f[B]1\f[R] +unsigned byte), by the number of places equal to the truncated absolute +value of \f[B]p\f[R] modded by \f[B]2\f[R] to the power of \f[B]8\f[R]. +.RS +.PP +If you want to a use signed two\[cq]s complement argument, use +\f[B]s2u(x)\f[R] to convert. +.RE +.TP +\f[B]brol16(x, p)\f[R] +Does a left bitwise rotatation of the truncated absolute value of +\f[B]x\f[R], as though it has \f[B]16\f[R] binary digits (\f[B]2\f[R] +unsigned bytes), by the number of places equal to the truncated absolute +value of \f[B]p\f[R] modded by \f[B]2\f[R] to the power of \f[B]16\f[R]. +.RS +.PP +If you want to a use signed two\[cq]s complement argument, use +\f[B]s2u(x)\f[R] to convert. +.RE +.TP +\f[B]brol32(x, p)\f[R] +Does a left bitwise rotatation of the truncated absolute value of +\f[B]x\f[R], as though it has \f[B]32\f[R] binary digits (\f[B]2\f[R] +unsigned bytes), by the number of places equal to the truncated absolute +value of \f[B]p\f[R] modded by \f[B]2\f[R] to the power of \f[B]32\f[R]. +.RS +.PP +If you want to a use signed two\[cq]s complement argument, use +\f[B]s2u(x)\f[R] to convert. +.RE +.TP +\f[B]brol64(x, p)\f[R] +Does a left bitwise rotatation of the truncated absolute value of +\f[B]x\f[R], as though it has \f[B]64\f[R] binary digits (\f[B]2\f[R] +unsigned bytes), by the number of places equal to the truncated absolute +value of \f[B]p\f[R] modded by \f[B]2\f[R] to the power of \f[B]64\f[R]. +.RS +.PP +If you want to a use signed two\[cq]s complement argument, use +\f[B]s2u(x)\f[R] to convert. +.RE +.TP +\f[B]brol(x, p)\f[R] +Does a left bitwise rotatation of the truncated absolute value of +\f[B]x\f[R], as though it has the minimum number of power of two +unsigned 8-bit bytes, by the number of places equal to the truncated +absolute value of \f[B]p\f[R] modded by 2 to the power of the number of +binary digits in the minimum number of 8-bit bytes. +.RS +.PP +If you want to a use signed two\[cq]s complement argument, use +\f[B]s2u(x)\f[R] to convert. +.RE +.TP +\f[B]brorn(x, p, n)\f[R] +Does a right bitwise rotatation of the truncated absolute value of +\f[B]x\f[R], as though it has the same number of unsigned 8-bit bytes as +the truncated absolute value of \f[B]n\f[R], by the number of places +equal to the truncated absolute value of \f[B]p\f[R] modded by the +\f[B]2\f[R] to the power of the number of binary digits in \f[B]n\f[R] +8-bit bytes. +.RS +.PP +If you want to a use signed two\[cq]s complement argument, use +\f[B]s2u(x)\f[R] to convert. +.RE +.TP +\f[B]bror8(x, p)\f[R] +Does a right bitwise rotatation of the truncated absolute value of +\f[B]x\f[R], as though it has \f[B]8\f[R] binary digits (\f[B]1\f[R] +unsigned byte), by the number of places equal to the truncated absolute +value of \f[B]p\f[R] modded by \f[B]2\f[R] to the power of \f[B]8\f[R]. +.RS +.PP +If you want to a use signed two\[cq]s complement argument, use +\f[B]s2u(x)\f[R] to convert. +.RE +.TP +\f[B]bror16(x, p)\f[R] +Does a right bitwise rotatation of the truncated absolute value of +\f[B]x\f[R], as though it has \f[B]16\f[R] binary digits (\f[B]2\f[R] +unsigned bytes), by the number of places equal to the truncated absolute +value of \f[B]p\f[R] modded by \f[B]2\f[R] to the power of \f[B]16\f[R]. +.RS +.PP +If you want to a use signed two\[cq]s complement argument, use +\f[B]s2u(x)\f[R] to convert. +.RE +.TP +\f[B]bror32(x, p)\f[R] +Does a right bitwise rotatation of the truncated absolute value of +\f[B]x\f[R], as though it has \f[B]32\f[R] binary digits (\f[B]2\f[R] +unsigned bytes), by the number of places equal to the truncated absolute +value of \f[B]p\f[R] modded by \f[B]2\f[R] to the power of \f[B]32\f[R]. +.RS +.PP +If you want to a use signed two\[cq]s complement argument, use +\f[B]s2u(x)\f[R] to convert. +.RE +.TP +\f[B]bror64(x, p)\f[R] +Does a right bitwise rotatation of the truncated absolute value of +\f[B]x\f[R], as though it has \f[B]64\f[R] binary digits (\f[B]2\f[R] +unsigned bytes), by the number of places equal to the truncated absolute +value of \f[B]p\f[R] modded by \f[B]2\f[R] to the power of \f[B]64\f[R]. +.RS +.PP +If you want to a use signed two\[cq]s complement argument, use +\f[B]s2u(x)\f[R] to convert. +.RE +.TP +\f[B]bror(x, p)\f[R] +Does a right bitwise rotatation of the truncated absolute value of +\f[B]x\f[R], as though it has the minimum number of power of two +unsigned 8-bit bytes, by the number of places equal to the truncated +absolute value of \f[B]p\f[R] modded by 2 to the power of the number of +binary digits in the minimum number of 8-bit bytes. +.RS +.PP +If you want to a use signed two\[cq]s complement argument, use +\f[B]s2u(x)\f[R] to convert. +.RE +.TP +\f[B]bmodn(x, n)\f[R] +Returns the modulus of the truncated absolute value of \f[B]x\f[R] by +\f[B]2\f[R] to the power of the multiplication of the truncated absolute +value of \f[B]n\f[R] and \f[B]8\f[R]. +.RS +.PP +If you want to a use signed two\[cq]s complement argument, use +\f[B]s2u(x)\f[R] to convert. +.RE +.TP +\f[B]bmod8(x, n)\f[R] +Returns the modulus of the truncated absolute value of \f[B]x\f[R] by +\f[B]2\f[R] to the power of \f[B]8\f[R]. +.RS +.PP +If you want to a use signed two\[cq]s complement argument, use +\f[B]s2u(x)\f[R] to convert. +.RE +.TP +\f[B]bmod16(x, n)\f[R] +Returns the modulus of the truncated absolute value of \f[B]x\f[R] by +\f[B]2\f[R] to the power of \f[B]16\f[R]. +.RS +.PP +If you want to a use signed two\[cq]s complement argument, use +\f[B]s2u(x)\f[R] to convert. +.RE +.TP +\f[B]bmod32(x, n)\f[R] +Returns the modulus of the truncated absolute value of \f[B]x\f[R] by +\f[B]2\f[R] to the power of \f[B]32\f[R]. +.RS +.PP +If you want to a use signed two\[cq]s complement argument, use +\f[B]s2u(x)\f[R] to convert. +.RE +.TP +\f[B]bmod64(x, n)\f[R] +Returns the modulus of the truncated absolute value of \f[B]x\f[R] by +\f[B]2\f[R] to the power of \f[B]64\f[R]. +.RS +.PP +If you want to a use signed two\[cq]s complement argument, use +\f[B]s2u(x)\f[R] to convert. +.RE +.TP +\f[B]bunrev(t)\f[R] +Assumes \f[B]t\f[R] is a bitwise-reversed number with an extra set bit +one place more significant than the real most significant bit (which was +the least significant bit in the original number). +This number is reversed and returned without the extra set bit. +.RS +.PP +This function is used to implement other bitwise functions; it is not +meant to be used by users, but it can be. +.RE .TP \f[B]ubytes(x)\f[R] Returns the numbers of unsigned integer bytes required to hold the diff --git a/manuals/bc/H.1.md b/manuals/bc/H.1.md index 889efa17..9a1cbbf5 100644 --- a/manuals/bc/H.1.md +++ b/manuals/bc/H.1.md @@ -1286,31 +1286,317 @@ The extended library is a **non-portable extension**. : Returns a random boolean value (either **0** or **1**). -**band()** +**band(a, b)** : Takes the truncated absolute value of both **a** and **b** and calculates and returns the result of the bitwise **and** operation between them. -**bor()** + If you want to use signed two's complement arguments, use **s2u(x)** to + convert. + +**bor(a, b)** : Takes the truncated absolute value of both **a** and **b** and calculates and returns the result of the bitwise **or** operation between them. -**bxor()** + If you want to use signed two's complement arguments, use **s2u(x)** to + convert. + +**bxor(a, b)** : Takes the truncated absolute value of both **a** and **b** and calculates and returns the result of the bitwise **xor** operation between them. -**blshift()** + If you want to use signed two's complement arguments, use **s2u(x)** to + convert. + +**bshl(a, b)** : Takes the truncated absolute value of both **a** and **b** and calculates and returns the result of **a** bit-shifted left by **b** places. -**brshift()** + If you want to use signed two's complement arguments, use **s2u(x)** to + convert. + +**bshr(a, b)** : Takes the truncated absolute value of both **a** and **b** and calculates and returns the truncated result of **a** bit-shifted right by **b** places. + If you want to use signed two's complement arguments, use **s2u(x)** to + convert. + +**bnotn(x, n)** + +: Takes the truncated absolute value of **x** and does a bitwise not as though + it has the same number of bytes as the truncated absolute value of **n**. + + If you want to a use signed two's complement argument, use **s2u(x)** to + convert. + +**bnot8(x)** + +: Does a bitwise not of the truncated absolute value of **x** as though it has + **8** binary digits (1 unsigned byte). + + If you want to a use signed two's complement argument, use **s2u(x)** to + convert. + +**bnot16(x)** + +: Does a bitwise not of the truncated absolute value of **x** as though it has + **16** binary digits (2 unsigned bytes). + + If you want to a use signed two's complement argument, use **s2u(x)** to + convert. + +**bnot32(x)** + +: Does a bitwise not of the truncated absolute value of **x** as though it has + **32** binary digits (4 unsigned bytes). + + If you want to a use signed two's complement argument, use **s2u(x)** to + convert. + +**bnot64(x)** + +: Does a bitwise not of the truncated absolute value of **x** as though it has + **64** binary digits (8 unsigned bytes). + + If you want to a use signed two's complement argument, use **s2u(x)** to + convert. + +**bnot(x)** + +: Does a bitwise not of the truncated absolute value of **x** as though it has + the minimum number of power of two unsigned bytes. + + If you want to a use signed two's complement argument, use **s2u(x)** to + convert. + +**brevn(x, n)** + +: Runs a bit reversal on the truncated absolute value of **x** as though it + has the same number of 8-bit bytes as the truncated absolute value of **n**. + + If you want to a use signed two's complement argument, use **s2u(x)** to + convert. + +**brev8(x)** + +: Runs a bit reversal on the truncated absolute value of **x** as though it + has 8 binary digits (1 unsigned byte). + + If you want to a use signed two's complement argument, use **s2u(x)** to + convert. + +**brev16(x)** + +: Runs a bit reversal on the truncated absolute value of **x** as though it + has 16 binary digits (2 unsigned bytes). + + If you want to a use signed two's complement argument, use **s2u(x)** to + convert. + +**brev32(x)** + +: Runs a bit reversal on the truncated absolute value of **x** as though it + has 32 binary digits (4 unsigned bytes). + + If you want to a use signed two's complement argument, use **s2u(x)** to + convert. + +**brev64(x)** + +: Runs a bit reversal on the truncated absolute value of **x** as though it + has 64 binary digits (8 unsigned bytes). + + If you want to a use signed two's complement argument, use **s2u(x)** to + convert. + +**brev(x)** + +: Runs a bit reversal on the truncated absolute value of **x** as though it + has the minimum number of power of two unsigned bytes. + + If you want to a use signed two's complement argument, use **s2u(x)** to + convert. + +**broln(x, p, n)** + +: Does a left bitwise rotatation of the truncated absolute value of **x**, as + though it has the same number of unsigned 8-bit bytes as the truncated + absolute value of **n**, by the number of places equal to the truncated + absolute value of **p** modded by the **2** to the power of the number of + binary digits in **n** 8-bit bytes. + + If you want to a use signed two's complement argument, use **s2u(x)** to + convert. + +**brol8(x, p)** + +: Does a left bitwise rotatation of the truncated absolute value of **x**, as + though it has **8** binary digits (**1** unsigned byte), by the number of + places equal to the truncated absolute value of **p** modded by **2** to the + power of **8**. + + If you want to a use signed two's complement argument, use **s2u(x)** to + convert. + +**brol16(x, p)** + +: Does a left bitwise rotatation of the truncated absolute value of **x**, as + though it has **16** binary digits (**2** unsigned bytes), by the number of + places equal to the truncated absolute value of **p** modded by **2** to the + power of **16**. + + If you want to a use signed two's complement argument, use **s2u(x)** to + convert. + +**brol32(x, p)** + +: Does a left bitwise rotatation of the truncated absolute value of **x**, as + though it has **32** binary digits (**2** unsigned bytes), by the number of + places equal to the truncated absolute value of **p** modded by **2** to the + power of **32**. + + If you want to a use signed two's complement argument, use **s2u(x)** to + convert. + +**brol64(x, p)** + +: Does a left bitwise rotatation of the truncated absolute value of **x**, as + though it has **64** binary digits (**2** unsigned bytes), by the number of + places equal to the truncated absolute value of **p** modded by **2** to the + power of **64**. + + If you want to a use signed two's complement argument, use **s2u(x)** to + convert. + +**brol(x, p)** + +: Does a left bitwise rotatation of the truncated absolute value of **x**, as + though it has the minimum number of power of two unsigned 8-bit bytes, by + the number of places equal to the truncated absolute value of **p** modded + by 2 to the power of the number of binary digits in the minimum number of + 8-bit bytes. + + If you want to a use signed two's complement argument, use **s2u(x)** to + convert. + +**brorn(x, p, n)** + +: Does a right bitwise rotatation of the truncated absolute value of **x**, as + though it has the same number of unsigned 8-bit bytes as the truncated + absolute value of **n**, by the number of places equal to the truncated + absolute value of **p** modded by the **2** to the power of the number of + binary digits in **n** 8-bit bytes. + + If you want to a use signed two's complement argument, use **s2u(x)** to + convert. + +**bror8(x, p)** + +: Does a right bitwise rotatation of the truncated absolute value of **x**, as + though it has **8** binary digits (**1** unsigned byte), by the number of + places equal to the truncated absolute value of **p** modded by **2** to the + power of **8**. + + If you want to a use signed two's complement argument, use **s2u(x)** to + convert. + +**bror16(x, p)** + +: Does a right bitwise rotatation of the truncated absolute value of **x**, as + though it has **16** binary digits (**2** unsigned bytes), by the number of + places equal to the truncated absolute value of **p** modded by **2** to the + power of **16**. + + If you want to a use signed two's complement argument, use **s2u(x)** to + convert. + +**bror32(x, p)** + +: Does a right bitwise rotatation of the truncated absolute value of **x**, as + though it has **32** binary digits (**2** unsigned bytes), by the number of + places equal to the truncated absolute value of **p** modded by **2** to the + power of **32**. + + If you want to a use signed two's complement argument, use **s2u(x)** to + convert. + +**bror64(x, p)** + +: Does a right bitwise rotatation of the truncated absolute value of **x**, as + though it has **64** binary digits (**2** unsigned bytes), by the number of + places equal to the truncated absolute value of **p** modded by **2** to the + power of **64**. + + If you want to a use signed two's complement argument, use **s2u(x)** to + convert. + +**bror(x, p)** + +: Does a right bitwise rotatation of the truncated absolute value of **x**, as + though it has the minimum number of power of two unsigned 8-bit bytes, by + the number of places equal to the truncated absolute value of **p** modded + by 2 to the power of the number of binary digits in the minimum number of + 8-bit bytes. + + If you want to a use signed two's complement argument, use **s2u(x)** to + convert. + +**bmodn(x, n)** + +: Returns the modulus of the truncated absolute value of **x** by **2** to the + power of the multiplication of the truncated absolute value of **n** and + **8**. + + If you want to a use signed two's complement argument, use **s2u(x)** to + convert. + +**bmod8(x, n)** + +: Returns the modulus of the truncated absolute value of **x** by **2** to the + power of **8**. + + If you want to a use signed two's complement argument, use **s2u(x)** to + convert. + +**bmod16(x, n)** + +: Returns the modulus of the truncated absolute value of **x** by **2** to the + power of **16**. + + If you want to a use signed two's complement argument, use **s2u(x)** to + convert. + +**bmod32(x, n)** + +: Returns the modulus of the truncated absolute value of **x** by **2** to the + power of **32**. + + If you want to a use signed two's complement argument, use **s2u(x)** to + convert. + +**bmod64(x, n)** + +: Returns the modulus of the truncated absolute value of **x** by **2** to the + power of **64**. + + If you want to a use signed two's complement argument, use **s2u(x)** to + convert. + +**bunrev(t)** + +: Assumes **t** is a bitwise-reversed number with an extra set bit one place + more significant than the real most significant bit (which was the least + significant bit in the original number). This number is reversed and + returned without the extra set bit. + + This function is used to implement other bitwise functions; it is not meant + to be used by users, but it can be. + **ubytes(x)** : Returns the numbers of unsigned integer bytes required to hold the truncated diff --git a/manuals/bc/HN.1 b/manuals/bc/HN.1 index b357f507..1ca11d9b 100644 --- a/manuals/bc/HN.1 +++ b/manuals/bc/HN.1 @@ -1582,30 +1582,360 @@ In other words, it randomizes the sign of \f[B]x\f[R]. \f[B]brand()\f[R] Returns a random boolean value (either \f[B]0\f[R] or \f[B]1\f[R]). .TP -\f[B]band()\f[R] +\f[B]band(a, b)\f[R] Takes the truncated absolute value of both \f[B]a\f[R] and \f[B]b\f[R] and calculates and returns the result of the bitwise \f[B]and\f[R] operation between them. +.RS +.PP +If you want to use signed two\[cq]s complement arguments, use +\f[B]s2u(x)\f[R] to convert. +.RE .TP -\f[B]bor()\f[R] +\f[B]bor(a, b)\f[R] Takes the truncated absolute value of both \f[B]a\f[R] and \f[B]b\f[R] and calculates and returns the result of the bitwise \f[B]or\f[R] operation between them. +.RS +.PP +If you want to use signed two\[cq]s complement arguments, use +\f[B]s2u(x)\f[R] to convert. +.RE .TP -\f[B]bxor()\f[R] +\f[B]bxor(a, b)\f[R] Takes the truncated absolute value of both \f[B]a\f[R] and \f[B]b\f[R] and calculates and returns the result of the bitwise \f[B]xor\f[R] operation between them. +.RS +.PP +If you want to use signed two\[cq]s complement arguments, use +\f[B]s2u(x)\f[R] to convert. +.RE .TP -\f[B]blshift()\f[R] +\f[B]bshl(a, b)\f[R] Takes the truncated absolute value of both \f[B]a\f[R] and \f[B]b\f[R] and calculates and returns the result of \f[B]a\f[R] bit-shifted left by \f[B]b\f[R] places. +.RS +.PP +If you want to use signed two\[cq]s complement arguments, use +\f[B]s2u(x)\f[R] to convert. +.RE .TP -\f[B]brshift()\f[R] +\f[B]bshr(a, b)\f[R] Takes the truncated absolute value of both \f[B]a\f[R] and \f[B]b\f[R] and calculates and returns the truncated result of \f[B]a\f[R] bit-shifted right by \f[B]b\f[R] places. +.RS +.PP +If you want to use signed two\[cq]s complement arguments, use +\f[B]s2u(x)\f[R] to convert. +.RE +.TP +\f[B]bnotn(x, n)\f[R] +Takes the truncated absolute value of \f[B]x\f[R] and does a bitwise not +as though it has the same number of bytes as the truncated absolute +value of \f[B]n\f[R]. +.RS +.PP +If you want to a use signed two\[cq]s complement argument, use +\f[B]s2u(x)\f[R] to convert. +.RE +.TP +\f[B]bnot8(x)\f[R] +Does a bitwise not of the truncated absolute value of \f[B]x\f[R] as +though it has \f[B]8\f[R] binary digits (1 unsigned byte). +.RS +.PP +If you want to a use signed two\[cq]s complement argument, use +\f[B]s2u(x)\f[R] to convert. +.RE +.TP +\f[B]bnot16(x)\f[R] +Does a bitwise not of the truncated absolute value of \f[B]x\f[R] as +though it has \f[B]16\f[R] binary digits (2 unsigned bytes). +.RS +.PP +If you want to a use signed two\[cq]s complement argument, use +\f[B]s2u(x)\f[R] to convert. +.RE +.TP +\f[B]bnot32(x)\f[R] +Does a bitwise not of the truncated absolute value of \f[B]x\f[R] as +though it has \f[B]32\f[R] binary digits (4 unsigned bytes). +.RS +.PP +If you want to a use signed two\[cq]s complement argument, use +\f[B]s2u(x)\f[R] to convert. +.RE +.TP +\f[B]bnot64(x)\f[R] +Does a bitwise not of the truncated absolute value of \f[B]x\f[R] as +though it has \f[B]64\f[R] binary digits (8 unsigned bytes). +.RS +.PP +If you want to a use signed two\[cq]s complement argument, use +\f[B]s2u(x)\f[R] to convert. +.RE +.TP +\f[B]bnot(x)\f[R] +Does a bitwise not of the truncated absolute value of \f[B]x\f[R] as +though it has the minimum number of power of two unsigned bytes. +.RS +.PP +If you want to a use signed two\[cq]s complement argument, use +\f[B]s2u(x)\f[R] to convert. +.RE +.TP +\f[B]brevn(x, n)\f[R] +Runs a bit reversal on the truncated absolute value of \f[B]x\f[R] as +though it has the same number of 8-bit bytes as the truncated absolute +value of \f[B]n\f[R]. +.RS +.PP +If you want to a use signed two\[cq]s complement argument, use +\f[B]s2u(x)\f[R] to convert. +.RE +.TP +\f[B]brev8(x)\f[R] +Runs a bit reversal on the truncated absolute value of \f[B]x\f[R] as +though it has 8 binary digits (1 unsigned byte). +.RS +.PP +If you want to a use signed two\[cq]s complement argument, use +\f[B]s2u(x)\f[R] to convert. +.RE +.TP +\f[B]brev16(x)\f[R] +Runs a bit reversal on the truncated absolute value of \f[B]x\f[R] as +though it has 16 binary digits (2 unsigned bytes). +.RS +.PP +If you want to a use signed two\[cq]s complement argument, use +\f[B]s2u(x)\f[R] to convert. +.RE +.TP +\f[B]brev32(x)\f[R] +Runs a bit reversal on the truncated absolute value of \f[B]x\f[R] as +though it has 32 binary digits (4 unsigned bytes). +.RS +.PP +If you want to a use signed two\[cq]s complement argument, use +\f[B]s2u(x)\f[R] to convert. +.RE +.TP +\f[B]brev64(x)\f[R] +Runs a bit reversal on the truncated absolute value of \f[B]x\f[R] as +though it has 64 binary digits (8 unsigned bytes). +.RS +.PP +If you want to a use signed two\[cq]s complement argument, use +\f[B]s2u(x)\f[R] to convert. +.RE +.TP +\f[B]brev(x)\f[R] +Runs a bit reversal on the truncated absolute value of \f[B]x\f[R] as +though it has the minimum number of power of two unsigned bytes. +.RS +.PP +If you want to a use signed two\[cq]s complement argument, use +\f[B]s2u(x)\f[R] to convert. +.RE +.TP +\f[B]broln(x, p, n)\f[R] +Does a left bitwise rotatation of the truncated absolute value of +\f[B]x\f[R], as though it has the same number of unsigned 8-bit bytes as +the truncated absolute value of \f[B]n\f[R], by the number of places +equal to the truncated absolute value of \f[B]p\f[R] modded by the +\f[B]2\f[R] to the power of the number of binary digits in \f[B]n\f[R] +8-bit bytes. +.RS +.PP +If you want to a use signed two\[cq]s complement argument, use +\f[B]s2u(x)\f[R] to convert. +.RE +.TP +\f[B]brol8(x, p)\f[R] +Does a left bitwise rotatation of the truncated absolute value of +\f[B]x\f[R], as though it has \f[B]8\f[R] binary digits (\f[B]1\f[R] +unsigned byte), by the number of places equal to the truncated absolute +value of \f[B]p\f[R] modded by \f[B]2\f[R] to the power of \f[B]8\f[R]. +.RS +.PP +If you want to a use signed two\[cq]s complement argument, use +\f[B]s2u(x)\f[R] to convert. +.RE +.TP +\f[B]brol16(x, p)\f[R] +Does a left bitwise rotatation of the truncated absolute value of +\f[B]x\f[R], as though it has \f[B]16\f[R] binary digits (\f[B]2\f[R] +unsigned bytes), by the number of places equal to the truncated absolute +value of \f[B]p\f[R] modded by \f[B]2\f[R] to the power of \f[B]16\f[R]. +.RS +.PP +If you want to a use signed two\[cq]s complement argument, use +\f[B]s2u(x)\f[R] to convert. +.RE +.TP +\f[B]brol32(x, p)\f[R] +Does a left bitwise rotatation of the truncated absolute value of +\f[B]x\f[R], as though it has \f[B]32\f[R] binary digits (\f[B]2\f[R] +unsigned bytes), by the number of places equal to the truncated absolute +value of \f[B]p\f[R] modded by \f[B]2\f[R] to the power of \f[B]32\f[R]. +.RS +.PP +If you want to a use signed two\[cq]s complement argument, use +\f[B]s2u(x)\f[R] to convert. +.RE +.TP +\f[B]brol64(x, p)\f[R] +Does a left bitwise rotatation of the truncated absolute value of +\f[B]x\f[R], as though it has \f[B]64\f[R] binary digits (\f[B]2\f[R] +unsigned bytes), by the number of places equal to the truncated absolute +value of \f[B]p\f[R] modded by \f[B]2\f[R] to the power of \f[B]64\f[R]. +.RS +.PP +If you want to a use signed two\[cq]s complement argument, use +\f[B]s2u(x)\f[R] to convert. +.RE +.TP +\f[B]brol(x, p)\f[R] +Does a left bitwise rotatation of the truncated absolute value of +\f[B]x\f[R], as though it has the minimum number of power of two +unsigned 8-bit bytes, by the number of places equal to the truncated +absolute value of \f[B]p\f[R] modded by 2 to the power of the number of +binary digits in the minimum number of 8-bit bytes. +.RS +.PP +If you want to a use signed two\[cq]s complement argument, use +\f[B]s2u(x)\f[R] to convert. +.RE +.TP +\f[B]brorn(x, p, n)\f[R] +Does a right bitwise rotatation of the truncated absolute value of +\f[B]x\f[R], as though it has the same number of unsigned 8-bit bytes as +the truncated absolute value of \f[B]n\f[R], by the number of places +equal to the truncated absolute value of \f[B]p\f[R] modded by the +\f[B]2\f[R] to the power of the number of binary digits in \f[B]n\f[R] +8-bit bytes. +.RS +.PP +If you want to a use signed two\[cq]s complement argument, use +\f[B]s2u(x)\f[R] to convert. +.RE +.TP +\f[B]bror8(x, p)\f[R] +Does a right bitwise rotatation of the truncated absolute value of +\f[B]x\f[R], as though it has \f[B]8\f[R] binary digits (\f[B]1\f[R] +unsigned byte), by the number of places equal to the truncated absolute +value of \f[B]p\f[R] modded by \f[B]2\f[R] to the power of \f[B]8\f[R]. +.RS +.PP +If you want to a use signed two\[cq]s complement argument, use +\f[B]s2u(x)\f[R] to convert. +.RE +.TP +\f[B]bror16(x, p)\f[R] +Does a right bitwise rotatation of the truncated absolute value of +\f[B]x\f[R], as though it has \f[B]16\f[R] binary digits (\f[B]2\f[R] +unsigned bytes), by the number of places equal to the truncated absolute +value of \f[B]p\f[R] modded by \f[B]2\f[R] to the power of \f[B]16\f[R]. +.RS +.PP +If you want to a use signed two\[cq]s complement argument, use +\f[B]s2u(x)\f[R] to convert. +.RE +.TP +\f[B]bror32(x, p)\f[R] +Does a right bitwise rotatation of the truncated absolute value of +\f[B]x\f[R], as though it has \f[B]32\f[R] binary digits (\f[B]2\f[R] +unsigned bytes), by the number of places equal to the truncated absolute +value of \f[B]p\f[R] modded by \f[B]2\f[R] to the power of \f[B]32\f[R]. +.RS +.PP +If you want to a use signed two\[cq]s complement argument, use +\f[B]s2u(x)\f[R] to convert. +.RE +.TP +\f[B]bror64(x, p)\f[R] +Does a right bitwise rotatation of the truncated absolute value of +\f[B]x\f[R], as though it has \f[B]64\f[R] binary digits (\f[B]2\f[R] +unsigned bytes), by the number of places equal to the truncated absolute +value of \f[B]p\f[R] modded by \f[B]2\f[R] to the power of \f[B]64\f[R]. +.RS +.PP +If you want to a use signed two\[cq]s complement argument, use +\f[B]s2u(x)\f[R] to convert. +.RE +.TP +\f[B]bror(x, p)\f[R] +Does a right bitwise rotatation of the truncated absolute value of +\f[B]x\f[R], as though it has the minimum number of power of two +unsigned 8-bit bytes, by the number of places equal to the truncated +absolute value of \f[B]p\f[R] modded by 2 to the power of the number of +binary digits in the minimum number of 8-bit bytes. +.RS +.PP +If you want to a use signed two\[cq]s complement argument, use +\f[B]s2u(x)\f[R] to convert. +.RE +.TP +\f[B]bmodn(x, n)\f[R] +Returns the modulus of the truncated absolute value of \f[B]x\f[R] by +\f[B]2\f[R] to the power of the multiplication of the truncated absolute +value of \f[B]n\f[R] and \f[B]8\f[R]. +.RS +.PP +If you want to a use signed two\[cq]s complement argument, use +\f[B]s2u(x)\f[R] to convert. +.RE +.TP +\f[B]bmod8(x, n)\f[R] +Returns the modulus of the truncated absolute value of \f[B]x\f[R] by +\f[B]2\f[R] to the power of \f[B]8\f[R]. +.RS +.PP +If you want to a use signed two\[cq]s complement argument, use +\f[B]s2u(x)\f[R] to convert. +.RE +.TP +\f[B]bmod16(x, n)\f[R] +Returns the modulus of the truncated absolute value of \f[B]x\f[R] by +\f[B]2\f[R] to the power of \f[B]16\f[R]. +.RS +.PP +If you want to a use signed two\[cq]s complement argument, use +\f[B]s2u(x)\f[R] to convert. +.RE +.TP +\f[B]bmod32(x, n)\f[R] +Returns the modulus of the truncated absolute value of \f[B]x\f[R] by +\f[B]2\f[R] to the power of \f[B]32\f[R]. +.RS +.PP +If you want to a use signed two\[cq]s complement argument, use +\f[B]s2u(x)\f[R] to convert. +.RE +.TP +\f[B]bmod64(x, n)\f[R] +Returns the modulus of the truncated absolute value of \f[B]x\f[R] by +\f[B]2\f[R] to the power of \f[B]64\f[R]. +.RS +.PP +If you want to a use signed two\[cq]s complement argument, use +\f[B]s2u(x)\f[R] to convert. +.RE +.TP +\f[B]bunrev(t)\f[R] +Assumes \f[B]t\f[R] is a bitwise-reversed number with an extra set bit +one place more significant than the real most significant bit (which was +the least significant bit in the original number). +This number is reversed and returned without the extra set bit. +.RS +.PP +This function is used to implement other bitwise functions; it is not +meant to be used by users, but it can be. +.RE .TP \f[B]ubytes(x)\f[R] Returns the numbers of unsigned integer bytes required to hold the diff --git a/manuals/bc/HN.1.md b/manuals/bc/HN.1.md index 9522c1db..d61d1512 100644 --- a/manuals/bc/HN.1.md +++ b/manuals/bc/HN.1.md @@ -1286,31 +1286,317 @@ The extended library is a **non-portable extension**. : Returns a random boolean value (either **0** or **1**). -**band()** +**band(a, b)** : Takes the truncated absolute value of both **a** and **b** and calculates and returns the result of the bitwise **and** operation between them. -**bor()** + If you want to use signed two's complement arguments, use **s2u(x)** to + convert. + +**bor(a, b)** : Takes the truncated absolute value of both **a** and **b** and calculates and returns the result of the bitwise **or** operation between them. -**bxor()** + If you want to use signed two's complement arguments, use **s2u(x)** to + convert. + +**bxor(a, b)** : Takes the truncated absolute value of both **a** and **b** and calculates and returns the result of the bitwise **xor** operation between them. -**blshift()** + If you want to use signed two's complement arguments, use **s2u(x)** to + convert. + +**bshl(a, b)** : Takes the truncated absolute value of both **a** and **b** and calculates and returns the result of **a** bit-shifted left by **b** places. -**brshift()** + If you want to use signed two's complement arguments, use **s2u(x)** to + convert. + +**bshr(a, b)** : Takes the truncated absolute value of both **a** and **b** and calculates and returns the truncated result of **a** bit-shifted right by **b** places. + If you want to use signed two's complement arguments, use **s2u(x)** to + convert. + +**bnotn(x, n)** + +: Takes the truncated absolute value of **x** and does a bitwise not as though + it has the same number of bytes as the truncated absolute value of **n**. + + If you want to a use signed two's complement argument, use **s2u(x)** to + convert. + +**bnot8(x)** + +: Does a bitwise not of the truncated absolute value of **x** as though it has + **8** binary digits (1 unsigned byte). + + If you want to a use signed two's complement argument, use **s2u(x)** to + convert. + +**bnot16(x)** + +: Does a bitwise not of the truncated absolute value of **x** as though it has + **16** binary digits (2 unsigned bytes). + + If you want to a use signed two's complement argument, use **s2u(x)** to + convert. + +**bnot32(x)** + +: Does a bitwise not of the truncated absolute value of **x** as though it has + **32** binary digits (4 unsigned bytes). + + If you want to a use signed two's complement argument, use **s2u(x)** to + convert. + +**bnot64(x)** + +: Does a bitwise not of the truncated absolute value of **x** as though it has + **64** binary digits (8 unsigned bytes). + + If you want to a use signed two's complement argument, use **s2u(x)** to + convert. + +**bnot(x)** + +: Does a bitwise not of the truncated absolute value of **x** as though it has + the minimum number of power of two unsigned bytes. + + If you want to a use signed two's complement argument, use **s2u(x)** to + convert. + +**brevn(x, n)** + +: Runs a bit reversal on the truncated absolute value of **x** as though it + has the same number of 8-bit bytes as the truncated absolute value of **n**. + + If you want to a use signed two's complement argument, use **s2u(x)** to + convert. + +**brev8(x)** + +: Runs a bit reversal on the truncated absolute value of **x** as though it + has 8 binary digits (1 unsigned byte). + + If you want to a use signed two's complement argument, use **s2u(x)** to + convert. + +**brev16(x)** + +: Runs a bit reversal on the truncated absolute value of **x** as though it + has 16 binary digits (2 unsigned bytes). + + If you want to a use signed two's complement argument, use **s2u(x)** to + convert. + +**brev32(x)** + +: Runs a bit reversal on the truncated absolute value of **x** as though it + has 32 binary digits (4 unsigned bytes). + + If you want to a use signed two's complement argument, use **s2u(x)** to + convert. + +**brev64(x)** + +: Runs a bit reversal on the truncated absolute value of **x** as though it + has 64 binary digits (8 unsigned bytes). + + If you want to a use signed two's complement argument, use **s2u(x)** to + convert. + +**brev(x)** + +: Runs a bit reversal on the truncated absolute value of **x** as though it + has the minimum number of power of two unsigned bytes. + + If you want to a use signed two's complement argument, use **s2u(x)** to + convert. + +**broln(x, p, n)** + +: Does a left bitwise rotatation of the truncated absolute value of **x**, as + though it has the same number of unsigned 8-bit bytes as the truncated + absolute value of **n**, by the number of places equal to the truncated + absolute value of **p** modded by the **2** to the power of the number of + binary digits in **n** 8-bit bytes. + + If you want to a use signed two's complement argument, use **s2u(x)** to + convert. + +**brol8(x, p)** + +: Does a left bitwise rotatation of the truncated absolute value of **x**, as + though it has **8** binary digits (**1** unsigned byte), by the number of + places equal to the truncated absolute value of **p** modded by **2** to the + power of **8**. + + If you want to a use signed two's complement argument, use **s2u(x)** to + convert. + +**brol16(x, p)** + +: Does a left bitwise rotatation of the truncated absolute value of **x**, as + though it has **16** binary digits (**2** unsigned bytes), by the number of + places equal to the truncated absolute value of **p** modded by **2** to the + power of **16**. + + If you want to a use signed two's complement argument, use **s2u(x)** to + convert. + +**brol32(x, p)** + +: Does a left bitwise rotatation of the truncated absolute value of **x**, as + though it has **32** binary digits (**2** unsigned bytes), by the number of + places equal to the truncated absolute value of **p** modded by **2** to the + power of **32**. + + If you want to a use signed two's complement argument, use **s2u(x)** to + convert. + +**brol64(x, p)** + +: Does a left bitwise rotatation of the truncated absolute value of **x**, as + though it has **64** binary digits (**2** unsigned bytes), by the number of + places equal to the truncated absolute value of **p** modded by **2** to the + power of **64**. + + If you want to a use signed two's complement argument, use **s2u(x)** to + convert. + +**brol(x, p)** + +: Does a left bitwise rotatation of the truncated absolute value of **x**, as + though it has the minimum number of power of two unsigned 8-bit bytes, by + the number of places equal to the truncated absolute value of **p** modded + by 2 to the power of the number of binary digits in the minimum number of + 8-bit bytes. + + If you want to a use signed two's complement argument, use **s2u(x)** to + convert. + +**brorn(x, p, n)** + +: Does a right bitwise rotatation of the truncated absolute value of **x**, as + though it has the same number of unsigned 8-bit bytes as the truncated + absolute value of **n**, by the number of places equal to the truncated + absolute value of **p** modded by the **2** to the power of the number of + binary digits in **n** 8-bit bytes. + + If you want to a use signed two's complement argument, use **s2u(x)** to + convert. + +**bror8(x, p)** + +: Does a right bitwise rotatation of the truncated absolute value of **x**, as + though it has **8** binary digits (**1** unsigned byte), by the number of + places equal to the truncated absolute value of **p** modded by **2** to the + power of **8**. + + If you want to a use signed two's complement argument, use **s2u(x)** to + convert. + +**bror16(x, p)** + +: Does a right bitwise rotatation of the truncated absolute value of **x**, as + though it has **16** binary digits (**2** unsigned bytes), by the number of + places equal to the truncated absolute value of **p** modded by **2** to the + power of **16**. + + If you want to a use signed two's complement argument, use **s2u(x)** to + convert. + +**bror32(x, p)** + +: Does a right bitwise rotatation of the truncated absolute value of **x**, as + though it has **32** binary digits (**2** unsigned bytes), by the number of + places equal to the truncated absolute value of **p** modded by **2** to the + power of **32**. + + If you want to a use signed two's complement argument, use **s2u(x)** to + convert. + +**bror64(x, p)** + +: Does a right bitwise rotatation of the truncated absolute value of **x**, as + though it has **64** binary digits (**2** unsigned bytes), by the number of + places equal to the truncated absolute value of **p** modded by **2** to the + power of **64**. + + If you want to a use signed two's complement argument, use **s2u(x)** to + convert. + +**bror(x, p)** + +: Does a right bitwise rotatation of the truncated absolute value of **x**, as + though it has the minimum number of power of two unsigned 8-bit bytes, by + the number of places equal to the truncated absolute value of **p** modded + by 2 to the power of the number of binary digits in the minimum number of + 8-bit bytes. + + If you want to a use signed two's complement argument, use **s2u(x)** to + convert. + +**bmodn(x, n)** + +: Returns the modulus of the truncated absolute value of **x** by **2** to the + power of the multiplication of the truncated absolute value of **n** and + **8**. + + If you want to a use signed two's complement argument, use **s2u(x)** to + convert. + +**bmod8(x, n)** + +: Returns the modulus of the truncated absolute value of **x** by **2** to the + power of **8**. + + If you want to a use signed two's complement argument, use **s2u(x)** to + convert. + +**bmod16(x, n)** + +: Returns the modulus of the truncated absolute value of **x** by **2** to the + power of **16**. + + If you want to a use signed two's complement argument, use **s2u(x)** to + convert. + +**bmod32(x, n)** + +: Returns the modulus of the truncated absolute value of **x** by **2** to the + power of **32**. + + If you want to a use signed two's complement argument, use **s2u(x)** to + convert. + +**bmod64(x, n)** + +: Returns the modulus of the truncated absolute value of **x** by **2** to the + power of **64**. + + If you want to a use signed two's complement argument, use **s2u(x)** to + convert. + +**bunrev(t)** + +: Assumes **t** is a bitwise-reversed number with an extra set bit one place + more significant than the real most significant bit (which was the least + significant bit in the original number). This number is reversed and + returned without the extra set bit. + + This function is used to implement other bitwise functions; it is not meant + to be used by users, but it can be. + **ubytes(x)** : Returns the numbers of unsigned integer bytes required to hold the truncated diff --git a/manuals/bc/N.1 b/manuals/bc/N.1 index c2741920..f5dc39a2 100644 --- a/manuals/bc/N.1 +++ b/manuals/bc/N.1 @@ -1582,30 +1582,360 @@ In other words, it randomizes the sign of \f[B]x\f[R]. \f[B]brand()\f[R] Returns a random boolean value (either \f[B]0\f[R] or \f[B]1\f[R]). .TP -\f[B]band()\f[R] +\f[B]band(a, b)\f[R] Takes the truncated absolute value of both \f[B]a\f[R] and \f[B]b\f[R] and calculates and returns the result of the bitwise \f[B]and\f[R] operation between them. +.RS +.PP +If you want to use signed two\[cq]s complement arguments, use +\f[B]s2u(x)\f[R] to convert. +.RE .TP -\f[B]bor()\f[R] +\f[B]bor(a, b)\f[R] Takes the truncated absolute value of both \f[B]a\f[R] and \f[B]b\f[R] and calculates and returns the result of the bitwise \f[B]or\f[R] operation between them. +.RS +.PP +If you want to use signed two\[cq]s complement arguments, use +\f[B]s2u(x)\f[R] to convert. +.RE .TP -\f[B]bxor()\f[R] +\f[B]bxor(a, b)\f[R] Takes the truncated absolute value of both \f[B]a\f[R] and \f[B]b\f[R] and calculates and returns the result of the bitwise \f[B]xor\f[R] operation between them. +.RS +.PP +If you want to use signed two\[cq]s complement arguments, use +\f[B]s2u(x)\f[R] to convert. +.RE .TP -\f[B]blshift()\f[R] +\f[B]bshl(a, b)\f[R] Takes the truncated absolute value of both \f[B]a\f[R] and \f[B]b\f[R] and calculates and returns the result of \f[B]a\f[R] bit-shifted left by \f[B]b\f[R] places. +.RS +.PP +If you want to use signed two\[cq]s complement arguments, use +\f[B]s2u(x)\f[R] to convert. +.RE .TP -\f[B]brshift()\f[R] +\f[B]bshr(a, b)\f[R] Takes the truncated absolute value of both \f[B]a\f[R] and \f[B]b\f[R] and calculates and returns the truncated result of \f[B]a\f[R] bit-shifted right by \f[B]b\f[R] places. +.RS +.PP +If you want to use signed two\[cq]s complement arguments, use +\f[B]s2u(x)\f[R] to convert. +.RE +.TP +\f[B]bnotn(x, n)\f[R] +Takes the truncated absolute value of \f[B]x\f[R] and does a bitwise not +as though it has the same number of bytes as the truncated absolute +value of \f[B]n\f[R]. +.RS +.PP +If you want to a use signed two\[cq]s complement argument, use +\f[B]s2u(x)\f[R] to convert. +.RE +.TP +\f[B]bnot8(x)\f[R] +Does a bitwise not of the truncated absolute value of \f[B]x\f[R] as +though it has \f[B]8\f[R] binary digits (1 unsigned byte). +.RS +.PP +If you want to a use signed two\[cq]s complement argument, use +\f[B]s2u(x)\f[R] to convert. +.RE +.TP +\f[B]bnot16(x)\f[R] +Does a bitwise not of the truncated absolute value of \f[B]x\f[R] as +though it has \f[B]16\f[R] binary digits (2 unsigned bytes). +.RS +.PP +If you want to a use signed two\[cq]s complement argument, use +\f[B]s2u(x)\f[R] to convert. +.RE +.TP +\f[B]bnot32(x)\f[R] +Does a bitwise not of the truncated absolute value of \f[B]x\f[R] as +though it has \f[B]32\f[R] binary digits (4 unsigned bytes). +.RS +.PP +If you want to a use signed two\[cq]s complement argument, use +\f[B]s2u(x)\f[R] to convert. +.RE +.TP +\f[B]bnot64(x)\f[R] +Does a bitwise not of the truncated absolute value of \f[B]x\f[R] as +though it has \f[B]64\f[R] binary digits (8 unsigned bytes). +.RS +.PP +If you want to a use signed two\[cq]s complement argument, use +\f[B]s2u(x)\f[R] to convert. +.RE +.TP +\f[B]bnot(x)\f[R] +Does a bitwise not of the truncated absolute value of \f[B]x\f[R] as +though it has the minimum number of power of two unsigned bytes. +.RS +.PP +If you want to a use signed two\[cq]s complement argument, use +\f[B]s2u(x)\f[R] to convert. +.RE +.TP +\f[B]brevn(x, n)\f[R] +Runs a bit reversal on the truncated absolute value of \f[B]x\f[R] as +though it has the same number of 8-bit bytes as the truncated absolute +value of \f[B]n\f[R]. +.RS +.PP +If you want to a use signed two\[cq]s complement argument, use +\f[B]s2u(x)\f[R] to convert. +.RE +.TP +\f[B]brev8(x)\f[R] +Runs a bit reversal on the truncated absolute value of \f[B]x\f[R] as +though it has 8 binary digits (1 unsigned byte). +.RS +.PP +If you want to a use signed two\[cq]s complement argument, use +\f[B]s2u(x)\f[R] to convert. +.RE +.TP +\f[B]brev16(x)\f[R] +Runs a bit reversal on the truncated absolute value of \f[B]x\f[R] as +though it has 16 binary digits (2 unsigned bytes). +.RS +.PP +If you want to a use signed two\[cq]s complement argument, use +\f[B]s2u(x)\f[R] to convert. +.RE +.TP +\f[B]brev32(x)\f[R] +Runs a bit reversal on the truncated absolute value of \f[B]x\f[R] as +though it has 32 binary digits (4 unsigned bytes). +.RS +.PP +If you want to a use signed two\[cq]s complement argument, use +\f[B]s2u(x)\f[R] to convert. +.RE +.TP +\f[B]brev64(x)\f[R] +Runs a bit reversal on the truncated absolute value of \f[B]x\f[R] as +though it has 64 binary digits (8 unsigned bytes). +.RS +.PP +If you want to a use signed two\[cq]s complement argument, use +\f[B]s2u(x)\f[R] to convert. +.RE +.TP +\f[B]brev(x)\f[R] +Runs a bit reversal on the truncated absolute value of \f[B]x\f[R] as +though it has the minimum number of power of two unsigned bytes. +.RS +.PP +If you want to a use signed two\[cq]s complement argument, use +\f[B]s2u(x)\f[R] to convert. +.RE +.TP +\f[B]broln(x, p, n)\f[R] +Does a left bitwise rotatation of the truncated absolute value of +\f[B]x\f[R], as though it has the same number of unsigned 8-bit bytes as +the truncated absolute value of \f[B]n\f[R], by the number of places +equal to the truncated absolute value of \f[B]p\f[R] modded by the +\f[B]2\f[R] to the power of the number of binary digits in \f[B]n\f[R] +8-bit bytes. +.RS +.PP +If you want to a use signed two\[cq]s complement argument, use +\f[B]s2u(x)\f[R] to convert. +.RE +.TP +\f[B]brol8(x, p)\f[R] +Does a left bitwise rotatation of the truncated absolute value of +\f[B]x\f[R], as though it has \f[B]8\f[R] binary digits (\f[B]1\f[R] +unsigned byte), by the number of places equal to the truncated absolute +value of \f[B]p\f[R] modded by \f[B]2\f[R] to the power of \f[B]8\f[R]. +.RS +.PP +If you want to a use signed two\[cq]s complement argument, use +\f[B]s2u(x)\f[R] to convert. +.RE +.TP +\f[B]brol16(x, p)\f[R] +Does a left bitwise rotatation of the truncated absolute value of +\f[B]x\f[R], as though it has \f[B]16\f[R] binary digits (\f[B]2\f[R] +unsigned bytes), by the number of places equal to the truncated absolute +value of \f[B]p\f[R] modded by \f[B]2\f[R] to the power of \f[B]16\f[R]. +.RS +.PP +If you want to a use signed two\[cq]s complement argument, use +\f[B]s2u(x)\f[R] to convert. +.RE +.TP +\f[B]brol32(x, p)\f[R] +Does a left bitwise rotatation of the truncated absolute value of +\f[B]x\f[R], as though it has \f[B]32\f[R] binary digits (\f[B]2\f[R] +unsigned bytes), by the number of places equal to the truncated absolute +value of \f[B]p\f[R] modded by \f[B]2\f[R] to the power of \f[B]32\f[R]. +.RS +.PP +If you want to a use signed two\[cq]s complement argument, use +\f[B]s2u(x)\f[R] to convert. +.RE +.TP +\f[B]brol64(x, p)\f[R] +Does a left bitwise rotatation of the truncated absolute value of +\f[B]x\f[R], as though it has \f[B]64\f[R] binary digits (\f[B]2\f[R] +unsigned bytes), by the number of places equal to the truncated absolute +value of \f[B]p\f[R] modded by \f[B]2\f[R] to the power of \f[B]64\f[R]. +.RS +.PP +If you want to a use signed two\[cq]s complement argument, use +\f[B]s2u(x)\f[R] to convert. +.RE +.TP +\f[B]brol(x, p)\f[R] +Does a left bitwise rotatation of the truncated absolute value of +\f[B]x\f[R], as though it has the minimum number of power of two +unsigned 8-bit bytes, by the number of places equal to the truncated +absolute value of \f[B]p\f[R] modded by 2 to the power of the number of +binary digits in the minimum number of 8-bit bytes. +.RS +.PP +If you want to a use signed two\[cq]s complement argument, use +\f[B]s2u(x)\f[R] to convert. +.RE +.TP +\f[B]brorn(x, p, n)\f[R] +Does a right bitwise rotatation of the truncated absolute value of +\f[B]x\f[R], as though it has the same number of unsigned 8-bit bytes as +the truncated absolute value of \f[B]n\f[R], by the number of places +equal to the truncated absolute value of \f[B]p\f[R] modded by the +\f[B]2\f[R] to the power of the number of binary digits in \f[B]n\f[R] +8-bit bytes. +.RS +.PP +If you want to a use signed two\[cq]s complement argument, use +\f[B]s2u(x)\f[R] to convert. +.RE +.TP +\f[B]bror8(x, p)\f[R] +Does a right bitwise rotatation of the truncated absolute value of +\f[B]x\f[R], as though it has \f[B]8\f[R] binary digits (\f[B]1\f[R] +unsigned byte), by the number of places equal to the truncated absolute +value of \f[B]p\f[R] modded by \f[B]2\f[R] to the power of \f[B]8\f[R]. +.RS +.PP +If you want to a use signed two\[cq]s complement argument, use +\f[B]s2u(x)\f[R] to convert. +.RE +.TP +\f[B]bror16(x, p)\f[R] +Does a right bitwise rotatation of the truncated absolute value of +\f[B]x\f[R], as though it has \f[B]16\f[R] binary digits (\f[B]2\f[R] +unsigned bytes), by the number of places equal to the truncated absolute +value of \f[B]p\f[R] modded by \f[B]2\f[R] to the power of \f[B]16\f[R]. +.RS +.PP +If you want to a use signed two\[cq]s complement argument, use +\f[B]s2u(x)\f[R] to convert. +.RE +.TP +\f[B]bror32(x, p)\f[R] +Does a right bitwise rotatation of the truncated absolute value of +\f[B]x\f[R], as though it has \f[B]32\f[R] binary digits (\f[B]2\f[R] +unsigned bytes), by the number of places equal to the truncated absolute +value of \f[B]p\f[R] modded by \f[B]2\f[R] to the power of \f[B]32\f[R]. +.RS +.PP +If you want to a use signed two\[cq]s complement argument, use +\f[B]s2u(x)\f[R] to convert. +.RE +.TP +\f[B]bror64(x, p)\f[R] +Does a right bitwise rotatation of the truncated absolute value of +\f[B]x\f[R], as though it has \f[B]64\f[R] binary digits (\f[B]2\f[R] +unsigned bytes), by the number of places equal to the truncated absolute +value of \f[B]p\f[R] modded by \f[B]2\f[R] to the power of \f[B]64\f[R]. +.RS +.PP +If you want to a use signed two\[cq]s complement argument, use +\f[B]s2u(x)\f[R] to convert. +.RE +.TP +\f[B]bror(x, p)\f[R] +Does a right bitwise rotatation of the truncated absolute value of +\f[B]x\f[R], as though it has the minimum number of power of two +unsigned 8-bit bytes, by the number of places equal to the truncated +absolute value of \f[B]p\f[R] modded by 2 to the power of the number of +binary digits in the minimum number of 8-bit bytes. +.RS +.PP +If you want to a use signed two\[cq]s complement argument, use +\f[B]s2u(x)\f[R] to convert. +.RE +.TP +\f[B]bmodn(x, n)\f[R] +Returns the modulus of the truncated absolute value of \f[B]x\f[R] by +\f[B]2\f[R] to the power of the multiplication of the truncated absolute +value of \f[B]n\f[R] and \f[B]8\f[R]. +.RS +.PP +If you want to a use signed two\[cq]s complement argument, use +\f[B]s2u(x)\f[R] to convert. +.RE +.TP +\f[B]bmod8(x, n)\f[R] +Returns the modulus of the truncated absolute value of \f[B]x\f[R] by +\f[B]2\f[R] to the power of \f[B]8\f[R]. +.RS +.PP +If you want to a use signed two\[cq]s complement argument, use +\f[B]s2u(x)\f[R] to convert. +.RE +.TP +\f[B]bmod16(x, n)\f[R] +Returns the modulus of the truncated absolute value of \f[B]x\f[R] by +\f[B]2\f[R] to the power of \f[B]16\f[R]. +.RS +.PP +If you want to a use signed two\[cq]s complement argument, use +\f[B]s2u(x)\f[R] to convert. +.RE +.TP +\f[B]bmod32(x, n)\f[R] +Returns the modulus of the truncated absolute value of \f[B]x\f[R] by +\f[B]2\f[R] to the power of \f[B]32\f[R]. +.RS +.PP +If you want to a use signed two\[cq]s complement argument, use +\f[B]s2u(x)\f[R] to convert. +.RE +.TP +\f[B]bmod64(x, n)\f[R] +Returns the modulus of the truncated absolute value of \f[B]x\f[R] by +\f[B]2\f[R] to the power of \f[B]64\f[R]. +.RS +.PP +If you want to a use signed two\[cq]s complement argument, use +\f[B]s2u(x)\f[R] to convert. +.RE +.TP +\f[B]bunrev(t)\f[R] +Assumes \f[B]t\f[R] is a bitwise-reversed number with an extra set bit +one place more significant than the real most significant bit (which was +the least significant bit in the original number). +This number is reversed and returned without the extra set bit. +.RS +.PP +This function is used to implement other bitwise functions; it is not +meant to be used by users, but it can be. +.RE .TP \f[B]ubytes(x)\f[R] Returns the numbers of unsigned integer bytes required to hold the diff --git a/manuals/bc/N.1.md b/manuals/bc/N.1.md index a059278f..6867a05d 100644 --- a/manuals/bc/N.1.md +++ b/manuals/bc/N.1.md @@ -1286,31 +1286,317 @@ The extended library is a **non-portable extension**. : Returns a random boolean value (either **0** or **1**). -**band()** +**band(a, b)** : Takes the truncated absolute value of both **a** and **b** and calculates and returns the result of the bitwise **and** operation between them. -**bor()** + If you want to use signed two's complement arguments, use **s2u(x)** to + convert. + +**bor(a, b)** : Takes the truncated absolute value of both **a** and **b** and calculates and returns the result of the bitwise **or** operation between them. -**bxor()** + If you want to use signed two's complement arguments, use **s2u(x)** to + convert. + +**bxor(a, b)** : Takes the truncated absolute value of both **a** and **b** and calculates and returns the result of the bitwise **xor** operation between them. -**blshift()** + If you want to use signed two's complement arguments, use **s2u(x)** to + convert. + +**bshl(a, b)** : Takes the truncated absolute value of both **a** and **b** and calculates and returns the result of **a** bit-shifted left by **b** places. -**brshift()** + If you want to use signed two's complement arguments, use **s2u(x)** to + convert. + +**bshr(a, b)** : Takes the truncated absolute value of both **a** and **b** and calculates and returns the truncated result of **a** bit-shifted right by **b** places. + If you want to use signed two's complement arguments, use **s2u(x)** to + convert. + +**bnotn(x, n)** + +: Takes the truncated absolute value of **x** and does a bitwise not as though + it has the same number of bytes as the truncated absolute value of **n**. + + If you want to a use signed two's complement argument, use **s2u(x)** to + convert. + +**bnot8(x)** + +: Does a bitwise not of the truncated absolute value of **x** as though it has + **8** binary digits (1 unsigned byte). + + If you want to a use signed two's complement argument, use **s2u(x)** to + convert. + +**bnot16(x)** + +: Does a bitwise not of the truncated absolute value of **x** as though it has + **16** binary digits (2 unsigned bytes). + + If you want to a use signed two's complement argument, use **s2u(x)** to + convert. + +**bnot32(x)** + +: Does a bitwise not of the truncated absolute value of **x** as though it has + **32** binary digits (4 unsigned bytes). + + If you want to a use signed two's complement argument, use **s2u(x)** to + convert. + +**bnot64(x)** + +: Does a bitwise not of the truncated absolute value of **x** as though it has + **64** binary digits (8 unsigned bytes). + + If you want to a use signed two's complement argument, use **s2u(x)** to + convert. + +**bnot(x)** + +: Does a bitwise not of the truncated absolute value of **x** as though it has + the minimum number of power of two unsigned bytes. + + If you want to a use signed two's complement argument, use **s2u(x)** to + convert. + +**brevn(x, n)** + +: Runs a bit reversal on the truncated absolute value of **x** as though it + has the same number of 8-bit bytes as the truncated absolute value of **n**. + + If you want to a use signed two's complement argument, use **s2u(x)** to + convert. + +**brev8(x)** + +: Runs a bit reversal on the truncated absolute value of **x** as though it + has 8 binary digits (1 unsigned byte). + + If you want to a use signed two's complement argument, use **s2u(x)** to + convert. + +**brev16(x)** + +: Runs a bit reversal on the truncated absolute value of **x** as though it + has 16 binary digits (2 unsigned bytes). + + If you want to a use signed two's complement argument, use **s2u(x)** to + convert. + +**brev32(x)** + +: Runs a bit reversal on the truncated absolute value of **x** as though it + has 32 binary digits (4 unsigned bytes). + + If you want to a use signed two's complement argument, use **s2u(x)** to + convert. + +**brev64(x)** + +: Runs a bit reversal on the truncated absolute value of **x** as though it + has 64 binary digits (8 unsigned bytes). + + If you want to a use signed two's complement argument, use **s2u(x)** to + convert. + +**brev(x)** + +: Runs a bit reversal on the truncated absolute value of **x** as though it + has the minimum number of power of two unsigned bytes. + + If you want to a use signed two's complement argument, use **s2u(x)** to + convert. + +**broln(x, p, n)** + +: Does a left bitwise rotatation of the truncated absolute value of **x**, as + though it has the same number of unsigned 8-bit bytes as the truncated + absolute value of **n**, by the number of places equal to the truncated + absolute value of **p** modded by the **2** to the power of the number of + binary digits in **n** 8-bit bytes. + + If you want to a use signed two's complement argument, use **s2u(x)** to + convert. + +**brol8(x, p)** + +: Does a left bitwise rotatation of the truncated absolute value of **x**, as + though it has **8** binary digits (**1** unsigned byte), by the number of + places equal to the truncated absolute value of **p** modded by **2** to the + power of **8**. + + If you want to a use signed two's complement argument, use **s2u(x)** to + convert. + +**brol16(x, p)** + +: Does a left bitwise rotatation of the truncated absolute value of **x**, as + though it has **16** binary digits (**2** unsigned bytes), by the number of + places equal to the truncated absolute value of **p** modded by **2** to the + power of **16**. + + If you want to a use signed two's complement argument, use **s2u(x)** to + convert. + +**brol32(x, p)** + +: Does a left bitwise rotatation of the truncated absolute value of **x**, as + though it has **32** binary digits (**2** unsigned bytes), by the number of + places equal to the truncated absolute value of **p** modded by **2** to the + power of **32**. + + If you want to a use signed two's complement argument, use **s2u(x)** to + convert. + +**brol64(x, p)** + +: Does a left bitwise rotatation of the truncated absolute value of **x**, as + though it has **64** binary digits (**2** unsigned bytes), by the number of + places equal to the truncated absolute value of **p** modded by **2** to the + power of **64**. + + If you want to a use signed two's complement argument, use **s2u(x)** to + convert. + +**brol(x, p)** + +: Does a left bitwise rotatation of the truncated absolute value of **x**, as + though it has the minimum number of power of two unsigned 8-bit bytes, by + the number of places equal to the truncated absolute value of **p** modded + by 2 to the power of the number of binary digits in the minimum number of + 8-bit bytes. + + If you want to a use signed two's complement argument, use **s2u(x)** to + convert. + +**brorn(x, p, n)** + +: Does a right bitwise rotatation of the truncated absolute value of **x**, as + though it has the same number of unsigned 8-bit bytes as the truncated + absolute value of **n**, by the number of places equal to the truncated + absolute value of **p** modded by the **2** to the power of the number of + binary digits in **n** 8-bit bytes. + + If you want to a use signed two's complement argument, use **s2u(x)** to + convert. + +**bror8(x, p)** + +: Does a right bitwise rotatation of the truncated absolute value of **x**, as + though it has **8** binary digits (**1** unsigned byte), by the number of + places equal to the truncated absolute value of **p** modded by **2** to the + power of **8**. + + If you want to a use signed two's complement argument, use **s2u(x)** to + convert. + +**bror16(x, p)** + +: Does a right bitwise rotatation of the truncated absolute value of **x**, as + though it has **16** binary digits (**2** unsigned bytes), by the number of + places equal to the truncated absolute value of **p** modded by **2** to the + power of **16**. + + If you want to a use signed two's complement argument, use **s2u(x)** to + convert. + +**bror32(x, p)** + +: Does a right bitwise rotatation of the truncated absolute value of **x**, as + though it has **32** binary digits (**2** unsigned bytes), by the number of + places equal to the truncated absolute value of **p** modded by **2** to the + power of **32**. + + If you want to a use signed two's complement argument, use **s2u(x)** to + convert. + +**bror64(x, p)** + +: Does a right bitwise rotatation of the truncated absolute value of **x**, as + though it has **64** binary digits (**2** unsigned bytes), by the number of + places equal to the truncated absolute value of **p** modded by **2** to the + power of **64**. + + If you want to a use signed two's complement argument, use **s2u(x)** to + convert. + +**bror(x, p)** + +: Does a right bitwise rotatation of the truncated absolute value of **x**, as + though it has the minimum number of power of two unsigned 8-bit bytes, by + the number of places equal to the truncated absolute value of **p** modded + by 2 to the power of the number of binary digits in the minimum number of + 8-bit bytes. + + If you want to a use signed two's complement argument, use **s2u(x)** to + convert. + +**bmodn(x, n)** + +: Returns the modulus of the truncated absolute value of **x** by **2** to the + power of the multiplication of the truncated absolute value of **n** and + **8**. + + If you want to a use signed two's complement argument, use **s2u(x)** to + convert. + +**bmod8(x, n)** + +: Returns the modulus of the truncated absolute value of **x** by **2** to the + power of **8**. + + If you want to a use signed two's complement argument, use **s2u(x)** to + convert. + +**bmod16(x, n)** + +: Returns the modulus of the truncated absolute value of **x** by **2** to the + power of **16**. + + If you want to a use signed two's complement argument, use **s2u(x)** to + convert. + +**bmod32(x, n)** + +: Returns the modulus of the truncated absolute value of **x** by **2** to the + power of **32**. + + If you want to a use signed two's complement argument, use **s2u(x)** to + convert. + +**bmod64(x, n)** + +: Returns the modulus of the truncated absolute value of **x** by **2** to the + power of **64**. + + If you want to a use signed two's complement argument, use **s2u(x)** to + convert. + +**bunrev(t)** + +: Assumes **t** is a bitwise-reversed number with an extra set bit one place + more significant than the real most significant bit (which was the least + significant bit in the original number). This number is reversed and + returned without the extra set bit. + + This function is used to implement other bitwise functions; it is not meant + to be used by users, but it can be. + **ubytes(x)** : Returns the numbers of unsigned integer bytes required to hold the truncated -- cgit v1.2.3