CS26-reading-notes

CS 26 Reading Notes #

Ch. 1 Number Representations #

Theorem 1
Let b be an integer greater than 1. Then if n is a positive integer, n can be expressed uniquely in the form

\(n=a_k ·b^k +a_{k−1} ·b^{k−1} +···+a_1 ·b^1 +a_0 ·b^0 \)

where \(k\) is a nonnegative integer, \(a0, a1, · · · , ak\) are nonnegative integers less than \(b\) and \(ak ≠ 0\) .


The real utility and power of two’s complement is that one can add pairs of two’s complement numbers (whether positive or negative) in the usual way, and the result will be the correct answer, in two’s complement! In the following examples, superscripts in the binary addition represent carries.