+/*----- Bitwise operations ------------------------------------------------*/
+
+/* --- How to implement them --- *
+ *
+ * x: 0011
+ * y: 0101
+ */
+
+#define MPX_B0000(x, y) (0u)
+#define MPX_B0001(x, y) ((x) & (y))
+#define MPX_B0010(x, y) ((x) & ~(y))
+#define MPX_B0011(x, y) (x)
+#define MPX_B0100(x, y) (~(x) & ~(y))
+#define MPX_B0101(x, y) (y)
+#define MPX_B0110(x, y) ((x) ^ (y))
+#define MPX_B0111(x, y) ((x) | (y))
+#define MPX_B1000(x, y) (~((x) | (y)))
+#define MPX_B1001(x, y) (~((x) ^ (y)))
+#define MPX_B1010(x, y) (~(y))
+#define MPX_B1011(x, y) ((x) | ~(y))
+#define MPX_B1100(x, y) (~(x))
+#define MPX_B1101(x, y) (~(x) | (y))
+#define MPX_B1110(x, y) (~((x) & (y)))
+#define MPX_B1111(x, y) (~0u)
+
+/* --- @mpx_bitop@ --- *
+ *
+ * Arguments: @mpw *dv, *dvl@ = destination vector
+ * @const mpw *av, *avl@ = first source vector
+ * @const mpw *bv, *bvl@ = second source vector
+ *
+ * Returns: ---
+ *
+ * Use: Provide the dyadic boolean functions. The functions are
+ * named after the truth table they generate:
+ *
+ * a: 0011
+ * b: 0101
+ * @mpx_bitXXXX@
+ */
+
+#define MPX_DOBIN(what) \
+ what(0000) what(0001) what(0010) what(0011) \
+ what(0100) what(0101) what(0110) what(0111) \
+ what(1000) what(1001) what(1010) what(1011) \
+ what(1100) what(1101) what(1110) what(1111)
+
+#define MPX_BITDECL(string) \
+ extern void mpx_bit##string(mpw */*dv*/, mpw */*dvl*/, \
+ const mpw */*av*/, const mpw */*avl*/, \
+ const mpw */*bv*/, const mpw */*bvl*/);
+MPX_DOBIN(MPX_BITDECL)
+
+/* --- @mpx_[n]and@, @mpx_[n]or@, @mpx_xor@ --- *
+ *
+ * Synonyms for the commonly-used functions above.
+ */
+
+#define mpx_and mpx_bit0001
+#define mpx_or mpx_bit0111
+#define mpx_nand mpx_bit1110
+#define mpx_nor mpx_bit1000
+#define mpx_xor mpx_bit0110
+
+/* --- @mpx_not@ --- *
+ *
+ * Arguments: @mpw *dv, *dvl@ = destination vector
+ * @const mpw *av, *avl@ = first source vector
+ *
+ * Returns: ---
+ *
+ * Use; Bitwise NOT.
+ */
+
+extern void mpx_not(mpw */*dv*/, mpw */*dvl*/,
+ const mpw */*av*/, const mpw */*avl*/);
+