Language: EN

representar-numeros-en-binario

What is a number and how to represent it

Before we start talking about number representation systems, bases, hexadecimal systems, and tol pescao 🐠 we should briefly talk about what a number is.

In modern mathematics defining a number is very complicated. There are complex numbers, matrices, tensors, vector subspaces… in short, the topic gives us a lot to talk about.

Fortunately, for this course, a more traditional explanation will suffice. Let’s say that:

A number is an abstract concept that serves to identify quantities and measurements.

Or, colloquially speaking, a number is what naturally appears when someone started counting sheep 4,000 years ago (and possibly fell asleep).

Then the concept of zero was added, negative numbers, fractional numbers… and well, more or less we all know this story.

Number representation

Let’s say “more or less” we know what a number is, and that it is an abstract concept. But, we have to find a way to represent this number. For example, because I have to store it (write it) or transmit it.

Here I emphasize, and I’m going to be a little insistent, that we must not confuse a number with its representation. A number has no shape, it is a concept, it is abstract.

To understand this, this:

curso-binario-casa

It’s not a house. It’s an image that represents a house. Nor is the word house a house.

The real house is where you live. It is a large thing, with walls, in which you can go inside, you pay a mortgage for it, … that’s the real house. The other things are just representations of the house.

Likewise, 1,270,000 is not a number, they are symbols that represent a number. But we are so used to it, that we end up thinking that IT is the number. But it’s not, just traces to write the number, just like the image or the word house.

How to represent a number

Imagine that no one has ever represented a number before, and we have to invent a way to represent them. There are infinite ways to store numbers. We could start inventing ways and, literally, never finish.

This problem was already encountered thousands of years ago by the first people who dedicated themselves to this. In fact, we know that humanity has used ways to represent numbers, for example, Roman numerals or Babylonian numeration.

But let’s continue with inventing our own way to represent numbers. Let’s start with the most obvious. Let’s put marks for each number. For example “dots”. So 1, a dot. 3, three dots.

curso-binario-contar

Ok, but it wouldn’t be very practical to have so many dots. Imagine having to count 5,374 on a sheet to know what number it is. This doesn’t work very well, right?

So, it’s better to use symbols. Let’s create a different symbol for each number. Then we don’t have to count so many dots. But we have another problem… we’re not going to memorize 5,374 symbols, are we?

curso-binario-runas

That’s the problem with numbers, they are so many! (infinite).

  • If I use positions, I’m going to have many positions
  • If I use symbols, I’m going to have many symbols

Neither of the two options works alone. So, something in between had to be invented.

Positional notation

How do we avoid having many positions and many symbols? With positional notation, which is the system you are used to using.

Positional notation uses both symbols and their position to represent the number

Let’s see how it works,

  • We define a limited series of symbols
  • When we increase the numbers, we move from one to another
  • If we exhaust the symbols, we put the same symbol on the left.

For example, let’s imagine that we had taken these symbols 🔵,🔺, 🟩,⭐. Our system would work like this.

🌟

Concept of base

We call “base” the set of symbols that we are going to use for our positional notation system. In reality, we generally refer only to the number of symbols we handle. Because, the specific symbols… I don’t care.

So, our previous system has this base 🔵,🔺, 🟩,⭐, so we say that it is Base 4.

The base is related to how “long” your numbers will be

  • A larger base means occupying fewer positions. But it requires learning more symbols
  • A small base requires learning fewer symbols. But the numbers will occupy more positions.

Decimal system

Finally, we arrive at the decimal system, which is the positional notation system we are used to. As we know, the base of the system is 0, 1, 2, 3, 4, 5, 6, 7, 8, and 9. That is, 10 symbols, base 10.

0

Why was 10 symbols chosen and not 7 or 12? Because potato, absolutely for no reason. Well yes, look at your hands and count your fingers, that’s the thing.

In addition, 10 is a number of symbols that we find comfortable to memorize. Working with 500 symbols would make it very difficult to operate, because of our memorization capacity.

But apart from that, we could have chosen any other base, or any other set and number of symbols. And, now, we would see it as the most normal thing in the world, as we do with the decimal system.

The thing is that we are so used to working in the decimal system, that any other representation “confuses us”. But keep in mind that any of these representations is as valid as any other.