The compiler already knows everything needed about the ALU. All the programmer needs is to understand how to talk to the compiler. ![]()
Looking at your conditional expression - (int*byte) will produce an int result. If the result doesn't fit into an int, then you can use a (long) cast to tell the compiler to expect a long-sized result.
unsignedLong - int could become dicey if the result is negative because your intention is ambiguous. Perhaps the unsignedLong should just be a long? ... Or should the int be an unsigned?
The missing vocabulary word (not very intuitive!) is "promotion". ![]()