taniarascia/comments

bits-bytes-bases-and-a-hex-dump-javascript/

Opened this issue · 3 comments

Understanding Bits, Bytes, and Numerical Bases | Tania Rascia

I was recently tasked with creating a simple command line program that would take an input of a file of unknown contents and print a hex…

https://www.taniarascia.com/bits-bytes-bases-and-a-hex-dump-javascript/

Great article! I was reading it all in the hope of getting some information about doing simple adding on hexadecimal values in a mutable Buffer without converting them to a decimal number.

I've tried to use bitwise XOR buffer[0] ^= 3 but it only seem to work on 1. Probably I'm accessing the Buffer wrong.

Any chance of getting an update on that? Please :)

“Since we want lines of 16 bytes, we can loop through every 16 and slice them into blocks.”

Why do we want lines of 16 bytes? Why not less or more?

That's just the way the hex dump is formatted by default.