mirror of
https://github.com/nippur72/apple1-videocard-lib.git
synced 2025-01-22 03:30:06 +00:00
12 lines
231 B
JavaScript
12 lines
231 B
JavaScript
function bytesToBits(data) {
|
|
let bits = [];
|
|
data.forEach(byte => {
|
|
for(let t=7;t>=0;t--) {
|
|
let bit = (byte >> t) & 1;
|
|
bits.push(bit);
|
|
}
|
|
});
|
|
return bits;
|
|
}
|
|
|
|
module.exports = { bytesToBits }; |