next up previous
Next: The Second Version Up: The Concept of a Previous: The Concept of a

How the Tokens work - First version

Each numeral continuously interacts with its left and right neighbours, getting their values and sending out revised values. The revision which takes place is the following (in pseudo-code):

valueSentToRight = add myOwnValue as a suffix to valueReceivedFromLeft
valueSentToLeft = add myOwnValue as a prefix to valueReceivedFromRight

This means that the child can dynamically add numerals to create a number and the left- and right-most numerals are always ``emitting'' the value of that number.

The operators, which are all binary operators, do nothing more that read the numbers from both its neighbours, use its own value to calculate a result and then convey the results when pressed:

Result = calculate (valueReceivedFromLeft 'myOperator'  valueReceivedFromRight)

This mechanism works for simple arithmatic expression (i.e., ones which contain only one operator), but does not give the correct answer if the operators are more than one (e.g., given the arithmatic expression: ``2+3*4'', pressing the plus operator will give the answer 5.)

Although limited, this version can give the child an insight into the workings of algebraic expressions and the notion of non-commutativity of simple binary operators (namely '-' and '/'.)

I therefore set out to create a bit more complex version, which can in addition to the forementioned things, give the child some inkling of different decimal values of numerals and operator preceedance.


next up previous
Next: The Second Version Up: The Concept of a Previous: The Concept of a
Magnus Bjornsson
1998-12-11