pctechguide.com

  • Home
  • Guides
  • Tutorials
  • Articles
  • Reviews
  • Glossary
  • Contact

Number Systems 2

Decimal

The difficult for us when approaching computer number systems is that we’re conditioned in to counting with our familiar base 10 system, or decimal. This system has 10 unique digits that represent units, tens, hundreds, thousands and so on, all in neat multiples of 10.

It may seem a little awkward to express it this way, simply because it’s so familiar, but we’ll have all done the number columns at very early primary school. For instance, to represent the number five thousand and ninety-six, we’d write 5096. This simply means five thousands, nine tens and six units, like this:

1000 100 10 unit
5 0 9 6

It seems almost beyond question that this is the natural way to represent this value, but in fact it’s simply a representation that we’ve become familiar with. We could represent it in many ways, including even shapes, colours, tones, or touch. But this particular system of number representation, grown out of early abacus counting, works well in the human mind, is good for arithmetic and other math work, and so has become almost universally employed.

Binary

However, the decimal system doesn’t work at all within a computer, because the computer knows only 0 and 1. So how does the computer count? Simple – the solution is that the computer uses a binary number system.

This can cause some confusion for those new to computer science, but it needn’t. All that happens in the binary number system is that the column values change, so numbers are represented using columns of values increasing in powers of two, not ten.

Let’s take some very basic examples to try and make this clear. Take the binary number 0b101. Notice that we precede the number with 0b, which denotes that the number is going to be a binary number. This is important, as it helps to make clear what number base we’re dealing with. Now, as we did with the decimal number above, we’ll split the digits into their respective columns, like this:

fours twos units
1 0 1

Here we can see that the binary number 0b101 represents one four and one unit. The decimal equivalent of this number is therefore 4+1=5.

Too simple? Take the number 0b110111:

32 16 8 4 2 unit
1 1 0 1 1 1

Here we can see that to convert the binary number 0b110111 to decimal, we add the columns 32+16+4+2+1=55.

Converting Decimal to Binary

Now, remember, the only reason that we’re converting these numbers to decimal is for our own understanding. The computer has to work in completely the other direction, in fact converting the decimal numbers that human users input into binary. This is really very simple, though.

Take the number 13. The key is to start with the highest binary column that we can, and work from there. The low binary number columns are units, twos, fours, eights and sixteens, but since sixteen is greater than 13, we know we’re starting with the eights column. So, we start our binary number with a one, and subtract the eight, leaving 5. The next binary column from eights is fours, which we can subtract from our remaining 5. So, we add another one to our binary number (now 11) and subtract the four, leaving 1. The next binary column from fours is twos, but we can’t subtract a two from 1, so we add a zero to our binary number (now 110). Finally the units column, and we do have one unit remaining, so we add a one to our binary number and we now have our complete binary number: 0b1101.

For a slightly more complex example, let’s take the number 87. Here the highest possible binary column is 64 (columns are units, 2, 4, 8, 16, 32, 64) so that’s where we can start with a 1. We then subtract 64 from the number, leaving 23, and move on to the next binary column, which is 32. 32 is greater than 23, so we add a zero to our binary number and move on to 16. We can take 16 from 23, so we add a one to our binary number, and are left with 7. The next column is eight, which we can’t subtract, so we add a number 0, then add a one for each of the four, two and unit columns (4+2+1=7) and have reduced our number to zero.

So we can now represent 87 as a binary number:

128 64 32 16 8 4 2 unit
0 1 0 1 0 1 1 1

Checking this, 64+16+4+2+1=87. Correct!

There’s an interactive script at the end of this article which will give you more practice with these decimal to binary and binary to decimal conversions.

So, that’s how computers store the numbers, but it’s clear that binary numbers can quickly become unwieldy for humans. So, to keep things in check, hexadecimal is used, which uses base 16. This might seem to be a step in the wrong direction, but next we’ll look at why, and how, hexadecimal helps.

  • Number Systems 2
  • Number Systems 3
  • Number Systems 4

Filed Under: Number Systems

Latest Articles

Be Productive With Your iPads With Keyboard Cases

When it comes to portability, lightness and convenience, the tablets are the best in these categories. However, if you are on the productive side, the tablets have one big problem with regards to their design and that is lacking the physical keyboard. Even these have the expediency with their … [Read More...]

How Often Should You Shut Down Your Computer?

Many people wonder if they should shut down their computer each day or leave it on. Furthermore, they wonder how often they should shut down their computer if they do leave it on. There are many different schools of thought on how to answer this question, but there are a few factors that play into … [Read More...]

How to turn Android Auto screen into an Android tablet with all apps

We are going to explain how to turn the Android Auto screen into an Android tablet with all the apps, and thus be able to do away with the limitations of this system for cars. The process of converting Android Auto into an Android tablet is a bit complex, and what you will end up doing is connecting … [Read More...]

Why Cross-Chain Trading Is the Future of Crypto Investing?

The rapid growth and evolution of the cryptocurrency market have opened up exciting opportunities for investors. Within this dynamic landscape, … [Read More...]

Revolutionize Your Internet Experience with Orbi 960 – The Ultimate WiFi System

In a world where seamless connectivity is essential, slow and unreliable internet connections are a major problem. Whether you are running a business, … [Read More...]

Do You Need a VPN When Trading Cryptocurrency?

There’s no doubt that the biggest global industries in 2023 are tech-driven, while there remains a significant crossover between many of these … [Read More...]

Goodbye Bitcoin: the 3 alternative cryptocurrencies that have great upside potential, according to experts

Bitcoin has been a very lucrative investment for people that got into it early. One report from The Motley Fool pointed out that $10 of bitcoin … [Read More...]

Self-driving cars face their Achilles’ heel and may be targets of hackers

The market for self-driving cars is booming. Customers spent $22.22 billion on these autonomous vehicles in 2021 and they will likely spend more in … [Read More...]

How to avoid scams with bitcoin and other cryptocurrencies

Cryptocurrencies got a bad reputation when scams multiplied like ants on a piece of cake. Even today many people associate bitcoin and other … [Read More...]

Guides

  • Computer Communications
  • Mobile Computing
  • PC Components
  • PC Data Storage
  • PC Input-Output
  • PC Multimedia
  • Processors (CPUs)

Recent Posts

Elsword Online

About the game: Title: Elsword Online Status: Released Graphics: 3D Genre: MMORPG Developer: KOG Games Publisher: KOG Games Explosive … [Read More...]

Syncables 360 Review

[starreviewmulti id=5 tpl=20] PROS: Syncables 360 is great for data transfer, whether it is from computer to computer, or phone to computer, it … [Read More...]

P2P Networking

By early 2000 a revolution was underway in an entirely new form of peer-to-peer computing. Sparked by the phenomenal success … [Read More...]

[footer_backtotop]

Copyright © 2023 About | Privacy | Contact Information | Wrtie For Us | Disclaimer | Copyright License | Authors