# GETBIT Returns the bit value at _offset_ in the string value stored at _key_. When _offset_ is beyond the string length, the string is assumed to be a contiguous space with 0 bits. When _key_ does not exist it is assumed to be an empty string, so _offset_ is always out of range and the value is also assumed to be a contiguous space with 0 bits. ## Examples SETBIT mykey 7 1 GETBIT mykey 0 GETBIT mykey 7 GETBIT mykey 100 ## Return information {{< multitabs id="getbit-return-info" tab1="RESP2" tab2="RESP3" >}} The bit value stored at _offset_, one of the following: * [Integer reply](../../develop/reference/protocol-spec#integers): `0`. * [Integer reply](../../develop/reference/protocol-spec#integers): `1`. -tab-sep- The bit value stored at _offset_, one of the following: * [Integer reply](../../develop/reference/protocol-spec#integers): `0`. * [Integer reply](../../develop/reference/protocol-spec#integers): `1`.