(1)先看Oracle 11g官方文档:
http://docs.oracle.com/cd/B28359_01/server.111/b28286/functions013.htm
(2)看图:
(3)从Oracle 9i开始,提供函数bin_to_num()进行二进制到十进制的转换;
select bin_to_num(1,1,0,1) num1,bin_to_num(1,0) num2 from dual;
NUM1 NUM2
------ ----------
13 2
select bin_to_num(1,1,1,0,1) num from dual;
NUM
------
29