summaryrefslogtreecommitdiff
path: root/progs/a665.py
diff options
context:
space:
mode:
Diffstat (limited to 'progs/a665.py')
-rw-r--r--progs/a665.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/progs/a665.py b/progs/a665.py
new file mode 100644
index 0000000..0a0047e
--- /dev/null
+++ b/progs/a665.py
@@ -0,0 +1,9 @@
+def set_Bit_Number(n):
+ if (n == 0):
+ return 0;
+ msb = 0;
+ n = int(n / 2);
+ while (n > 0):
+ n = int(n / 2);
+ msb += 1;
+ return (1 << msb) \ No newline at end of file