Created
May 23, 2018 21:38
-
-
Save jackphilippi/05155c7243fba881bf1e9ce8ba5b9207 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let byte = 0; | |
let shift = 0; | |
[0, 1, 1, 1, 1, 0, 0, 1] | |
.map((bit) => { | |
byte = byte | bit << (7 - shift); | |
}); | |
console.log(`The input byte evaluates to ${byte}`); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment