Skip to content

Commit

Permalink
Merge pull request #35 from maybellineboon/patch-1
Browse files Browse the repository at this point in the history
update decoder.js .decoder__bucket--decimal and .decoder__value--decimal
  • Loading branch information
kevinkiklee authored Sep 15, 2023
2 parents b1041b5 + e696d09 commit 4c8469e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sites/home/decoder/decoder.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ const ZEROES_FOR_PADDING = '00000000';

function renderOutput({ bucketInBinary, valueInBinary }) {
document.querySelector('.decoder__bucket--binary').innerHTML = bucketInBinary;
document.querySelector('.decoder__bucket--decimal').innerHTML = BigInt(parseInt(bucketInBinary, 2));
document.querySelector('.decoder__bucket--decimal').innerHTML = BigInt(`0b${bucketInBinary}`);
document.querySelector('.decoder__value--binary').innerHTML = valueInBinary;
document.querySelector('.decoder__value--decimal').innerHTML = BigInt(parseInt(valueInBinary, 2));
document.querySelector('.decoder__value--decimal').innerHTML = BigInt(`0b${valueInBinary}`);
}

// Converts the number to a binary string
Expand Down

0 comments on commit 4c8469e

Please sign in to comment.