Recent in Technology

Number System in Computer Science

Number System

We already know that computers only know 0 and 1. In fact, a computer is only a type of electronic device, so it only knows On and Off. open in the computer There are many small switches that can be turned on and off. Turn on the darn switches for the tasks we do regularly. It is working after closing. So really, a computer doesn't know 0 and 1. It only knows On and Off. When we human beings set a switch in the computer to 1 when it is on and 0 when it is off, the computer only knows 0 and 1.

To store data; Computers use logic gates to perform operations etc. I will write about logic gates in this computer science series as soon as possible. Now we will focus on the Number System.

When discussing number systems, we need to discuss 3 main systems: Binary, Denary and Hexadecimal. Binary is a key system for machine language that uses On and Off as 0 and 1 as mentioned above. Denary is also called Decimal. The system we humans use is the Denary. I will discuss each one to understand more.

Denary System

It will be easier to start discussing this system because it is used. Sally system. We can breath based on our ten fingers. In the Sally system, numbers from 0 to 9 are included, and overflow occurs once when the entire sneeze is finished.

0 1 2 3 4 5 6 7 8 9

10 11 12 13 14 15 16 17 18 19

20 21 22 23 24 25 26 27 28 29

If you visualize it as above, it will be more visible. The Sally system is familiar to all of us, so there is no need to explain it separately. If you see and understand this system carefully, it will not be difficult to understand the rest of the systems.

Binary System

The Binary system that computers understand is actually not that difficult. Denary used to be a sali system, so there were ten digits (0 to 9). So, after counting from 0 to 9, there is no more number, so it is an overflow once. So it's 10. When we continue counting from 11, 12, ..., 19, the next time we overflow, it becomes 20. Binary has only 0 and 1, so it will overflow once 1 is completed.

0 1

10 11

110 111

Hexadecimal System

If you understand Denary, it is not difficult to understand Hexadecimal. Denary is a Base 10 system, so it has 10 numeric characters. 0 1 2 3 4 5 6 7 8 9 10 does not exist. Once it overflows. So, it is obvious that the numbers according to the base exist separately.

Hexadecimal is base 16, so there are 16 numeric characters. After completing ten numbers from 0 to 9, you can continue with A, B, C, D, E, F. So, in full, this is it.

0 1 2 3 4 5 6 7 8 9 A B C D E F

This is the state before Overflow. It's like writing 0 to 9 in base 10 system. After reaching F, there is no more number to continue, so the overflow has started.

0 1 2 3 4 5 6 7 8 9 A B C D E F

10 11 12 13 14 15 16 17 18 19 1A 1B 1C 1D 1E 1F

20 21 22 23 24 25 26 27 28 29 2A 2B 2C 2D 2E 2F

So the 10 found in Binary is actually a different value than the 10 found in Denary. Also, it does not have the same value as 10 found in Hexadecimal. This needs to be noticed. Also, these systems can be switched from one to another. There are also easy ways to convert and calculate. These will continue to be discussed. Coming soon....

Thank you for reading here.

Post a Comment