Syntax\n------\n\nBIT[(M)]\n\nDescription\n-----------\n\nA bit-field type. M indicates the number of bits per value, from 1 to64. The default is 1 if M is omitted.\n\nBit values can be inserted with b'value' notation, where value is the bit value in 0's and 1's.\n\nBit fields are automatically zero-padded from the left to the full length of the bit, so for example in a BIT(4) field, '10' is equivalent to '0010'.\n\nBits are returned as binary, so to display them, either add 0, or use a function such as HEX, OCT or BIN to convert them.\n\nExamples\n--------\n\nCREATE TABLE bit_example (\n  description VARCHAR(20),\n  b1 BIT,\n  b4 BIT(4),\n  b16 BIT(16)\n);\n\nURL: https://mariadb.com/docs/server/reference/data-types/numeric-data-types/bit