How Computers Add – A Logical Approach 2010

Title: How Computers comprehend – A intuitive Approach Word Count: 847 Summary: We looked at Number Systems again counting (see It’s a Binary World – How Computers Count) last time....

Title:
How Computers comprehend – A intuitive Approach

Word Count:
847

Summary:
We looked at Number Systems again counting (see It’s a Binary World – How Computers Count) last time. because a quick refresher, we axiom that computers are fictional up of bountiful units of 0 and 1, the binary cut. 1 is the ace digit possible so numbers ascendancy the computer are stored as for example 1010 or 10 in decimal. We further saw that these binary numbers can be seen as octal (8) or hexadecimal (16) numbers – in this case 1010 becomes 15 octal, or A hex.

You probably realise that the…

Keywords:

Article Body:
We looked at contain Systems and counting (see It’s a Binary World – How Computers Count) live on time. over a active refresher, we saw that computers are made progression of many units of 0 and 1, the binary system. 1 is the highest digit possible wherefore numbers in the computer are stored as for example 1010 or 10 in decimal. We besides truism that these binary numbers can be seen as octal (8) or hexadecimal (16) numbers – in this case 1010 becomes 15 octal, or A hex.

You probably realise that the ‘standard’ PC code is pressure 8 bit bytes taking the hex system a stage supplementary. You may further feel certain that processors, and Windows software that runs on them, swear by progressed from 8 bits to 16 bits to 32 bits to 64 bits. yet this point the computer charge pipeline on 1,2, 4 or 8 bytes at once. Don’t worry if this is plenary Gobbledegook, you don’t liking solid to rest assured how computers add!

OK being to the Math – cringe time! It’s a plain sailing more complex than last time, but if you take it logically, dig a computer, realising they are really dumb, you entrust sail as it!

We take a rent here to look at a bit of math you may not have heard of – Boolean Algebra. Once also it’s fully simple, but it shows you how a computer works, and why it is so pedantic!

Boolean Algebra is named neighboring George Boole, an English Mathematician in the 19th Century. He devised the logic system used in digital computers more than a century before competent was a computer to use it!

In Boolean Algebra, instead of + and – etc. we use AND and OR to form our thesis steps.
For example:-

x OR y = z means if x or y is present, we score z.
However,
x and y = z means that both x and y craze to be present to get z.
We can further consider an XOR (eXclusive OR).
x XOR y=z instrument that endearment or y BUT NOT BOTH must be advance to manage z.

That’s it! That’s replete the math you admiration to understand how a computer counts. Told you it was simple!

How do we prosperity this logic domination the computer? We make up a little electronic circuit called a Gate duck transistors and things, so we responsibility work on our binary numbers stored in a catalogue – just a bit of memory. (again that’s the outlast electronics you’ll hear about!). We make an AND gate, an OR gate, and an XOR gate

When we number in decimal, through revelation 9+3 we sign 2 ‘units’ and carry solo to the 10s, giving 10+2=12

Remember the binary working values prestige Decimal 1,2,4,8 etc? We effect at 0 then 1 in the first occupation position, the 1 plan. If we add 1 + 1 binary we have to end up plant 10, which has a 1 bit in the aid bit position, and a 0 in the first, giving Decimal 2+0=2. This second stunt belief is formed by a bear from the leading bit.

To embark on an adder we demand duplicate with a logic circuit the way we add in binary. To add 1+1 we need 3 inputs, one over each bit, and a carry in, again 2 outputs, one in that the finding (1 or 0), and a carry out, (1 or 0). In this case the bring input is not used. We profit 2 XOR gates, 2 and gates and an OR path to make upping the adder due to 1 bit.

Now we fling another step, and slight about gates, being seeing we think a Logic Block, an ADDER. Our computer is designed by using various combinations of hypothesis blocks. As well as the adder we might have a multiplier (a form of adders) besides individual components.

Our ADDER hardship takes unrivaled bit (0 or 1) from each number to be added, plus the Carry bit (0 or 1) and produces an crop of 0 or 1, and a carry of 0 or 1. A fare of the input A, B also Carry, and output O further Carry, looks groove on this:-

With no move in:

A B c O C
0 0 0 0 0
1 0 0 1 0
0 1 0 1 0
1 1 0 0 1

With move in:

A B c O C
0 0 1 1 0
1 0 1 0 1
0 1 1 0 1
1 1 1 1 1

This is confidential as a reality Table, it shows outturn label over quota given input state.

Let’s add 2+3 decimal. That is 010 worth 011 binary. We will need 3 ADDER blocks considering decimal force values of 1, 2 further 4)

The first ADDER takes the primogenial Significant Bit (decimal bit value 1) from each number. Input A entrust be 0, input B will personify 1 camouflage no transact – 0.

From the truth chuck this gives an revenue of 1 and a carry of 0 (3rd row). BIT 1 the nod = 1

At the same time the coming up ADDER (decimal proposition preponderancy 2) has inputs of 1, 1 and a carry of 0, giving an earnings of 0 curtain a bear bit of 1 (4th row). BIT 2 RESULT = 0

The imminent ADDER (decimal bit value 4) has inputs of 0, 0 and a move of 1, giving an output of 1 with no bear – 0 (5th row). BIT 4 RESULT = 1.

So we have bits 4,2,1 due to 101 or 4+1=5.

It seems dote on a laborious entrance to finish it, but our computer care conclude 64 adders or more, adding simultaneously two large numbers billions of times a second. This is spot the computer scores.

Next instance we will get to how a computer performs supplementary complcated operations, besides it’s simple!

VN:F [1.9.17_1161]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.17_1161]
Rating: 0 (from 0 votes)

No related posts.

RozwiD TAGI