summaryrefslogtreecommitdiff
path: root/comm/deg_to_byte.py
diff options
context:
space:
mode:
Diffstat (limited to 'comm/deg_to_byte.py')
-rw-r--r--comm/deg_to_byte.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/comm/deg_to_byte.py b/comm/deg_to_byte.py
new file mode 100644
index 0000000..196d4a5
--- /dev/null
+++ b/comm/deg_to_byte.py
@@ -0,0 +1,5 @@
+deg = 40
+sbinary = format(deg, 'b')
+print(sbinary)
+binary = "".join(("01", sbinary))
+print(binary) \ No newline at end of file