 
Summary: BINARY INTEGERS
A binary integer x is a finite sequence of the digits 0
and 1, which we write symbolically as
x = (amam1 · · · a2a1a0)2
where I insert the parentheses with subscript ()2 in
order to make clear that the number is binary. The
above has the decimal equivalent
x = am2m + am12m1 + · · · + a121 + a0
For example, the binary integer x = (110101)2 has
the decimal value
x = 25 + 24 + 22 + 20 = 53
The binary integer x = (111 · · · 1)2 with m ones has
the decimal value
x = 2m1 + · · · + 21 + 1 = 2m  1
DECIMAL TO BINARY INTEGER CONVERSION
Given a decimal integer x we write
x = (amam1 · · · a2a1a0)2
= am2m + am12m1 + · · · + a121 + a0
Divide x by 2, calling the quotient x1. The remainder
is a0, and
