Giant brains; or, Machines that thinkBerkeley, Edmund Callis
Science
Giant brains; or, Machines that think
Berkeley, Edmund Callis
Computers -- Popular works
One of the easiest ways to subtract in binary notation is to add a
_ones complement_ (that is, the analogue of the nines complement)
and use end-around-carry (for these two terms, see the end of this
supplement). A ones complement can be written down at sight by just
putting 1 for 0 and 0 for 1. For example, suppose that we subtract 101
from 1110:
SUBTRACTION BY
DIRECT ADDING ONES
SUBTRACTION CHECK COMPLEMENT
1110 14 1110
- 101 -5 + 1010
————— ———— ——————
1001 9 (1)1000
↓
⎯→ 1
——————
1001
Multiplication in the binary notation is simple. It amounts to (1)
adding if the multiplier digit is 1 and not adding if the multiplier
digit is 0, and (2) moving over or shifting. For example, let us
multiply 111 by 101:
BINARY MULTIPLICATION CHECK
111 7
× 101 × 5
——————
111
111
—————— ———
100011 35
The digit 1 in the 6th (or _n_th) _binary_ place from the right in
100011 stands for 1 times 2 to the 5th (or _n_-1 th) power, 2 × 2 × 2
× 2 × 2 = 32. The result 100011 is translated into 32 plus 2 plus 1,
which equals 35 and verifies.
Division in the binary notation is also simple. It amounts to (1)
subtracting (yielding a quotient digit 1) or not subtracting (yielding
a quotient digit 0), and (2) shifting. We never need to try multiples
of the divisor to find the largest that can be subtracted yet leave a
positive remainder. For example, let us divide 1010 (10 in decimal)
into 10001110 (142 in decimal):
1110 (14 in decimal)
——————————
1010)10001110
1010
——————
1111
1010
—————
1011
1010
—————
10 (remainder, 2 in decimal)
In decimal notation, digits to the right of the decimal point count
powers of ⅒. In binary notation, digits to the right of the _binary
point_ count powers of ½: ½, ¼, ⅛, ¹/₁₆.... For example, 0.1011 equals
½ + ⅛ + ¹/₁₆, or ¹¹/₁₆.
If we were accustomed to using binary numbers, all our arithmetic
would be very simple. Furthermore, binary numbers are in many ways
much better for calculating machinery than any other numbers. The main
problem is converting numbers from decimal notation to binary. One
method depends on storing the powers of 2 in decimal notation. The rule
is: subtract successively smaller powers of 2; start with the largest
that can be subtracted, and count 1 for each power that goes and 0 for
each power that does not. For example, 86 in decimal becomes 1010110 in
binary:
Public-domain text, read in full here on John Shaqi.
Reviews
Reviews
No reviews yet
Be the first to share your thoughts on this work.
Elsewhere in the archive
Join the Discussion
Join the discussion
Sign in to leave a comment or review.
Sign InorCreate an account