diff --git a/chantal-sockets b/chantal-sockets new file mode 100644 index 0000000..9a66051 --- /dev/null +++ b/chantal-sockets @@ -0,0 +1,9 @@ +def binary_to_decimal(binary_array) + raise NotImplementedError + decimal = 0 + + binary_array.reverse.each_with_index do |num, i| + decimal += (num * 2 ** i) + end + return decimal +end