PostgreSQL/Data Type/Bit Shift
Shifting bit strings
<source lang="sql">
postgres=# -- Shifting bit strings postgres=# postgres=# SELECT b"1000" >> 2 AS "8 shifted right", 8 >> 2 AS likewise;
8 shifted right | likewise
+----------
0010 | 2
(1 row) postgres=# postgres=#
</source>