PL/SQL Bin_To_Num

Oracle PL/SQL Bin_To_Num Function

The Bin_To_Num function converts a bit vector to a number.

The Bin_To_Num Function syntax:

bin_to_num( exp1, exp2, … exp_n)

Example:

select bin_to_num(1) from dual;
would return 1


select bin_to_num(1,0) from dual;
would return 2


select bin_to_num(1,1) from dual;
would return 3


select bin_to_num(1,1,1,0) from dual;
would return 14


select bin_to_num(1,1,1,1) from dual;
would return 15