BIN_TO_NUM

BIN_TO_NUM converts a binary number x to a NUMBER.


SQL> select bin_to_num(1) from dual;

BIN_TO_NUM(1)
-------------
            1

SQL> select bin_to_num(1,0) from dual;

BIN_TO_NUM(1,0)
---------------
              2

SQL> select bin_to_num(1,1) from dual;

BIN_TO_NUM(1,1)
---------------
              3

SQL> select bin_to_num(1,1,1,0) from dual;

BIN_TO_NUM(1,1,1,0)
-------------------
                 14

SQL> select bin_to_num(1,1,1,1) from dual;

BIN_TO_NUM(1,1,1,1)
-------------------
                 15

SQL>
Home »
Oracle »
Conversion Functions » 

Related: