You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Example is in oos_util_totp.to_binary Changes to be made:
Expand the varchar2 from 8 to something much larger
Change the input from number to pls_integer since we're not handling decimals
How to handle negative numbers? leading bit?
function to_binary(p_num number) return varchar2
is
l_szbin varchar2(8);
l_nrem number := p_num;
begin
if p_num = 0 then
return '0';
end if;
while l_nrem > 0 loop
l_szbin := mod(l_nrem, 2) || l_szbin;
l_nrem := trunc(l_nrem / 2 );
end loop;
return l_szbin;
end to_binary;
The text was updated successfully, but these errors were encountered:
Example is in
oos_util_totp.to_binary
Changes to be made:8
to something much largernumber
topls_integer
since we're not handling decimalsThe text was updated successfully, but these errors were encountered: