4 ms·
Why not just write it in hexadecimal?
by rvirding 11y ago
Why not just write it in hexadecimal?
- vvanders 11y agoSome things like are better done in binary, it's very common some languages like VHDL and Verilog.
- krupan 11y agoSometimes you are dealing with fields that are packed into a 32-bit (or 8- or 16- or 64-bit) word where one field is bits 0 through 5 and another field is bits 6 through 9 and a status bit in bit 10 and another field is bits 11 through 31. Thinking about those in hex is much harder than if they were all nice multiples of 4 bits in size. Yes, C programmers have been dealing with this for decades (no binary literals in C), but wouldn't it be nice to write each of those fields in binary (with underscores separating them) and let the machine do the rest?