-#define BIGINT_WORD_SIZE 8
-
-#define BIGINT_FBS_MASK (BIGINT_WORD_SIZE-1) /* the last five bits indicate which is the first bit set */
+#elif BIGINT_WORD_SIZE == 16
+typedef uint16_t bigint_word_t;
+typedef uint32_t bigint_wordplus_t;
+typedef int32_t bigint_wordplus_signed_t;
+#elif BIGINT_WORD_SIZE == 32
+typedef uint32_t bigint_word_t;
+typedef uint64_t bigint_wordplus_t;
+typedef int64_t bigint_wordplus_signed_t;
+#else
+#error "INVALID VALUE FOR BIGINT_WORD_SIZE"
+#endif
+
+
+#define BIGINT_FBS_MASK (BIGINT_WORD_SIZE - 1) /* the last five bits indicate which is the first bit set */