随笔分类 -  深入理解计算机系统

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. 阅读全文
posted @ 2013-01-17 16:16 winko 阅读(223) 评论(0) 推荐(0)
摘要: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. 阅读全文
posted @ 2013-01-16 16:36 winko 阅读(339) 评论(0) 推荐(0)
摘要:Both C and C++ support signed(the default) and unsigned numbers, and Java support only signed numbers. 阅读全文
posted @ 2013-01-15 15:46 winko 阅读(503) 评论(0) 推荐(0)