From b9c6491c7969973e9ed53adf5e625efae6b3b029 Mon Sep 17 00:00:00 2001 From: Chaitanya Raj Date: Sun, 23 Aug 2020 15:49:51 +0530 Subject: [PATCH] Update BinaryToDecimal.js --- Conversions/BinaryToDecimal.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Conversions/BinaryToDecimal.js b/Conversions/BinaryToDecimal.js index ff70a6b6c2..9074684702 100644 --- a/Conversions/BinaryToDecimal.js +++ b/Conversions/BinaryToDecimal.js @@ -1,6 +1,6 @@ function binaryToDeicmal (binaryNumber) { let decimalNumber = 0 - const binaryDigits = binaryNumber.split('').reverse() // Splits the bnary number in revered single digits + const binaryDigits = binaryNumber.split('').reverse() // Splits the binary number into reversed single digits binaryDigits.forEach((binaryDigit, index) => { decimalNumber += binaryDigit * (Math.pow(2, index)) // Summation of all the decimal converted digits }) pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy