but that’s a bit… yeah…
I know some of you are computers and can just convert 53 to 110101, but I’m not and prefer simple things like the metric system
I’m not sure that’s more readable. It is less key strokes though.
Also, be careful if you do go the route of binEnc(). I would look at binEnc(1,0,0) and think 4, but it’s actually computed as 1, so that could add confusion
The whole point is to make it easy to see exactly what inputs you’re looking for though, hex is just a number and won’t identify bits that are on without calculation. It would be the exact same as using decimal
The relationship between base 2 and base 16 for 8 bits bytes being what it is, it’s not exactly the same as decimal. Hex to binary mental conversion is relatively simple, though I agree it’s less ‘graphic’ than having the bits displayed directly.
That being said, you could maybe use hex/decimal and put the binary representation in a comment on the same line: