随笔分类 - 深入理解计算机系统
Computer Systems: a Programer's Perspective
摘要:Dividing by a power of 2 can be performed using a right shift operation.
The two different shifts-logical and arithmetic-serve the shift operation for unsigned and two's-complement numbers, respectively.
阅读全文
摘要:Adding two positive integers can yield a negative result, and the comparation xy can yield a different result with the comparation x-y0. This properties are caused by the finite nature of computer arithmetic.
阅读全文
摘要:Both C and C++ support signed(the default) and unsigned numbers, and Java support only signed numbers.
阅读全文

浙公网安备 33010602011771号