Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Location arithmetic
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==The grid== Location arithmetic uses a square grid where each square on the grid represents a value. Two sides of the grid are marked with increasing powers of two. Any inner square can be identified by two numbers on these two sides, one being vertically below the inner square and the other to its far right. The value of the square is the product of these two numbers. {| border="0" cellpadding="0" cellspacing="1" style="text-align:center; background-color: white; color: black;" |+'''Example grid''' |- style="height:30px; background-color: silver;" | style="width:30px;"| | style="width:30px;"| | style="width:30px;"| | style="width:30px;"| | style="width:30px;"| | style="width:30px;"| | style="background-color: white;" | 32 |- style="height:30px; background-color: silver;" | style="width:30px;"| | style="width:30px;"| | style="width:30px;"| | style="width:30px;"| | style="width:30px;"| | style="width:30px;"| | style="background-color: white;" | 16 |- style="height:30px; background-color: silver;" | style="width:30px;"| | style="width:30px;"| | style="width:30px;"| | style="width:30px;"| | style="width:30px;"| | style="width:30px;"| | style="background-color: white;" | 8 |- style="height:30px; background-color: silver;" | style="width:30px;"| | style="width:30px;"| | style="width:30px;background-color: gray;"|'''32''' | style="width:30px;background-color: gray;"| | style="width:30px;background-color: gray;"| | style="width:30px;background-color: gray;"| | style="background-color: white;" | '''4''' |- style="height:30px; background-color: silver;" | style="width:30px;"| | style="width:30px;"| | style="width:30px;background-color: gray;"| | style="width:30px;"| | style="width:30px;"| | style="width:30px;"| | style="background-color: white;" | 2 |- style="height:30px; background-color: silver;" | style="width:30px;"| | style="width:30px;"| | style="width:30px;background-color:gray;"| | style="width:30px;"| | style="width:30px;"| | style="width:30px;"| | style="background-color: white;" | 1 |- style="height:30px; background-color:white; color: black;" | style="width:30px;"|32 | style="width:30px;"|16 | style="width:30px;"|'''8''' | style="width:30px;"|4 | style="width:30px;"|2 | style="width:30px;"|1 |} For instance, the square in this example grid represents 32, as it is the product of 4 on the right column and 8 from the bottom row. The grid itself can be any size, and larger grids simply permit us to handle larger numbers. Notice that moving either one square to the left or one square up doubles the value. This property can be used to perform binary addition using just a single row of the grid. ===Addition=== First, lay out a binary number on a row using counters to represent the 1s in the number. For example, 29 (= 11101 in binary) would be placed on the board like this: {| border="0" cellpadding="0" cellspacing="1" style="text-align:center; background-color: white; color: black;" |+ '''11101 (= 29) on one row''' |- style="height:30px; background-color: silver;" | style="width:30px;"| | style="width:30px;"|[[Image:Location arithmetic one counter.svg]] | style="width:30px;"|[[Image:Location arithmetic one counter.svg]] | style="width:30px;"|[[Image:Location arithmetic one counter.svg]] | style="width:30px;"| | style="width:30px;"|[[Image:Location arithmetic one counter.svg]] |- style="height:30px; background-color:white; color: black;" | style="width:30px;"|'''0''' | style="width:30px;"|'''1''' | style="width:30px;"|'''1''' | style="width:30px;"|'''1''' | style="width:30px;"|'''0''' | style="width:30px;"|'''1''' |} The number 29 is clearly the sum of the values of the squares on which there are counters. Now overlay the second number on this row. Say we place 9 (= 1001 in binary) on it like this. {| border="0" cellpadding="0" cellspacing="1" style="text-align:center; background-color: white; color: black;" |+ '''Overlay 1001 (= 9)''' |- style="height:30px; background-color: silver;" | style="width:30px;"| | style="width:30px;"|[[Image:Location arithmetic one counter.svg]] | style="width:30px;"|[[Image:Location arithmetic two counters.svg]] | style="width:30px;"|[[Image:Location arithmetic one counter.svg]] | style="width:30px;"| | style="width:30px;"|[[Image:Location arithmetic two counters.svg]] |- style="height:30px; background-color:white; color: black;" | style="width:30px;"|'''0''' | style="width:30px;"|'''0''' | style="width:30px;"|'''1''' | style="width:30px;"|'''0''' | style="width:30px;"|'''0''' | style="width:30px;"|'''1''' |} The sum of these two numbers is just the total value represented by the counters on the board, but some of the squares have more than one counter. Recall however, that moving to the left of a square doubles its value. So we replace two counters on a square with one counter to its left without changing the total value on the board. Note that this is the same idea used to abbreviate location numerals. Let's start by replacing the rightmost pair of counters with a counter to its left, giving: {| border="0" cellpadding="0" cellspacing="1" style="text-align:center; background-color: white; color: black;" |- style="height:30px; background-color: silver;" | style="width:30px;"| | style="width:30px;"|[[Image:Location arithmetic one counter.svg]] | style="width:30px;"|[[Image:Location arithmetic two counters.svg]] | style="width:30px;"|[[Image:Location arithmetic one counter.svg]] | style="width:30px;"|[[Image:Location arithmetic one counter.svg]] | style="width:30px;"|β |} We still have another square with two counters on it, so we do it again: {| border="0" cellpadding="0" cellspacing="1" style="text-align:center; background-color: white; color: black;" |- style="height:30px; background-color: silver;" | style="width:30px;"| | style="width:30px;"|[[Image:Location arithmetic two counters.svg]] | style="width:30px;"|β | style="width:30px;"|[[Image:Location arithmetic one counter.svg]] | style="width:30px;"|[[Image:Location arithmetic one counter.svg]] | style="width:30px;"| |} But replacing this pair created another square with two counters on it, so we replace a third time: {| border="0" cellpadding="0" cellspacing="1" style="text-align:center; background-color: white; color: black;" |+ '''Result 100110 = 38''' |- style="height:30px; background-color: silver;" | style="width:30px;"|[[Image:Location arithmetic one counter.svg]] | style="width:30px;"|β | style="width:30px;"| | style="width:30px;"|[[Image:Location arithmetic one counter.svg]] | style="width:30px;"|[[Image:Location arithmetic one counter.svg]] | style="width:30px;"| |- style="height:30px; background-color:white; color: black;" | style="width:30px;"|'''1''' | style="width:30px;"|'''0''' | style="width:30px;"|'''0''' | style="width:30px;"|'''1''' | style="width:30px;"|'''1''' | style="width:30px;"|'''0''' |} Now each square has just one counter, and reading off the result in binary 100110 (= 38) gives the correct result. ===Subtraction=== Subtracting is not much more complicated than addition: instead of adding counters on the board we remove them. To "borrow" a value, we replace a counter on a square with two to its right. Let's see how we might subtract 12 from 38. First place 38 (= 100110 in binary) on a row, and then place 12 (= 1100 in binary) under it: {| border="0" cellpadding="0" cellspacing="1" style="text-align:center; background-color: white; color: black;" |- style="height:30px; background-color: silver;" | style="width:30px;"|[[Image:Location arithmetic one counter.svg]] | style="width:30px;"| | style="width:30px;"| | style="width:30px;"|[[Image:Location arithmetic one counter.svg]] | style="width:30px;"|[[Image:Location arithmetic one counter.svg]] | style="width:30px;"| | style="background-color: white; color: black;"|'''38''' |- style="height:30px; background-color:white; color: black;" | style="width:30px;"| | style="width:30px;"| | style="width:30px;"|[[Image:Location arithmetic one counter.svg]] | style="width:30px;"|[[Image:Location arithmetic one counter.svg]] | style="width:30px;"| | style="width:30px;"| | '''12''' |} For every counter on the lower row that has a counter above it, remove both counters. We can remove one such pair on the board, resulting in: {| border="0" cellpadding="0" cellspacing="1" style="text-align:center; background-color: white; color: black;" |- style="height:30px; background-color: silver;" | style="width:30px;"|[[Image:Location arithmetic one counter.svg]] | style="width:30px;"| | style="width:30px;"| | style="width:30px;"|β | style="width:30px;"|[[Image:Location arithmetic one counter.svg]] | style="width:30px;"| |- style="height:30px; background-color:white; color: black;" | style="width:30px;"| | style="width:30px;"| | style="width:30px;"|[[Image:Location arithmetic one counter.svg]] | style="width:30px;"|β | style="width:30px;"| | style="width:30px;"| |} Now we need to "borrow" counters to get rid of the remaining counter on the bottom. First replace the leftmost counter on the top row with two to its right: {| border="0" cellpadding="0" cellspacing="1" style="text-align:center; background-color: white; color: black;" |- style="height:30px; background-color: silver;" | style="width:30px;"|β | style="width:30px;"|[[Image:Location arithmetic two counters.svg]] | style="width:30px;"| | style="width:30px;"| | style="width:30px;"|[[Image:Location arithmetic one counter.svg]] | style="width:30px;"| |- style="height:30px; background-color:white; color: black;" | style="width:30px;"| | style="width:30px;"| | style="width:30px;"|[[Image:Location arithmetic one counter.svg]] | style="width:30px;"| | style="width:30px;"| | style="width:30px;"| |} Now replace one of the two counters with two more to its right, giving: {| border="0" cellpadding="0" cellspacing="1" style="text-align:center; background-color: white; color: black;" |- style="height:30px; background-color: silver;" | style="width:30px;"| | style="width:30px;"|[[Image:Location arithmetic one counter.svg]] | style="width:30px;"|[[Image:Location arithmetic two counters.svg]] | style="width:30px;"| | style="width:30px;"|[[Image:Location arithmetic one counter.svg]] | style="width:30px;"| |- style="height:30px; background-color:white; color: black;" | style="width:30px;"| | style="width:30px;"| | style="width:30px;"|[[Image:Location arithmetic one counter.svg]] | style="width:30px;"| | style="width:30px;"| | style="width:30px;"| |} We can now take away one of the counters on the top row with the remaining counter on the bottom row: {| border="0" cellpadding="0" cellspacing="1" style="text-align:center; background-color: white; color: black;" |+ '''11010 = 26''' |- style="height:30px; background-color: silver;" | style="width:30px;"| | style="width:30px;"|[[Image:Location arithmetic one counter.svg]] | style="width:30px;"|[[Image:Location arithmetic one counter.svg]] | style="width:30px;"| | style="width:30px;"|[[Image:Location arithmetic one counter.svg]] | style="width:30px;"| |- style="height:30px; background-color:white; color: black;" | style="width:30px;"| | style="width:30px;"| | style="width:30px;"|β | style="width:30px;"| | style="width:30px;"| | style="width:30px;"| |} and read off 26, the final result. ===Some properties of the grid=== Unlike addition and subtraction, the entire grid is used to multiply, divide, and extract square roots. The grid has some useful properties utilized in these operations. First, all the squares on any diagonal going from the bottom left to the top right have the same value. {| border="0" cellpadding="0" cellspacing="1" style="text-align:center; background-color: white; color: black;" |- style="height:30px; background-color: silver;" | style="width:30px;"| | style="width:30px;"| | style="width:30px;"|256 | style="width:30px;"| | style="width:30px;"| | style="width:30px;"| | style="background-color: white;" | 32 |- style="height:30px; background-color: silver;" | style="width:30px;"| | style="width:30px;"|256 | style="width:30px;"| | style="width:30px;"| | style="width:30px;"| | style="width:30px;"|16 | style="background-color: white;" | 16 |- style="height:30px; background-color: silver;" | style="width:30px;"|256 | style="width:30px;"| | style="width:30px;"| | style="width:30px;"| | style="width:30px;"|16 | style="width:30px;"| | style="background-color: white;" | 8 |- style="height:30px; background-color: silver;" | style="width:30px;"| | style="width:30px;"| | style="width:30px;"| | style="width:30px;"|16 | style="width:30px;"| | style="width:30px;"| | style="background-color: white;" | 4 |- style="height:30px; background-color: silver;" | style="width:30px;"| | style="width:30px;"| | style="width:30px;"|16 | style="width:30px;"| | style="width:30px;"| | style="width:30px;"| | style="background-color: white;" | 2 |- style="height:30px; background-color: silver;" | style="width:30px;"| | style="width:30px;"|16 | style="width:30px;"| | style="width:30px;"| | style="width:30px;"| | style="width:30px;"| | style="background-color: white;" | 1 |- style="height:30px; background-color:white; color: black;" | style="width:30px;"|32 | style="width:30px;"|16 | style="width:30px;"|8 | style="width:30px;"|4 | style="width:30px;"|2 | style="width:30px;"|1 |} Since a diagonal move can be broken down into a move to the right (which halves the value) followed by a move up (which doubles the value), the value of the square stays the same. In conjunction with that diagonal property, there is a quick way to divide the numbers on the bottom and right edges of the grid. {| border="0" cellpadding="0" cellspacing="1" style="text-align:center; background-color: white; color: black;" |+ '''32 Γ· 8''' |- style="height:30px; background-color: silver;" | style="width:30px;"| | style="width:30px;"| | style="width:30px;"| | style="width:30px;"| | style="width:30px;"| | style="width:30px;"|[[Image:Location arithmetic diagonal half.svg]] | style="background-color: white;" | '''32''' |- style="height:30px; background-color: silver;" | style="width:30px;"| | style="width:30px;"| | style="width:30px;"| | style="width:30px;"| | style="width:30px;"|[[Image:Location arithmetic diagonal.svg]] | style="width:30px;"| | style="background-color: white;" | 16 |- style="height:30px; background-color: silver;" | style="width:30px;"| | style="width:30px;"| | style="width:30px;"| | style="width:30px;"|[[Image:Location arithmetic diagonal.svg]] | style="width:30px;"| | style="width:30px;"| | style="background-color: white;" | 8 |- style="height:30px; background-color: silver;" | style="width:30px;"| | style="width:30px;"| | style="width:30px;background-color: gray;"| | style="width:30px;"|β | style="width:30px;"|β | style="width:30px;"|β | style="background-color: white;" | '''4''' |- style="height:30px; background-color: silver;" | style="width:30px;"| | style="width:30px;"| | style="width:30px;"|[[Image:Location arithmetic vertical.svg]] | style="width:30px;"| | style="width:30px;"| | style="width:30px;"| | style="background-color: white;" | 2 |- style="height:30px; background-color: silver;" | style="width:30px;"| | style="width:30px;"| | style="width:30px;"|[[Image:Location arithmetic vertical half.svg]] | style="width:30px;"| | style="width:30px;"| | style="width:30px;"| | style="background-color: white;" | 1 |- style="height:30px; background-color:white; color: black;" | style="width:30px;"|32 | style="width:30px;"|16 | style="width:30px;"|'''8''' | style="width:30px;"|4 | style="width:30px;"|2 | style="width:30px;"|1 |} To perform 32Γ·8, one locates the dividend 32 along the right side and the divisor 8 on the bottom edge of the grid. Extending a diagonal from the dividend to the square where it intersects a vertical line of the divisor, the quotient lies at the right end of the grid from this square, in this example 4. This works as moving along the diagonal does not change the value; the value of the square on the intersection is still the dividend. Thus, the dividend is the product of the squares along the bottom and right edge. Since the square on the bottom edge is the divisor, the square on the right edge is the quotient.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)