From 51227d70c4ace78615bb13ee8d40dc2600e042a0 Mon Sep 17 00:00:00 2001
From: Vipin Thomas <vipin.thomas@stud.th-deg.de>
Date: Wed, 16 Jun 2021 22:11:54 +0000
Subject: [PATCH] Update pixel.cpp

---
 pixel.cpp | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/pixel.cpp b/pixel.cpp
index bbafce1..07197bb 100644
--- a/pixel.cpp
+++ b/pixel.cpp
@@ -78,4 +78,13 @@ long long toAscii(int c) {
     return bin;
 }
 
-
+int convertBinInt(long long n) {
+    int dec = 0, i = 0, rem;
+    while (n != 0) {
+        rem = n % 10;
+        n /= 10;
+        dec += rem * pow(2, i);
+        ++i;
+    }
+    return dec;
+}
-- 
GitLab