3 ms·
Complex, no way! All I can do is simple arithmetic. Addition and subtraction are straightforward, multiplication is ok, division is hard but I can do it for sma
by marssaxman 15y ago
Complex, no way! All I can do is simple arithmetic. Addition and subtraction are straightforward, multiplication is ok, division is hard but I can do it for small numbers. Shifting left or right is of course easy, just as multiplication or division by powers of 10 would be with decimal numbers.
I don't remember specifically deciding to learn to do arithmetic in hex. I started coding about 25 years ago and hex was just part of the way things worked back in those low-level days. I suppose the arithmetic operations developed as a consequence of learning to convert back and forth between hex and decimal and learning to do bitwise operations.