Chapter 3 - Take away and cut in pieces

Addition and multiplication are well behaved operations. They both give back the same kind of numbers you put in. Not the same numbers but the same kind of numbers.
So far we have been working with whole numbers, from zero up (AKA positive numbers). So If have 10 coins, add 2 more coins, and get... 12 coins. And all numbers in that calculation are whole numbers. Multiplication works the same way: if you put 10 potatoes in the ground, and each potato grows to become 5 potatoes, you will have 50 potatoes by the end of the season. Fine. Two whole numbers go in, one whole number comes out. That's nice.

Subtraction and division are not like that. They are weird. When you try to subtract a large number from a small one you might get in trouble because the result cannot be any positive whole number. Being very concrete: I cannot give you 10 sheep, if I only have 4, right? Or can I? I would have to make a debt of 6 sheep... Debts are negative numbers. Extending numbers to include also negative numbers brings about more problems, such as: how would addition (and multiplication) work with a mix of positive and negative numbers?
So sometimes when I subtract a positive whole number from another positive whole number, I might get something else as a result: a negative whole number. Fine. Say that we can live with that, and we even manage to fix addition and multiplication to work with this larger family of numbers. We still have to cope with another kind of weirdness, that of division. Division is even more weird than subtraction: you come in with two whole numbers (for now, let's stick to positive whole numbers), and you get sometimes one, sometimes two results. Say you want to divide your 6 candies among 2 friends, then each gets 3 candies, easy. But if you stat from 7 candies, then what? Each friend still gets 3, but you are left with 1. So the result of 7 divided by 2 is really two things: 3 AND 1 leftover. That surely is the weirdest operation we have encountered so far.
But, OK. We can try to make things more regular by deciding that a division ALWAYS returns two results: the actual result of the division and a leftover (in math they are called quotient and remainder). So now we have an operation that takes two positive whole numbers and gives back two whole numbers.
However, we could also take another road and insist that division returns a single number as result. If we do that, then what number would be the result of 7 divided by 2? It cannot be a whole number, because 3 is too little and 4 is too much, to be the results. So we have to invent yet another family of numbers, the broken numbers, that live in between regular, whole numbers. (spoiler! the result of this division is 3.5, but in this book we don't know yet what 3.5 means...)
Broken numbers are weird in their own way, and we will have to find a way to place them on an abacus, to make sense of what they ARE. Then we have to redefine all our operations, so that they can work with whole (positive and negative) and broken numbers as well. In math these families of numbers have fancy, historical names: natural numbers (zero and the positive, whole numbers), integers (naturals and negative numbers), and real numbers(*) (integers and broken numbers).

To find our way in and work with these two strange operations, subtraction and division, we will take advantage of multiple ways to write the same thing, and when possible go back to the idea of normal form and transformations (as we did in chapter 1). In the process we will also invent ways to visualize, represent and reason about whole numbers, negative and even broken numbers.

(*) Note: this is a simplification. Integer and broken numbers correspond in fact to rational numbers in math. But real numbers are a larger family, that contains also all rationals, and since reals are more FAMOUS, I will just talk about broken numbers as real numbers, which is correct, but not the complete story.

Subtraction and negative numbers

Subtraction is more or less just the opposite of addition. When we think of numbers in unary, subtracting is very simple: just remove as many Is from your number as needed. For example: IIIII - II = IIIII = III, which means that subtracting two from five, you are left with three. Sheep-wise, that is:

-
=
Interestingly, subtraction is not commutative, meaning that the order counts! And since we are still only working with positive whole numbers or zero (the so called natural numbers), we don't even know what to do with: II - IIIII.
From your school math you might remember that a subtraction where a small number is subtracted from a large one, gives a negative number as a result: so we have to discuss negative numbers, in order to properly define the subtraction operation. (In math terminology, positive and negative whole numbers are called integer numbers)
The simplest way to introduce negative numbers might be to add a sign to a number and extend the rules for adding and multiplying to work for numbers with a sign. The sign could be + for the numbers we have used so far (AKA the naturals) and - for the new, negative numbers; zero stays the same.

Historically however, negative numbers where invented for commerce. So let me consider a simple barter scenario: I need to remember if you owe me sheep! And perhaps I can owe you some sheep at a different point in time. To cope with this scenario, I can keep 2 boxes of tokens: one for the sheep that I have, and owe for those I owe somebody else. Nowadays in commerce the box with owed sheep (AKA the debts) is usually associated with the color red, as in the sentence "my balance is in the red".
Using the two boxes positive whole numbers can be written as: n0 where n is a positive number or zero. For example the sentences "I have 1 sheep", "I have 2 sheep", and "I have 1972 sheep" can be represented by 10, 20, 19720, because these are all positive, whole numbers. A sentence like "I own 3 sheep to you" could look like this: 03, and it also means that I need to have 3 more sheep before I can consider myself even. So if I had three sheep to add to 03, I would have zero sheep, right?! But that means that: 30 + 0300 and it looks like adding a red number (AKA negative number) to a positive is the same as doing a subtraction. Here we more or less wrote that 3 + (-3) = 0, and that is the same as writing 3 - 3 = 0.
OK, so when I do an addition of positive and negative numbers, I can actually end up performing a subtraction... that is not too weird. After all in the commerce metaphor what I'm doing is balancing the books. And that leaves me with a revelation: a subtraction is really an addition where the second number has been turned into a negative number.
OK, but I wanted to use unary to work with the subtraction operation. So let's see how the same 3-3 subtraction looks with unary numbers in the two boxes: III  - III  Remember that we don't really have a way to write "zero" in unary, so I left the boxes with zero empty. Now I can use the fact that subtraction is addition with the second number turned negative: III  - III III  +  III And since adding in unary is just "putting everything together", the result has to be: IIIIII A nice and balanced result... only I wanted it to be zero (because I kind of KNOW that 3-3 is zero) But, wait a second! This unary, two-boxed number is ACTUALLY zero. Or better: the result is a number that is not in its normal form, and when I will correct it and fit it into a decent normal form, it will effectively be zero.
So let's define the normal form for the two-boxed numbers: clearly a number cannot have Is in both boxes. If it does, then it can be transformed, simplified, to have Is only in one, the black or the red.
Given this intuition I can try to formulate a rule to FIX a number that is not in normal form:
"if it is possible, remove one I from each box,
until no Is are left on one of the two boxes"
then the number will be in normal form.
Cool, let's immediately try this procedure on our wannabe zero: IIIIII
IIII
II
  
and since I cannot continue the process anymore, I can stop. The result is indeed zero.
So just to be sure that this approach makes sense, let me try with the subtraction II-IIIII. First I will change the operation from subtraction to addition (by changing the second number to negative), then I will do the addition box-by-box (that is: the black numbers add together, and the red numbers add together), and finally, I will transform my number to normal form. Let's go: II  - IIIII 
II  +  IIIII
IIIIIII
IIIIIII III

Bingo! The result is -3 (because after all we were calculating 2-5).

Note: we could also have used Peano numbers here (see chapter 2). However, usually Peano numbers are not used to work also with negative numbers, but it is possible to invent an extension of Peano's notation so we can have positive and negative Peano numbers. Positive and negative Peano numbers

Moral of the story so far: to define how the subtraction works, we had to invent negative numbers, extending a single number to be a pair of numbers, a black and a red one. Since positive and negative numbers cancel each other out, we realized that adding a positive and a negative number has the same meaning that subtracting the second number from the first. Knowing that, we could redefine addition, and as a bonus we got a definition of subtraction that works with any combination of positive and negative numbers.
Finally, we found out that every positive number has a negative counterpart, called its "opposite", and that adding together two opposite numbers gives zero. And zero does not have an opposite.

From subtraction to division

One way to look at a division is to see it as many subtractions, repeated. Take for example: 8:2, which we can read as "eight divided by two", or "I have eight sheep, and I want to give them to two friends, so each gets the same number of sheep". So to calculate the result, I could do like this: start with my sheep and try to give one sheep to each friend; then I can repeat the process until there are zero sheep, or until there are less sheep than friends, in which case I will have some leftover sheep. Here I would start with: my sheep = 10   and   friend1 sheep = 0   and   friend2 sheep = 0 I give one sheep to each friend, and I get: my sheep = 8   and   friend1 sheep = 1   and   friend2 sheep = 1
my sheep = 6   and   friend1 sheep = 2   and   friend2 sheep = 2
my sheep = 4   and   friend1 sheep = 3   and   friend2 sheep = 3
my sheep = 2   and   friend1 sheep = 4   and   friend2 sheep = 4
my sheep = 0
and I have to stop, because I cannot "give one sheep to each friend" anymore. The result is that both my friends get 4 sheep each and there are no sheep left: so 8:2 = 4 and no reminder (which is the math name for leftover sheep).
This procedure to calculate divisions by means of repeated subtractions was first presented by Euclid , an mathematician from ancient Greece, in his mathematical text Elements.

With the playground below, try these division: 8:2 and 22:7.
Then take a look at the reminders of these divisions: 1:3, 2:3, 3:3, 4:3, 5:3, 6:3 and 7:3. What happend there?
And what about 0:3? And 3:0?

I think the method for dividing is clear, but of course it is too long (or too slow if you like), hence, as often with math we have to trade clarity for ease of use (or for speed of calculation).
But what can we do about it? Repeated subtraction is just what it is... how can it be expressed in a different way?
Well, we could try to see if there is any way to connect division to some other operation, that we already know. After all subtraction is the opposite of addition, multiplication is repeated addition, and division is repeated subtraction. It makes sense to think that division might be the opposite of multiplication. (spoiler! And it is true too.)

 add - repeat  multiply
opposite  opposite?
subtract - repeat  divide

For example, we could see that if 6*4 = 24, then 24:6 = 4 and 24:4 = 6, so the idea of multiplication and division being somehow opposite seems to hold. (to be precise, in math they talk about an operation being the inverse of another)

Yet another way to see division is as a way to rewrite a number as DEPENDENT on another, a transformation that preserves the meaning of a number, but it rewrites it to look more like another. For example in the playground above, you have that 13 is also 3 * 4 + 1, so 13 rewritten as a number multiple of 4 is 3, with a leftover of 1. The meaning of this is "thirteen is the same as three times four, and then you have to add one".
                             IIII
        IIIII IIIII III  →   IIII
                             IIII   I 

Interesting... it is like trying to rearrange a number, to FIT it into a template: rewrite n as q * m + r, where all numbers are whole, and I only know n and m; also r should be less than m.

Why? Why can I be sure that r will always be less than m? What would happen to my division if r was the same or more than m?

This "fitting a template" looks like we are trying to find a linear combination, but BACKWARDS! Like when I have a number in base 10 and I would like to find its digits in base 2 (as we did in chapter 2). And in fact n = q * m + r tells me that I want my number n rewritten to be a linear combination of two other numbers, q and r, with the weight being the number m.
A question that we keep asking in this book is: are there many ways to write something? (AKA different look but same meaning?) Here I want to see if the are many ways to write my number n, as a linear combination, with respect to the number m?
Well surely there are many ways to write 13 in this format q * 4 + r: 13 = 0 * 4 + 13
13 = 1 * 4 + 9
13 = 2 * 4 + 5
13 = 3 * 4 + 1
13 = 4 * 4 + (-3)
...
13 = (-1) * 4 + 17
...
and each one of these (potentially infinite) ways to write 13 as a multiple of 4 is correct, and it represents a way to fit the template. For example 13 = 2 * 4 + 5 is:
                             IIII
        IIIII IIIII III  →   IIII
                                     IIIII

So division is a way of rewriting a number to fit a template defined by another number.
But if we see division as form of rewriting, we can ask: what is the normal form here? That is: what is the correct way to write a number in this notation?
In our example that would be like asking: which way of rewriting 13 is the best, most clear and simple? Perhaps we could start from the most OBVIOUS way to write 13 as a multiple of 4: 13 = 0 * 4 + 13 OK, that is VERY obvious, and it would work for any number n, because n = 0 * m + n is always true.
Could I transform q and r, while keeping the expression true? Well... I could take 4 away from 13, and add it as 1 in q: 13 = 0 * 4 + 13
(0+1) * 4 + (13-4)   →   1 * 4 + 9
And I can continue doing that: 13 = 1 * 4 + 9
(1+1) * 4 + (9-4)   →   13 = 2 * 4 + 5
(2+1) * 4 + (5-4)   →   13 = 3 * 4 + 1
(3+1) * 4 + (1-4)   →   13 = 4 * 4 + (-3)

Oops! That was one step too many. I think I should stop at 13 = 3 * 4 + 1. This process looks A LOT like the procedure for division: take a number (here 13) and remove the divisor (here 4) as many time as you can. Stop when the reminder becomes less than the divisor, otherwise you will get a negative reminder.
So we have rediscovered the same procedure, starting from a completely different point of view about the division operation. Cool.
And the normal form here would be that when I write n = q * m + r, q is the LARGEST number possible, and r the SMALLEST possible, but not a negative number. Moreover, I can always transform my linear combination in this way: n = q * m + r
n = (q+1) * m + (r-m)
and if the first is a linear combination of q, r and m that is equal to n, then so will the second one be.

So we actually have two ways of looking at division: as the opposite of the multiplication, and as a number rewritten as dependent on another. Putting these two views together suggests an alternative, faster way to calculate divisions:
to calculate (n:m) I can try to get as close as possible to n
by multiplying m by larger and larger numbers,
and stop before I exceed n.
So for our example 13:4, I could ask myself "what is the largest number that I can multiply by four and get 13 or something just a bit smaller?".
That number would be my estimate of q. Here I might try with 1*4, 2*4 = 8, 3*4 = 12 and 4*4 = 16. But 16 is too much, then I will choose 12, which gives me q = 3. Now that I know q, I can easily find r, because r = 13 - 3*4 = 1 or in the general case:

r = n - 3*m

This explains why they teach us the multiplication tables in school math: it is because we need them not only for multiplying but also perform fast division between whole numbers (by trying to find the right number for q and then work out r).

Seeing division

When you divide two numbers written in unary (tally notation, see chapter 1) the results have a surprising aesthetic quality.
Take a number and divide it by all numbers smaller than itself. For example: take 6, and divide it by all numbers smaller than 6:

6:1 = 6, 6:2 = 3, 6:3 = 2,
6:4 = 1 with a reminder of 2,
6:5 = 1 with a reminder of 1

OK, so sometimes we have leftovers and sometimes a good, crisp division. However, there are some numbers that have some leftover when you divide them for EVERY number before them: these numbers ARE NOT divisible by any number smaller than themselves. You might remember them from school math: they are called prime numbers. Prime and composite numbers

In the playground above, try one prime number, and then with the number before and after, for example: 7, 6 and 8. Or: 11, 10, and 12.
Can you see what is going on with the prime? Look at all the numbers smaller than your prime...
A prime number is defined as a natural number that cannot be formed by multiplying two smaller natural numbers (source wikipedia). Did you notice anything when looking at prime numbers in unary, and how they behave when divided by other numbers?
Hint: look at the reminder of the divisions... and how many times do you get a zero...

For a purely aesthetic pleasure, try to start from 1 and go up one step at the time... Look at how the patterns of dots arrange themselves.
Every time a pattern of dots has a shorter line of dots at its base, that number does not divide your current input number.
Try also with 12: a very DIVISIBLE number. It can be divided by 2,3,4,6, and 12.

Numbers with decimals

Divisions are boring and more difficult than, say, multiplications. Also have seen that not all divisions give just a one-number answer: sometimes you get a result and then some leftover (AKA a quotient and a reminder). For example 22:7 (which is sometimes used as an approximation of π), results in 3 and then 1 leftover, because: 22 = 3*7+1.
But... we know another way to write 22:7 and it involves using DECIMALS; 22:7 should actually be 3.142857 142857 ... etc, forever. The problem is that so far we have not defined these kinds of numbers with decimals. We don't even have a name for them, but if the other numbers are called whole, these could be called broken numbers.
Let's try to see what it means for a number to be broken, before we start thinking of ways to write it down properly (let's look at the semantics before we look at the syntax). A broken number can be in between two whole numbers: for example, if the result of 5:2 was a single number (instead of a quotient and a reminder), it would be a number that is larger than two and smaller than three at the same time.
Unary or Peano numbers will not cut it here... There is no way I can use one of those to represent whatever number 5:2 is. But I could go back to the abacus (that we used it in chapter 1); however, also the abacus can only represent whole numbers, and if we add the idea of a sign, we could perhaps express natural numbers on an abacus... but broken numbers?
I can start by considering numbers that are between zero and one, for example 1:2 or 1:3. At this point I cannot really write them as numbers, but I could try to rephrase the question "what is one divide by two?" into something more understandable. A trick that springs to mind is to make the question more general, think larger, since the problem seems to be that 1 is too small for this division. So I could ask instead "what is ... divided by two?":

and that means that: Why is the last one so interesting? Because dividing and multiplying by ten (or powers of ten) is very simple on an abacus (since the abacus works with base 10). Multiplying by ten means that the number on the abacus shifts to the left of one spike: all beads on all spikes move to the next spike to the left. This operation can be called a left-shift, and it corresponds to 10-times the original number.
Following this idea, a right-shift of one spike corresponds to dividing by ten. I could try with my result from before, 5, that was ten time too large. I could place five beads on the right-most spike of the abacus, and then perform a right-shift. That would mean divide 5 by ten on my abacus. The problem is that I would get zero... because I will run out of spikes on the right. Which makes sense, since the abacus only works with whole numbers.

In the abacus below, look at these numbers: 23, 230, 2300, and 2.
Then write 5 on the abacus and multiply it by ten, and then by ten again: which means write 50 and then 500 and see how they look.

When I right-shift too much, the least-significant digits of my numbers (AKA the beads to the far right) are lost by the abacus... so how can we fix this? We can EXPAND the abacus, add more spikes to the right. But wait a second: how can an abacus with more spikes be the solution here? It will just be able to represent LARGER WHOLE NUMBERS, not broken numbers. Well, what about remembering where the unit spike is BEFORE I expand the abacus?!
Wait... what? Let me explain in another way: my abacus is not enough, so I can add a second abacus to the RIGHT of my usual abacus. And I connect them by deciding on a rule that says: "when a number is right-shifted too much in the first abacus (the left one), move the beads that would have fallen off the abacus on the left-most spike of the second abacus". That should do it. If I paint a decimal point (or comma if you prefer) in between the two abaci, I have a NEW way to write numbers, that can represent whole AND broken numbers!

In the expanded abacus below, try to divide 23 by ten and by one hundred. Use the radio buttons to control how much you want to divide.
Then write 5 on the abacus and DIVIDE it by ten, and then by ten again.

That was cool. We have effectively expanded the notation base 10 to include also broken numbers. So now I know what 5 divided 10 looks like: it is 5.0 right-shifted of one spike, which gives me: 0.5, or 0.5.
Great. Then I can finally write that 1:2 is 0.5!

In chapter 2 we established that a number in based 10, that looks like abcd really means (as a value of) a specific number n, that we can calculate with a weighted sum of powers of ten: a * 103 + b * 102 + c * 101 + d * 100 = n
Now, playing a bit with the properties of the power operation I can convince myself that 1:10 is really the same as 10-1, and 1:100 is 10-2.

The power operation can also work with negative numbers, for example 2-3 is just 1:23. Go back to chapter 2 and see if you can verify that it must be so.

Anyway, the interesting thing here is that if I can write negative powers of ten, then I can redefine base 10 in very ELEGANT way. A number with digits like this abc.de will represent the broken number: a * 102 + b * 101 + c * 100   +   d * 10-1 + e * 10-2 so that d represents how many TENTHS of 1 there are in my number, and e represents how many HUNDREDTHS there are in my number.

All this is fine, but we have forgotten about 1:3. What broken number is that?
I can try with some approximations: 1:3 = 0 and a reminder of 1
10:3 = 3 and a reminder of 1
100:3 = 33 and a reminder of 1
...
Differently from 1:2 that eventually gives 0.5, this one seems to go on for ever with the same reminder for every attempt I make with ten times larger numbers. It seems that this number, the result of 1:3, looks something like: 0.333 ... and more threes FOREVER.
Which is OK if I accept that I might have to use a very very large abacus to represent this number.

Long division

Using my newly defined expanded abacus I can now ask this question: how can I continue a division between two whole numbers, and get a number with decimals (AKA broken number)?
The prolem is that so far the division procedure that we have is still the one from Euclid and that gives a quotient and a reminder, both whole numbers...
To define a new, longer style of division I can go back to the (surprisingly powerful) idea of spike swapping on an abacus. So far we know that:

OK, and I want to use these two facts in my division, and hopefully CONTINUE my division beyond whole numbers, and extend it to give me results that are broken numbers, when needed.
For this let's look at 10:4. The best I can do with whole numbers is 2 with a leftover of 2, because ten rewritten as a multiple of four gives 10 = 2 * 4 + 2. However, I could shift my number on the abacus, and ask instead: "what is 100:4" ? If that was not enough, I can keep shifting left (AKA multiply more times by ten) my original number 10, until I can see how to divide it by 4. Shifting to the left on the abacus gives me more space to calculate whole number division, and when I find an whole number result I can then shift it back (to the right) on my EXPANDED abacus, and read the broken number result!
Using the box notation for the expanded abacus, this idea looks like this:
010.00:4 -shiftLeft
100.00:4 = 025.00 -shiftRight
002.50

Surely the solution to 100:4 IS NOT the same as the solution to 10:4, but the two solutions are RELATED! In fact the solution to 100:4 has to be ten time larger than that to 10:4. So: 100:4 = (10:4) * 10, but 100:4 has a whole number solution, it is 25. And this means that: 10:4 = 25:10, which means "the result of 10:4 is ten times smaller than 25".

Interesting: again we find that in math we need to use multiple ways to write the same thing, to help us find a solution. Here we are using the fact that some multiplications and divisions are just a left or right shift on the abacus (those where you multiply or divide by ten), so we don't really have to do any calculations... just move the decimal point left or right.
And by the way, we are using the idea of changing syntax but not semantics also with the number being divided: in fact, any number n is also (n*10):10 and (n*100):100, ect.

Back to our example. We were at 10:4 → (100:4):10 = (25):10. And to find the number that is the result of 25:10, I can just write 25 on my abacus, then right-shift of one spike: 025.00002.50 or "two dot five" on my abacus with decimals.
So finally: 10:4 = 2.5, done!

Go back to the expanded abacus above, and confirm that 25:10 is in fact 2.5.
Then using the same idea, find our what 3:4 looks like as a broken number.
HINT: think of thirty, instead of three, divided by four; or even three-hundred if needed.

The long division that school math taught us is a manual, step-by-step way to calculate divisions using similar ideas. Interestingly, different countries teach the long division in different ways.

Moral of the story so far: subtraction is the opposite of addition, and we can define negative numbers (extending unary numbers), so that a subtraction become a variation of an addition. Then we realize that if multiplication is a repetition of addition, then we can look at division as a repetition of subtraction. And division turns out to be the opposite of multiplication.
But as in the case of subtraction, also division forces us to extend our number system: what happens when a division does not have a crisp result, but instead we are left with a reminder? And also what is the number that corresponds to divisions like 1:2?
We kind of assumed so far that every operation would give a single result, but division seems different. To make things right we find a way to represent more than whole numbers on an abacus: we invent broken numbers. So we can write 1:2 = 0.5, where 0.5 is a number that we can visualize on a special abacus (an expanded abacus) that has a dot to separate the whole part of a number from its decimals, the broken part.
The trick to be able to calculate divisions like 1:2 is again rewriting numbers in multiple ways, or in this specific case place numbers on our expanded abacus and use the properties of spike shifting.

All together now

Finally, we have not really discussed what happens when numbers can be positive and negative, as well as whole or broken. Instead of thinking about all the possible combinations of these features, in math usually the idea is to look at the most general case and use that one to redefine all others.
In our case that means that I can simply consider the most complex case, and find a way to represent and work with that one. So let me look at have a negative, broken number, like -12.3. Since it is negative, I should use the black and red boxes: 012.3 Fine, but we don't know yet how to put a broken number in the red box. So I could use the idea of the expanded abacus, for each box! 0012.30 OK, that looks good... complicated perhaps, but good. But.. wait a second! What about the black box? Surely that should also be a broken number, in the general case. So: 000.00012.30 Wow. So that is one way to write down -12.3, using the black and red boxes and expanded abacus. Addition and subtraction can be then defined on this notation, like we did in the beginning of this chapter: just do additions with the usual rules, in the black and red box separately, eventually fixing the abacus notation so it is still in its own normal form. And to subtract just use this equivalence a-b = a+(-b).
Multiplication and division are a bit more difficult to redefine for these number notation, but it is doable... Multiply and divide with broken numbers
Finally, also whole numbers can be written in that notation, because every whole number is also a broken number, with zero in its decimal part! For example 5 becomes: 005.00000.00 So we could in fact clean up this notation a bit, and decide that when some boxes are zero, they can avoid writing them (remember that in math we want to have EFFICIENT ways to write and work with numbers)... So 5 and -12.3 could be written like: 50
012.3
... nicer and more compact too.

Puzzles

(1) Positive and negative numbers.

Convert all numbers in the following expressions in unary notation, the calculate the results of the expression, still using only unary numbers. Only at the end, convert results from unary to ordinary, base 10 number.
To write unary numbers use the black and red boxes notation, where -3 looks like 03.

(2) Fitting the template.

Calculate the following whole number divisions, by rewrite the dividend as a multiple of the divisor. Try working step-by-step starting from n = 0 * m + n.


TOP